Files
dbt-f2dq/macros/meta/information_schema.sql
T
M7XBeastandCursor ff096b51b5 Initial publish of dbt_f2dq (f2dq) package v0.12.1.
Clean package repo for Gitea installs via packages.yml git URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 17:37:40 +03:00

33 lines
865 B
SQL

{% macro get_monitored_columns(schema, database) %}
{{ adapter.dispatch('get_monitored_columns', 'f2dq')(schema, database) }}
{% endmacro %}
{% macro default__get_monitored_columns(table_schema, db_name) %}
{% set relation = api.Relation.create(database=db_name, schema=table_schema) %}
select
table_name,
table_schema,
table_catalog,
column_name,
data_type,
is_nullable
from
{{ relation.information_schema('COLUMNS') }}
where
table_schema = '{{ table_schema }}'
{% endmacro %}
{% macro redshift__get_monitored_columns(table_schema, db_name) %}
select
table_name,
table_schema,
table_catalog,
column_name,
data_type,
is_nullable
from
svv_columns
where
table_schema = '{{ table_schema }}'
{% endmacro %}