Dbt model, how to run hook query only (no create table or anything)

Due to some specific reasons, I want to run hook queries only, just like some kind of ad-hoc query

The problem is that dbt keeps generating queries like below
create table “hive_source”.“sapo_bi”.“dimusercdp_update”

as (
– Blank since I only need to run the hook query only, no need to create any table

)

And of course when my SQL engine tries to run the above query, it throws an error.

How to just run the freaking hook query only??

Look into run-operations if you have to run one-off SQL statements…

Note: @Jeremy Yeo originally posted this reply in Slack. It might not have transferred perfectly.

1 Like

Tks. Using run-operations with macro or just select 1 work too (still create a dummy table)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.