> For the complete documentation index, see [llms.txt](https://docs.paradime.io/app-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paradime.io/app-help/products/bolt/special-environment-variables/audit-environment-variables.md).

# Audit environment variables

Paradime provides a set of system environment variables that can be added to your dbt™ models to inject metadata at run time to add more information to your materialized tables in your data warehouse.

These can be used to help identify which schedules run relates to a given row of data in your tables.

<table><thead><tr><th width="405">Vairable name</th><th>example</th></tr></thead><tbody><tr><td><code>PARADIME_WORKSPACE_NAME</code></td><td>jaffle_shop</td></tr><tr><td><code>PARADIME_SCHEDULE_NAME</code></td><td>hourly_run</td></tr><tr><td><code>PARADIME_SCHEDULE_RUN_ID</code></td><td>39828</td></tr><tr><td><code>PARADIME_SCHEDULE_RUN_START_DTTM</code></td><td>2022-07-15 21:50:21.268372</td></tr><tr><td><code>PARADIME_SCHEDULE_TRIGGER</code></td><td><p>one of:</p><ul><li>scheduler</li><li>manual from user@email.com</li><li>API</li><li>TURBO CI</li></ul></td></tr><tr><td><code>PARADIME_SCHEDULE_GIT_SHA</code></td><td>4a9fcff9277dfabd447157dea86dd7fdbd17d6f8</td></tr><tr><td><code>GITHUB_PR_NUMBER</code> (available only in TurboCI or on Merge runs when the <a href="/pages/UBSL8Er5YYNhRsRI6wiC">GitHub app integration</a> is configured).</td><td>1253</td></tr></tbody></table>

## Include env variables in your dbt™ models to audit your runs

Include any of the above variable in your dbt™ models. At run time, for each row of data in your data warehouse tables, with metadata to help audit each row.

```sql
{% set payment_methods = ['credit_card', 'coupon', 'bank_transfer', 'gift_card'] %}

with orders as (

    select * from {{ ref('stg_orders') }}

),

order_payments as (

    select * from {{ ref('order_payments') }}

),

final as (

    select
        orders.order_id,
        orders.customer_id,
        orders.order_date,
        orders.status,
        

        {% for payment_method in payment_methods -%}

        order_payments.{{payment_method}}_amount,

        {% endfor -%}

        order_payments.total_amount as amount

    from orders

    left join order_payments using (order_id)

)

select 

    *,
    -- Inject the audit metadata if available, otherwise use "manual"
    '{{ env_var("PARADIME_WORKSPACE_NAME", "manual") }}' as _audit_workspace_name,
    '{{ env_var("PARADIME_SCHEDULE_NAME", "manual") }}' as _audit_schedule_name,
    '{{ env_var("PARADIME_SCHEDULE_RUN_ID", "manual") }}' as _audit_schedule_run_id,
    '{{ env_var("PARADIME_SCHEDULE_RUN_START_DTTM", "manual") }}' as _audit_schedule_run_start_dttm,
    '{{ env_var("PARADIME_SCHEDULE_TRIGGER", "manual") }}' as _audit_schedule_trigger,
    '{{ env_var("PARADIME_SCHEDULE_GIT_SHA", "manual") }}' as _audit_schedule_git_sha,

from final
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/products/bolt/special-environment-variables/audit-environment-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
