Skip to content

Refresh_external_table not working #346

@ralz29

Description

@ralz29

Describe the bug

Adding dbt_external_tables.refresh_external_table() doesn't work and throws various issues

Steps to reproduce

Added
pre_hook = "{{ dbt_external_tables.refresh_external_table('schema.table') }}"
or
pre_hook = "{{ dbt_external_tables.refresh_external_table('table') }}"
also tried
pre_hook = "{{ dbt_external_tables.refresh_external_table(source('schema', 'table')) }}"
and
pre_hook = "{{ dbt_external_tables.refresh_external_table(ref('table')) }}"

Expected results

The external table to get refreshed

Actual results

In the first two instances I got
` 'str object' has no attribute 'external'

in macro refresh_external_table (macros/common/refresh_external_table.sql)`

and in the second I got

` 'dbt.adapters.snowflake.relation.SnowflakeRelation object' has no attribute 'external'

in macro refresh_external_table (macros/common/refresh_external_table.sql)`

System information

The contents of your packages.yml file:

https://hub.getdbt.com/dbt-labs/dbt_external_tables/latest/

  • package: dbt-labs/dbt_external_tables
    version: 0.11.1

Which database are you using dbt with?

  • snowflake

The output of dbt --version:

1.9.4

The output of python --version:
3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions