# Re-run Slim CI on dbt Cloud

**URL:** https://discourse.getdbt.com/t/re-run-slim-ci-on-dbt-cloud/20259
**Category:** Help
**Tags:** ci-cd, dbt-cloud
**Created:** [September 26, 2025, 3:40am UTC](https://discourse.getdbt.com/t/re-run-slim-ci-on-dbt-cloud/20259 "2025-09-26T03:40:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tomb](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/tomb/32/5150_2.png) [@tomb](https://discourse.getdbt.com/u/tomb)
#### Post date: [September 26, 2025, 3:40am UTC](https://discourse.getdbt.com/t/re-run-slim-ci-on-dbt-cloud/20259/1 "2025-09-26T03:40:09Z")

</div>

## The problem I’m having

We have moved from dbt Core on GitLab runners to a dbt Cloud Slim CI job targeting a **`tst`** environment. When we click Rerun on the Slim CI job in dbt Cloud, the run fails at parse time with a missing environment variable error for **`DBT_CLOUD_PR_ID`**. This variable is used in our **`generate_schema_name`** macro to suffix schemas with the merge request number (for example, **`<schema_name>_<mr_number>`** ).

Here is the relevant extract from **`generate_schema_name.sql`** :

```auto
{% if target.name == 'tst' and env_var('DBT_CLOUD_PR_ID',none) is not none %}
    {% if custom_schema_name is not none %}
        {{ return(custom_schema_name ~ '_' ~ env_var('DBT_CLOUD_PR_ID',none) | lower) }}
    {% else %}
        {{ return(split_name[0] ~ '_' ~ env_var('DBT_CLOUD_PR_ID',none) | lower) }}
    {% endif %}
{% endif %}

```

If the Slim CI job is triggered by opening a merge request, or by commits to an open merge request, **`DBT_CLOUD_PR_ID`** is present and the run succeeds.

If we click Rerun on the Slim CI job, **`DBT_CLOUD_PR_ID`** is absent and the run fails during parsing.

## Questions:

- Is there a supported way to rerun a Slim CI job in dbt Cloud without committing to an open merge request?

- Can the Rerun action (UI or API) be configured to pass a value for **`DBT_CLOUD_PR_ID`** , or to simulate MR context for the purposes of Slim CI?

## The context of why I’m trying to do this

We want to re‑run the Slim CI job without pushing a new commit to the open merge request, for example to test an incremental model load. Previously, on GitLab we could manually re‑run the pipeline to re‑execute the dbt Core job.

## What I’ve already tried

- Confirmed that Slim CI runs triggered by merge request events include **`DBT_CLOUD_PR_ID`** , while manual Rerun does not.

- Guarded the macro with a default (**`env_var('DBT_CLOUD_PR_ID', none)`**) and a **`tst`** ‑only condition, as shown above.

- Searched for a way to supply or override environment variables specifically for a Rerun, but have not found anything that applies to Slim CI reruns.

## Some example code or error messages

```auto
03:08:04 Running dbt...
03:08:05 Unable to do partial parsing because saved manifest not found. Starting full parse.
03:08:06 Encountered an error:
Parsing Error
  Env var required but not provided: 'DBT_CLOUD_PR_ID'
dbt command failed

```
