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

Fabric: generate_source doesn't work due to get_tables_by_pattern_sql #968

Open
1 of 5 tasks
boxysean opened this issue Nov 25, 2024 · 0 comments
Open
1 of 5 tasks
Labels
bug Something isn't working triage

Comments

@boxysean
Copy link

Describe the bug

Similar/same to #877, the default get_tables_by_pattern_sql macro doesn't work with Fabric.

Instead, it should be:

{% macro fabric__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}
select distinct
  TABLE_SCHEMA as {{ adapter.quote('table_schema') }},
  TABLE_NAME as {{ adapter.quote('table_name') }},
  {{ dbt_utils.get_table_types_sql() }}
from 
  {{ database }}.[INFORMATION_SCHEMA].[TABLES]
where TABLE_CATALOG like '{{ database }}'
  and TABLE_TYPE = 'BASE TABLE'
  and table_name not like '{{ exclude }}'
{% endmacro %}

Steps to reproduce

Expected results

Actual results

Screenshots and log output

System information

The contents of your packages.yml file:

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: Fabric)

The output of dbt --version:

<output goes here>

Additional context

Are you interested in contributing the fix?

@boxysean boxysean added bug Something isn't working triage labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant