We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
depends_on
In partial parsing, when a metric's model is updated, the depends_on for metrics is not updated, even though refs is updated.
model
refs
Create any models model_a + model_b, then create a metric like:
model_a
model_b
# models/whatever.yml version: 2 metrics: - model: ref('model_a') name: my_metric label: "My Metric" type: count sql: "*" timestamp: my_date time_grains: [day]
Good on the first go:
$ dbt --partial-parse ls --resource-type metric --output json --output-keys name,refs,depends_on ... {"name": "my_metric", "depends_on": {"macros": [], "nodes": ["model.testy.model_a"]}, "refs": [["model_a"]]}
Then, edit the model property to be ref('model_b') instead.
ref('model_b')
$ dbt --partial-parse ls --resource-type metric --output json --output-keys name,refs,depends_on ... {"name": "my_metric", "depends_on": {"macros": [], "nodes": []}, "refs": [["model_b"]]}
$ dbt --no-partial-parse ls --resource-type metric --output json --output-keys name,refs,depends_on {"name": "my_metric", "depends_on": {"macros": [], "nodes": ["model.testy.model_b"]}, "refs": [["model_b"]]}
The text was updated successfully, but these errors were encountered:
[#4298] Fix 'created_at' in ParsedMetric to allow recalculating metrics
d07165e
depends_on refs
4eee034
[#4298] Fix 'created_at' in ParsedMetric to allow recalculating metri…
045e70c
…cs depends_on refs (#4299)
gshank
Successfully merging a pull request may close this issue.
In partial parsing, when a metric's
model
is updated, thedepends_on
for metrics is not updated, even thoughrefs
is updated.reproduction steps
Create any models
model_a
+model_b
, then create a metric like:Good on the first go:
Then, edit the
model
property to beref('model_b')
instead.The text was updated successfully, but these errors were encountered: