I am new to dataform and am migrating some ETL activities that involve Pivot and Unpivot.
I have created a config {type: "operations"} etc but in the query string that I am building for Execute Immediate I am extracting the column names from the schema:
Solved! Go to Solution.
Found the solution - https://cloud.google.com/dataform/docs/reference/dataform-core-reference#commoncontext
It's the simplest thing but it is not made clear in any of the examples.
SELECT
column_name
FROM
`${database()}.${schema()}`.INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = '${name()}'
Found the solution - https://cloud.google.com/dataform/docs/reference/dataform-core-reference#commoncontext
It's the simplest thing but it is not made clear in any of the examples.
SELECT
column_name
FROM
`${database()}.${schema()}`.INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = '${name()}'