Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

using regex tool how to split the data

chinnaupendra07
7 - Meteor

Hi hope all doing great so i have query regarding regex tool

Started running D:\Users\vamsikur\Downloads\Batch Input\Batch Macro Workflow.yxmd

so i want to split the only last \ line in output example  \Batch Macro Workflow.yxmd

how to split the data what expression should be given in regex or should i use any other tool.

9 REPLIES 9
Yoshiro_Fujimori
15 - Aurora

Hi @chinnaupendra07 ,

 

I think this should work.

Formula tool : Expression

Output = REGEX_Replace([Data], ".+(\\.+)", "$1")

 

Output

Yoshiro_Fujimori_1-1683530748063.png

 

Please let me know if you find any problem.

You can test your RegEx on this site.

https://regex101.com/

Highly recommended.

 

Good luck!

chinnaupendra07
7 - Meteor

@Yoshiro_FujimoriThank you for the reply i have solved my issues the answer was correct it helped me  

chinnaupendra07
7 - Meteor

Hi  @Yoshiro_Fujimori  given data i need split the data in different column like started running should be one column and error should be in  one column   

Started running [Unnamed Module] at Thu Jan 5 22:04:53 2023
00:00:00.000 - RunId - Alteryx: 4c1cfd79-afa0-4578-804a-a95162ad3608
00:00:00.000 - Workflow-id - Alteryx: 3b3152be-e421-445a-90d8-4b54f17eb739
00:00:00.000 - Error - ToolId 1: No Tests are configured.
Finished in 00:00:00.015 with 1 error

Yoshiro_Fujimori
15 - Aurora

Hi @chinnaupendra07 ,

 

I assume that there are only one Start message in the input data.

If there are multiple rows of Error messages, they will be concatenated in one cell, separated with \n (new line character).

 

Output

Yoshiro_Fujimori_1-1683615632047.png

 

Workflow

Yoshiro_Fujimori_0-1683615489293.png

I hope this may help.

chinnaupendra07
7 - Meteor

Hi @Yoshiro_Fujimori  so i have applied the  steps but i am facing issue in cross tab its not applying for all data its only applying for one how i can apply the logic for cross tab tool could u please help me out  and also i have attached the steps in the image

Yoshiro_Fujimori
15 - Aurora

Hi @chinnaupendra07 ,

Could you attach the workflow with inpu data (.yxzp)?

chinnaupendra07
7 - Meteor

so hi @Yoshiro_Fujimori  i have tagged the input in the below you  can use sample

i need to get side by side like started running and errors in the same row different fields

chinnaupendra07
7 - Meteor

so i need to get like this in output  @Yoshiro_Fujimori 

 

Field_1                                         Field_2
Started running [Unnamed Module]  Error - ToolId 1: No Tests are configured.
Started running [Unnamed Module]  Error - ToolId 1: No Tests are configured.
Started running [Unnamed Module]  Error - ToolId 1: No Tests are configured.

Yoshiro_Fujimori
15 - Aurora

Hi @chinnaupendra07 ,

As there are multiple jobs in one Log file, you need to differentiate each job.

 

RegEx in Formula tool is modified

to deal with a module name such as [D:\UseCases\Test\test_del.yxmd]

to remove unnecessary strings such as "00:00:00.031 - " before an error message.

Multi-Row Formula tool is added to set a new column [MessageID].

Cross Tab tool is modified to group data by [MessageID].

 

Workflow

Yoshiro_Fujimori_0-1683709157399.png

 

Output

Yoshiro_Fujimori_3-1683709463251.png

 

Labels