I’m attempting to view columns of a table in an External Connection in BigQuery. However, I’m running into an issue due to one of the columns using UUID, which isn’t supported in BQ. I can CAST() the column, but I still can’t see what other columns exist in the table.
What’s the best way to get a list of all columns in this case?
I’m attempting to view columns of a table in an External Connection in BigQuery. However, I’m running into an issue due to one of the columns using UUID, which isn’t supported in BQ. I can CAST() the column, but I still can’t see what other columns exist in the table.
What’s the best way to get a list of all columns in this case?
SELECT * FROM EXTERNAL_QUERY("table.employee.us.data", "SELECT * FROM data_table";");
which throws the error: Invalid table-valued function EXTERNAL_QUERY PostgreSQL type UUID in column id is not supported in BigQuery. You can cast it to a supported type by PostgreSQL CAST() function. at [1:15]
I also attempted using the EXCEPT() clause, but BQ still didn’t like it:
SELECT * FROM EXTERNAL_QUERY("table.employee.us.data", "SELECT * EXCEPT(ID) FROM data_table";");
which throws the error: Invalid table-valued function EXTERNAL_QUERY Failed to get query schema from PostgreSQL server, prepare statement failed. Error: ERROR: syntax error at or near “ID” LINE 1: SELECT * EXCEPT (ID) FROM data_table; /* Federated … ^ at [1:15]
I’m ultimately trying to get a list of columns in this table