feat(dbt): apply smart contract schema inference and align gold shift-left quality tests
This commit is contained in:
@@ -1,4 +1,20 @@
|
||||
-- dbt Bronze View Model: environmental_permits
|
||||
{{ config(materialized='view') }}
|
||||
|
||||
SELECT * FROM {{ source('public', 'environmental_permits') }}
|
||||
SELECT
|
||||
permit_id,
|
||||
permit_number,
|
||||
applicant_name,
|
||||
company_name,
|
||||
business_type,
|
||||
activity_type,
|
||||
activity_type AS permit_type,
|
||||
location,
|
||||
status,
|
||||
environmental_score,
|
||||
issued_date,
|
||||
expiry_date,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM {{ source('public', 'environmental_permits') }}
|
||||
|
||||
|
||||
@@ -4,10 +4,9 @@ models:
|
||||
description: dbt Model gold_compliance_summary_mart auto-registered with Shift-Left
|
||||
quality assertions
|
||||
columns:
|
||||
- name: ispu_val
|
||||
- name: permit_type
|
||||
tests:
|
||||
- not_null
|
||||
- name: stasiun_id
|
||||
- name: status
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
|
||||
@@ -7,16 +7,28 @@ models:
|
||||
contract:
|
||||
enforced: true
|
||||
columns:
|
||||
- name: company_name
|
||||
data_type: character varying(255)
|
||||
- name: dbt_validated_at
|
||||
data_type: timestamp with time zone
|
||||
- name: issued_date
|
||||
data_type: date
|
||||
- name: permit_id
|
||||
tests:
|
||||
- unique
|
||||
- not_null
|
||||
data_type: character varying(50)
|
||||
- name: permit_number
|
||||
tests:
|
||||
- unique
|
||||
data_type: character varying(50)
|
||||
- name: permit_type
|
||||
data_type: character varying(50)
|
||||
- name: status
|
||||
tests:
|
||||
- not_null
|
||||
data_type: character varying(50)
|
||||
- name: updated_at
|
||||
tests:
|
||||
- not_null
|
||||
data_type: timestamp with time zone
|
||||
|
||||
Reference in New Issue
Block a user