Skip to content

DBT: Dbt Invocations

DBT model name: dbt_invocations

Explore dependencies/lineage: link


Description

Attributes associated with each dbt invocation. Inserted at the end of each invocation.


Details

Column Type Description
invocation_id string Primary key of this table.
run_started_at string Timestamp the invocation was started.
run_completed_at string Timestamp the invocation was completed
generated_at string The time this invocation was uploaded to the database.
command string dbt command that was used. For example, run.
dbt_version string Version of dbt that was used in this invocation.
elementary_version string Version of the elementary package that was used in this invocation.
full_refresh boolean Whether or not this invocation was executed as a full-refresh.
invocation_vars string Dictionary of the variables (and values) that were declared in the invocation.
vars string Dictionary of all variables (and values) in the dbt project. If none were declared at runtime, these are the variables declared in dbt_project yml
target_name string Name of the target used in this invocation.
target_database string Name of the target database that was used in this invocation.
target_schema string Name of the target schema that was used in this invocation.
target_profile_name string Name of the dbt profile that was used in this invocation.
threads integer Number of threads that were used to run this dbt invocation. (This number could impact the performance of a dbt invocation).
selected string The selected resources in the dbt command. While this is a string in the database, this can easily be converted to an array.
yaml_selector string The yaml selector that was passed in this invocation.
job_id string The ID of a job, defined in the job_id var or in the JOB_ID env var or by the orchestrator (dbt Cloud, GitHub Actions, etc).
job_name string The name of a job, defined in the job_name var or in the JOB_NAME env var.
job_run_id string The run ID of a job, defined in the job_run_id var or in the DBT_JOB_RUN_ID env var or by the orchestrator (dbt Cloud, GitHub Actions, etc).
env string The environment's name, defined in the DBT_ENV env var.
env_id string The ID of an environment, defined in the DBT_ENV_ID env var.
project_id string The ID of a project, defined in the DBT_PROJECT_ID env var or by the orchestrator (dbt Cloud, GitHub Actions, etc).
cause_category string The category of the cause of the invocation. For example, if the invocation was triggered by a schedule, the cause category would be schedule. Defined in the DBT_CAUSE_CATEGORY env var or by the orchestrator (dbt Cloud, GitHub Actions, etc).
cause string The cause of the invocation. For example, if the invocation was triggered by a manual run, the cause would be "Kicked off by Joe.". Defined in the DBT_CAUSE env var or by the orchestrator (dbt Cloud, GitHub Actions, etc).
pull_request_id string The ID of a pull request, defined in the DBT_PULL_REQUEST_ID env var or by the orchestrator (dbt Cloud, GitHub Actions, etc).
git_sha string The git SHA of the commit that was used in this invocation, defined in the DBT_GIT_SHA env var or by the orchestrator (dbt Cloud, GitHub Actions, etc).
orchestrator string The orchestrator that was used to run this invocation, defined in the orchestrator var or in the ORCHESTRATOR env var or by the orchestrator env vars. For example, dbt Cloud, GitHub Actions, etc.
job_url string The name of a job, defined in the job_url var or in the JOB_URL env var or by the orchestrator. For GitHub Actions orchestrator, the value is calculated.
account_id string The ID of the account, defined in the account_id var or in the ACCOUNT_ID env var or by the orchestrator.

No data tests defined 🧐

Macros

  • get_partition_by
  • get_config_var
  • get_default_table_type
  • get_default_incremental_strategy
  • get_dbt_invocations_empty_table_query

No called script or script source not found.

{{
    config(
        materialized="incremental",
        transient=False,
        unique_key="invocation_id",
        on_schema_change="append_new_columns",
        partition_by=elementary.get_partition_by(),
        full_refresh=elementary.get_config_var("elementary_full_refresh"),
        meta={
            "timestamp_column": "created_at",
            "prev_timestamp_column": "generated_at",
        },
        table_type=elementary.get_default_table_type(),
        incremental_strategy=elementary.get_default_incremental_strategy(),
    )
}}

{{ elementary.get_dbt_invocations_empty_table_query() }}