Monday, 31 October 2022

Create/ Drop Triggers in Postgresql

SELECT 

    * 

FROM 

    information_schema.triggers

WHERE 

    trigger_schema = 'abc' 




SELECT 

    CONCAT('DROP TRIGGER IF EXISTS ',trigger_name,' ON ',trigger_schema,'.',event_object_table,';') AS sql

FROM 

    information_schema.triggers

WHERE 

    trigger_schema = 'abc' 

DBT - Models

Models are where your developers spend most of their time within a dbt environment. Models are primarily written as a select statement and ...