# depends\_on syntax use for Upstream model

**URL:** <https://discourse.getdbt.com/t/depends-on-syntax-use-for-upstream-model/20475>\
**Category:** In-Depth Discussions\
**Created:** [December 3, 2025, 7:36pm UTC](https://discourse.getdbt.com/t/depends-on-syntax-use-for-upstream-model/20475 "2025-12-03T19:36:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sober](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@sober](https://discourse.getdbt.com/u/sober)\
**Post date:** [December 3, 2025, 7:36pm UTC](https://discourse.getdbt.com/t/depends-on-syntax-use-for-upstream-model/20475/1 "2025-12-03T19:36:47Z")

</div>

I have a problem. I need to use upstream target (Fact) table to know the latest date data entry. I want to use that information in Downstream Staging table. I tried to use depends\_on clause in Downstream model but it is not working.

1. I used depends\_on as this in the config block:

{{ config(

```
tags=\["blah", "blah blah"\],

snowflake_warehouse='awesome_warehouse',

```

depends\_on: {{ ref(‘upstream\_parent\_model’) }}

) }}

It did not work.

2. Then I used the same in the beginning of the model code :

{{ config(

```
tags=\["blah", "blah blah"\],

snowflake_warehouse='awesome_warehouse'

```

) }}

depends\_on: {{ ref(‘upstream\_parent\_model’) }}

with campaign as (

```
    select…. blah blah

```

It did not work.

Do you know? where do i place depends\_on code snippet in the model sql ?

Best

sobhan

---

<div class="post-metadata">

**Author:** ![sober](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@sober](https://discourse.getdbt.com/u/sober)\
**Post date:** [December 3, 2025, 7:39pm UTC](https://discourse.getdbt.com/t/depends-on-syntax-use-for-upstream-model/20475/2 "2025-12-03T19:39:19Z")

</div>

By the way I do not know how that forward slash appear in the post

{{ config(

tags=[“blah”, “blah blah”],

snowflake\_warehouse=‘awesome\_warehouse’,

depends\_on: {{ ref(‘upstream\_parent\_model’) }}

) }}
