0

I want to give alias to source tables in Dataform I declare datasources as follow in .js file: declaration({ database: "DATABASE_a", schema: "SCHEMA_a", name: "user", })

I want to give every data source an alias like finance_user so when I reference it in a query in Dataform as SELECT * FROM ${ref("finance_user")}

instead of SELECT * FROM ${ref("user")}

This for differentiating sources with similar names

I tried declaration({ database: "DATABASE_a", schema: "SCHEMA_a", name: "user", alias: "finance_user })

2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Jan 16, 2025 at 10:53
  • to clarify, In Dataform, source tables (Tables which is being used in models in dataform) need to be referenced in a way that allows dataform understand dependencies. I use the declaration method mentioned before where I created a js file for all data sources and used rhe previous code to declare each table What I'm asking about is if there is a way to give an alias to these source tables instead of calling them by their names like the feature that DBT currently offers or not Commented Jan 17, 2025 at 20:53

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.