-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Provide user-supplied configs to ParsedNodes before generating alias/schema names #1700
Comments
+1 to this issue, our use case is when our analytics team is developing new code or modifying existing code, we want them to pass a
and then we want the table names to be aliased in a way that is unique to each user developing such as the The reason is that in testing code changes, users don’t have the ability to write to our production schemas (they have a reduced read-only role) and they can only write to a dev schema, so we figured this might be a nice easy solution to handle users working on the same models at the same time as well, while only re-building parts of the project that are actively being developed on. We also assume table names are not unique and rely on the combination of table name and schema name to define a unique entity ( |
Describe the feature
dbt's
generate_alias_name
andgenerate_schema_name
macros accept anode
argument which contains a mostly-complete ParsedNode object. When thegenerate_schema_name
andgenerate_alias_name
macros are called for a node, thetags
andconfigs
properties on theParsedNode
are populated with dummy values. Instead, dbt should set thetags
andconfigs
properties for theParsedNode
before calling out to thegenerate_*_name
macros.This is specifically problematic when the
generate_alias_name
orgenerate_schema_name
macros need to operate on the suppliedschema
oralias
values for a node. In either instance, the user-supplied values foralias
andschema
will be unavailable in the node'sconfig
dictionary.Who will this benefit?
Users with complex needs around schema / alias generation.
The text was updated successfully, but these errors were encountered: