Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt run fails when the select returns zero rows #178

Open
nandubatchu opened this issue Jun 1, 2023 · 1 comment
Open

dbt run fails when the select returns zero rows #178

nandubatchu opened this issue Jun 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@nandubatchu
Copy link
Contributor

dbt run for specific models fail as we are employing automated schema inference from the SQL output. How can we create tables with zero/empty rows using dbt-glue adapter?

I have checked that we can create empty tables in Apache HUDI by defining schema explicitly!

@nandubatchu nandubatchu added the bug Something isn't working label Jun 1, 2023
@zhangyuan
Copy link
Contributor

zhangyuan commented Jul 20, 2023

Could you use the model like the below to create empty model?

{{ config(
  materialized='table',
)}}

select 1 as id -- cast the type if the default one doesn't make sense
where 1 = 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants