We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex not working to get the output from sql for the referenced table of the element..

ansh09
6 - Meteoroid

i am importing an excel file and one SQL file (.txt). There are some field name in excel and those field names are generated using the sql script. i want that the workflow should take input file excel and also one input as SQL file. And in the last just want the output as 2 fields (1 Field name and 2nd Table Name used to refer the field (in the sql file )).
i created the workflow but i am getting the error as the normal table i am able to get, but the table which is used to join and the field sourced from that table are not coming in output. 

i am just getting the primary table in the output for even the element which is sourced from join table(refer highlighted row in output_coming.png) ., please help me getting the join table also and please help me how can i create workflow that can entertain , complex queries also with many lines of sql or many joins in query.
Regex i used in the below flow : "(?i)(?:from|join|inner join|left join|right join|full join)\s+([a-zA-Z0-9_\.]+)\s+(?:as\s+)?([a-zA-Z0-9_]+)"
i am putting my initial workflow screenshot , excel screenshot of what output i need in alteryx (Output Needed.png) last stage and my sql file (Code.txt) also.

please someone can help...!??

Can someone please help? and guide me?
As i want that relevant table names should come in front of the relevant fields, if the field is coming from joined table then the table name should be that accordingly....
Do someone has any solution for it?

 

 

1 REPLY 1
davidskaife
14 - Magnetar

Hi @ansh09 

 

It might be better if you were able to share your workflow, as its hard to troubleshoot from screenshots.

 

Saying that your Regex appears to be working when i've tested it directly from the text file - if all you're trying to extract is the tables and alias

 

Screenshot 2025-04-11 100810.png

 

Labels
Top Solution Authors