Hi, I'm doing a little side project to map out all the tables, views, and columns in my company's database. I want to build an unofficial data catalog that also pulls the first row from each table, and then pivot it to show: Schema, Table, Column, Example Value, Data Type.
My macro runs fine but the issue is that I don't have access/permissions to every table in our database, so I want to find a way to tell alteryx to skip if the SQL gets the 'No Columns Returned' error. Or just skip a query if it gets any error and go to the next iteration. Is there a setting for this or a workaround? Since the data is confidential I can't really show you the values, but I hope the attached macro is helpful.
Solved! Go to Solution.
Hi @Alayna
Cool macro!
Found a way to do this:
1) Use the IF EXISTS to verify if the table exists
a)IF EXISTS, select *
b)ELSE,create a table with dummy hardcoded data, column STATUS = IGNORE THIS ITERATION
2)Filter out if EXAMPLE VALUE = IGNORE THIS ITERATION
If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)
Thanks.
@Felipe_Ribeir0 This is perfect! Thanks for the idea!!!