diff --git a/definitions/aggregation_table.sqlx b/definitions/aggregation_table.sqlx new file mode 100644 index 0000000000000000000000000000000000000000..d21082323cc7e6c8a696022b33a29d7e28bd32f7 --- /dev/null +++ b/definitions/aggregation_table.sqlx @@ -0,0 +1,5 @@ +config { + type: "table", + description: "Description of the first table.", +} +SELECT SUM(number) AS total FROM ${ref("source_table")} \ No newline at end of file diff --git a/definitions/first_view.sqlx b/definitions/first_view.sqlx deleted file mode 100644 index f53a5f648901c1052313f291da01a92ec9f2742d..0000000000000000000000000000000000000000 --- a/definitions/first_view.sqlx +++ /dev/null @@ -1,16 +0,0 @@ --- This is an example SQLX file to help you learn the basics of Dataform. --- Visit https://cloud.google.com/dataform/docs/sql-workflows for more information on how to configure your SQL workflow. - --- You can delete this file, then commit and push your changes to your repository when you are ready. - --- Config blocks allow you to configure, document, and test your data assets. -config { - type: "view", // Creates a view in BigQuery. Try changing to "table" instead. - columns: { - test: "A description for the test column", // Column descriptions are pushed to BigQuery. - } -} - --- The rest of a SQLX file contains your SELECT statement used to create the table. - -SELECT 1 as test diff --git a/definitions/second_view.sqlx b/definitions/second_view.sqlx deleted file mode 100644 index 9a4779595c9d80ab9c22c5427ba0b81344ad6cbe..0000000000000000000000000000000000000000 --- a/definitions/second_view.sqlx +++ /dev/null @@ -1,6 +0,0 @@ -config { type: "view" } - --- Use the ref() function to manage dependencies. --- Learn more about ref() and other built in functions here: https://cloud.google.com/dataform/docs/dataform-core - -SELECT test from ${ref("first_view")} diff --git a/definitions/source_table.sqlx b/definitions/source_table.sqlx new file mode 100644 index 0000000000000000000000000000000000000000..a7ccd377b8ec359318f3293fe34c09c2be35a0bd --- /dev/null +++ b/definitions/source_table.sqlx @@ -0,0 +1,9 @@ +config { + type: "table", + description: "Description of the first table.", +} +SELECT 1 AS number +UNION ALL +SELECT 5 AS number +UNION ALL +SELECT 3 AS number \ No newline at end of file diff --git a/workflow_settings.yaml b/workflow_settings.yaml index e09410c2b83b91d84557fd0de2fa9d877e943840..07c4e331c8e2098537fd39ef456ae0fe9d9c2254 100644 --- a/workflow_settings.yaml +++ b/workflow_settings.yaml @@ -1,5 +1,5 @@ defaultProject: maximal-chemist-355505 defaultLocation: asia-south1 -defaultDataset: dataform +defaultDataset: DFDemo defaultAssertionDataset: dataform_assertions dataformCoreVersion: 3.0.0