dataform-co / dataform

Dataform is a framework for managing SQL based data operations in BigQuery
https://cloud.google.com/dataform/docs
Apache License 2.0
834 stars 161 forks source link

Implement declare() API #60

Closed lewish closed 5 years ago

lewish commented 5 years ago

It should be possible to declare external tables that your project depends on, but are not generated by the dataform project. For example, if I automatically push my web logs to BigQuery to the table weblogs.logs then in my dataform project I can create a file:

definitions/external_tables.js:

declare("weblogs.logs");

And reference them in other queries, e.g. definitions/example.sql:

select * from ${ref("weblogs.logs")}

This would allow us to show external tables as part of the DAG, and would be useful for debugging, as well as simplifying queries (in BigQuery).

BenBirt commented 5 years ago

suggested API: https://docs.google.com/document/d/1Ch2O7bydqd3fUZJGtek8rbVroELpMlE58_IhS-Snzno/