How to Stop Alteryx from Appending Table Name to Column Names in SQL Query
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello all,
Simple problem here. Whenever I use any DB connect tool (generally the standard input tool or dynamic input) and write a SQL query, Alteryx has an incredibly annoying habit of appending the table name to each column name in my query.
Simple example of a simple query:
select source_program_no, program_no from programs where source_program_no in (1234)
Note that we have many tables in the DB where these columns are shared, and I would normally just switch the main table it's pulling from--however, Alteryx does this:
Select programs.source_program_no, programs.program_no From programs Where programs.source_program_no In (1234)
Which not only makes it hard to read, but now I can't switch the main table name without switching EVERY table name.
This used to not happen in some 10.x versions of Alteryx, but after upgrading a couple times (and now being into 11.x)--I was hoping that this issue would resolve itself, but unfortunately it hasn't.
Does anyone have a solution for preventing Alteryx from doing this to my queries? This is just a simple example, so this doesn't even show how crazy my huge queries get, where it not only appends the table names, but it also removes all spatial formatting and flattens my query--essentially rendering it as an unreadable block of text.
Any help would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Greetings,
The issue that you're encountering here is in part due to the Visual Query Builder and how it manipulates code to create the desired result. If you would like to maintain your own SQL without the additions. I recommend you open your Query Builder and choose the SQL Editor tab and check the box to open on that tab by default. This will prevent your SQL from opening via the Visual Query Builder and leave your SQL code unaffected by changes enforced by the Visual Query Builder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Paul,
Thank you! That was it. Thanks a bunch for your help. I'm glad that it was something fairly simple.
