dbt-core icon indicating copy to clipboard operation
dbt-core copied to clipboard

Nest Macro node `meta` under `config`

Open QMalcolm opened this issue 1 year ago • 2 comments

Housekeeping

  • [X] I am a maintainer of dbt-core

Short description

The old/deprecated way of having meta was putting it directly on a node. However, awhile back we deprecated that paradigm and moved to nesting meta under a node's config. For reasoning I am not aware of, this never made it to Macro nodes. We should begin supporting the "best practice" path

Acceptance criteria

  • Macro nodes have a meta property under their config property
  • During parsing, flat meta specifications should end up under the config.meta

Suggested Tests

  • Macro meta can be specified in the dbt_project.yaml config specification
  • In a macro definition, people can specify meta directly on an macro or under a macro's config, both should end up in the macro's config.meta

Impact to Other Teams

Change impacts Artifacts team (change to the artifacts)

Will backports be required?

No

Context

No response

QMalcolm avatar Jan 24 '24 23:01 QMalcolm

@jtcohen6, exact same question as on #9446. I noticed on #7440 you mentioned in a comment that we intentionally didn't move meta under config for a subset of node types. Would you be able to speak to why that was? I know we did this intentionally, but without the context it at first looks like an inconsistency.

QMalcolm avatar Jan 24 '24 23:01 QMalcolm

See also:

  • https://github.com/dbt-labs/docs.getdbt.com/issues/3710

dbeatty10 avatar Feb 14 '24 04:02 dbeatty10