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 External tables don't work with the --empty flag #10464

Open
2 tasks done
DanMawdsleyBA opened this issue Jul 18, 2024 · 1 comment
Open
2 tasks done

DBT External tables don't work with the --empty flag #10464

DanMawdsleyBA opened this issue Jul 18, 2024 · 1 comment
Labels
awaiting_response empty Issues related to the --empty CLI flag unit tests Issues related to built-in dbt unit testing functionality

Comments

@DanMawdsleyBA
Copy link

DanMawdsleyBA commented Jul 18, 2024

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I am currently using the lastest version of the dbt_external_tables package. The external table builds successfully but does not when I run with the empty flag. I get a sql error with an incorrect bracket. I have the external table and then a view that runs after the external table.

Expected Behavior

Be able to create external tables with the --empty flag

Steps To Reproduce

Create an external table
Run the external table with the --empty flag

Relevant log output

SQL compilation error:
  syntax error line 1 at position 33 unexpected '('.
  syntax error line 1 at position 34 unexpected 'select'.

Log sql here:

create or replace external table (select * from DB_INT.EXTERNAL.e_it_integration_test_json where false limit 0)
    location = @DB_INT.landing.ba_olympus_cleaned/integration_test-empty 
    auto_refresh = True
    file_format = DB_DEV.landing.JSON_FORMAT

Environment

- OS: Windows
- Python: 3.11
- dbt: 1.8

Which database adapter are you using with dbt?

snowflake

Additional Context

No response

@DanMawdsleyBA DanMawdsleyBA added bug Something isn't working triage labels Jul 18, 2024
@dbeatty10 dbeatty10 changed the title [Bug] DBT External tables don't work with the empty [Bug] DBT External tables don't work with the --empty flag Jul 18, 2024
@dbeatty10 dbeatty10 added the unit tests Issues related to built-in dbt unit testing functionality label Jul 18, 2024
@dbeatty10
Copy link
Contributor

Thanks for raising this issue @DanMawdsleyBA.

Could you share examples of the commands you are running?

@dbeatty10 dbeatty10 added the empty Issues related to the --empty CLI flag label Sep 24, 2024
@graciegoheen graciegoheen changed the title [Bug] DBT External tables don't work with the --empty flag DBT External tables don't work with the --empty flag Dec 11, 2024
@graciegoheen graciegoheen removed the bug Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting_response empty Issues related to the --empty CLI flag unit tests Issues related to built-in dbt unit testing functionality
Projects
None yet
Development

No branches or pull requests

3 participants