Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source project and target project to tables #8

Open
awoehrl opened this issue May 5, 2021 · 0 comments
Open

Add source project and target project to tables #8

awoehrl opened this issue May 5, 2021 · 0 comments

Comments

@awoehrl
Copy link

awoehrl commented May 5, 2021

Some Dataform projects use a more complex setup with:

  1. Different source and target GCP projects
  2. Serparate dev and prod environments (https://docs.dataform.co/dataform-web/scheduling/environments#example-use-separate-databases-for-development-and-production-data)

As the tables are hard-coded in this model right now, these setups don't work out of the box right now. A simple fix could be to introduce variables for source and target:

const input_project = "snowplow-raw-302115";
const output_project = dataform.projectConfig.defaultDatabase;

Also maybe this could be solved in the SQLX files itself by using the dataform config functions?

config {
  database : "snowplow-raw-302115",
  schema: "rt_pipeline_prod1",
  name: "events",
  description: "Raw Snowplow events table"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant