Zero rows returned in transformed layer

The problem I’m having

I get 0 rows on running the code from the transformed layer, the staging layer works just fine.

The context of why I’m trying to do this

Every time I add a column or modify a column I run the code in order to check if the changes are working as intended but the code returns no rows.

I run this on vscode with command dbt build --select my_model. I am using dbt adapter databricks=1.5.4

What I’ve already tried

Now if I use the {{ref()}} function the code works and what I have realized is that in my config block I have set the materialized to ‘incremental’ but if I change it to ‘table’ then I see all the table being populated.

Some example code or error messages

I don’t get any error messages just empty tables.

Here is the config block:
{{
config(
materialized = “incremental”,
unique_key = ‘dbt_scd_id’,
file_format = “delta”,
location_root = var(‘location_root_transform’)
)
}}

And here are the if is_incremental checks:

{% if is_incremental() %}
WHERE s.ModifiedOrDeletedDateTime > ( SELECT max(ModifiedOrDeletedDateTime) FROM {{ this }} )
{% endif %}
)

{% if is_incremental() %}
,existing_inserteddatetime (
SELECT
customer_sk
,InsertedDateTime
,InsertedByUser
FROM {{ this }}
WHERE dbt_valid_to IS NULL
)
{% endif %}