SQL Query Text Parsing Bug
- 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
select split(split(split(first_page_url, '\\?') [0], '#' ) [0], '\\%' ) [0] as clean_page, Count(ivid) as Traffic_ivid from dlprd.schema.table where first_page_url Like '%page_list%' group by 1
select first_page_url, Count(ivid) as Traffic_ivid from dlprd.schema.table where first_page_url Like '%page_list%' group by 1
Thanks in advance!
Solved! Go to Solution.
- Labels:
- Amazon S3
- Database Connection
- Parse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
this is off - no?
select split(split(split(first_page_url, '\\?') [0], '#' ) [0], '\\%' ) [0] as clean_page,
Maybe select split(split(split(first_page_url, '\\?') [0], '#' ) [0], '\\%' ) as clean_page?
What sql syntax are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for jumping in so quickly here, @apathetichell.
Unfortunately that wasn't the issue - I tried running it without the indexing at the end, but I still get the same error. Additionally, the split function returns an array, and with the other splits we do, it always returns a 1x1 array, so that indexing at the end just extracts the url string from the array.
I'm fairly certain we're using MySQL syntax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Are you using In-DB here - Alteryx doesn't have native support for array/struct types - and I'd recommend casting this to a string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
this was really helpful - thanks!
it looked liked casting to a string worked for a sec, but now I'm getting the same error 'you've found a bug'. Super frustrating as it's a useless error message. Will prob have to go to Alteryx support for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hmmm... you might want to enable logs in your odbc driver - and then run and check the logs to see what you are sending. It's possible that value still isn't fitting into the type of values Alteryx can parse. Are you In-DB or on canvas? You can try swapping to the other.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
select regexp_replace(first_page_url, '(\?|#)(.*)', '') as clean_page,
Count(ivid) as Traffic_ivid
from schema.table
where first_page_url Like 'page_list%'
group by 1
