dataform-co / dataform-web-tracking

Dataform is a collaborative data modelling platform that enables analysts and engineers to manage complex data models in SQL
https://dataform.co
MIT License
2 stars 0 forks source link

Not possible to reference BigQuery wildcard tables #313

Closed mshakhomirov closed 3 years ago

mshakhomirov commented 3 years ago

Example: ./source/events_.sqlx:

config {
  type: "declaration",
  schema: "firebase_analytics", -- Firebase extract creates wildcard tables, i.e. events_* 
  name: "events_*",
  description: "replica of bigquery-project.firebase_analytics.events_* table when Firebase data lands in BigQuery"
}

SELECT * FROM ${ref("events_")} WHERE _TABLE_SUFFIX = '20210906'

mshakhomirov commented 3 years ago

This would do:

SELECT * FROM ${ref("events_*")}
WHERE
_TABLE_SUFFIX = '20210906'