Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant