Fabric: generate_source doesn't work due to get_tables_by_pattern_sql
- Dominant language
- Makefile
- Stars
- 1.8k
- Forks
- 632
- PR merge metrics
- No merged PRs in 30d
Description
### 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
- [x] other (specify: Fabric)
**The output of `dbt --version`:**
```
```
### Additional context
### Are you interested in contributing the fix?
Contributor guide
Assessment
This issue has not been assessed yet.