Igor Dal Bo
05/19/2025, 7:51 AMkapa.ai
05/19/2025, 7:51 AMkapa.ai
05/19/2025, 7:51 AMdbt_invocations table in Elementary OSS. However, you can log custom metadata (such as a tag) into the dbt_invocations table by passing it as a dbt variable (--vars) or as an environment variable prefixed with DBT_ when running your dbt commands. For example, to log a custom tag, you could do: bash DBT_CUSTOM_TAG="my_tag" dbt run This will make the value available as an environment variable, and if you reference it in your dbt project (e.g., in dbt_project.yml or as a var), it can be captured. Elementary is designed to capture environment variables that are prefixed with DBT_ and store them in the dbt_invocations table, as discussed in several Slack threads and documentation. You can also pass custom variables using the --vars flag: bash dbt run --vars '{"custom_tag": "my_tag"}' These variables will be logged in the vars column of the dbt_invocations table, allowing you to track custom metadata per invocation. This approach is supported and recommended for capturing custom metadata such as tags, user, environment, etc. There is no indication in the knowledge sources that setting an env_var at the dbt profile level alone (without passing it at runtime) will result in it being logged by Elementary OSS. For more details, see the discussion on capturing custom metadata and environment variables in the dbt_invocations table: [Slack thread on custom metadata](https://slack.com/archives/C02CTC89LAX/p1666615460329049), [Elementary docs on collecting job data](https://docs.elementary-data.com/oss/guides/collect-job-data).