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

JSON artifact updates #2671

Closed
beckjake opened this issue Jul 30, 2020 · 3 comments
Closed

JSON artifact updates #2671

beckjake opened this issue Jul 30, 2020 · 3 comments
Labels
1.0.0 Issues related to the 1.0.0 release of dbt artifacts enhancement New feature or request

Comments

@beckjake
Copy link
Contributor

Describe the feature

There are a number of changes we should make to dbt's JSON artifact outputs to make some new features easier to develop:

  • We should combine the various SQL fields in the manifest. I can see some value in the raw_sql field existing, but we should change injected_sql to overwrite compiled_sql instead of adding a new field.
  • Include the dbt version that produced JSON artifacts.
  • Include the invocation_id in produced JSON artifacts.
  • Accept a run_id as an environment variable and include that in produced JSON artifacts.
  • All output artifacts should have common metadata

On the behavior side of things, dbt should write compiled manifests at the end of the dbt run. Currently we only write a compiled manifest after running the internal compilation phase in dbt docs generate.

Describe alternatives you've considered

Status quo

Who will this benefit?

Consumers of dbt's JSON files.

@beckjake beckjake added enhancement New feature or request triage labels Jul 30, 2020
@jtcohen6 jtcohen6 added 1.0.0 Issues related to the 1.0.0 release of dbt and removed triage labels Jul 30, 2020
@jtcohen6 jtcohen6 added this to the 0.19.0 milestone Aug 5, 2020
@jtcohen6
Copy link
Contributor

jtcohen6 commented Sep 2, 2020

  • Common metadata field across all artifacts, to include timestamps + invocation_id. Already exists in manifest.
  • Instead of a single string value run_id, we check for something like DBT_ENV_CUSTOM_ENV_-prefixed env variables and nest into a dict in every artifact. (Under metadata field)

On the behavior side of things, dbt should write compiled manifests at the end of the dbt run.

If we rewrite the manifest at the end of the run, we can remove the node field from the run results

@beckjake
Copy link
Contributor Author

I've split this into separate issues, except for the dbt version part, which is already captured in #2670

@jtcohen6
Copy link
Contributor

Resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.0 Issues related to the 1.0.0 release of dbt artifacts enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants