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
Solved! Go to Solution.
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?
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
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.
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.
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.
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