Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,28 @@ vars:
dbt_artifacts_exclude_all_results: true
```

### Skipping manifest dataset upload

By default, every invocation uploads both the execution results (`model_execution`, `seed_executions`, `test_executions`, `snapshot_executions`) and project's manifest datasets (`models`, `seeds`, `snapshots`, `sources`, `tests`, `exposures`). Because manifest datasets are re-inserted on every run, the underlying tables can grow quickly on routine or scheduled runs.

The manifest datasets usually change only when the project code changes, so you can skip uploading them on routine runs and upload them only when code is merged, for example during the build step in CI.

To skip manifest dataset upload, set the `dbt_artifacts_upload_manifest` variable to `false`:

```yml
# dbt_project.yml
vars:
dbt_artifacts_upload_manifest: false
```

When `false`, only `invocations` and the execution datasets are uploaded. `invocations` is always uploaded regardless of this setting, as it is the parent record that execution rows reference.

Override it to `true` on runs where you want the full project metadata refreshed:

```sh
dbt build --vars '{"dbt_artifacts_upload_manifest": true}'
```

## Upgrading from 1.x to >=2.0.0

If you were using the following variables:
Expand Down
9 changes: 8 additions & 1 deletion macros/upload_results/upload_results.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@

{% if execute %}

{% set datasets_to_load = ['exposures', 'seeds', 'snapshots', 'invocations', 'sources', 'tests', 'models'] %}
{% set upload_manifest = var('dbt_artifacts_upload_manifest', true) %}

{% set datasets_to_load = ['invocations'] %}

{% if upload_manifest %}
{% set datasets_to_load = ['exposures', 'seeds', 'snapshots', 'sources', 'tests', 'models'] + datasets_to_load %}
{% endif %}

{% if results != [] %}
{# When executing, and results are available, then upload the results #}
{% set datasets_to_load = ['model_executions', 'seed_executions', 'test_executions', 'snapshot_executions'] + datasets_to_load %}
Expand Down