init from dbt cloud hosting repo

This commit is contained in:
Yam ZhengLim
2023-03-28 23:57:11 +08:00
parent 06a10a7ac7
commit b8d9903e7f
253 changed files with 12008 additions and 0 deletions
@@ -0,0 +1,47 @@
-- IMPORTS
WITH companies AS (
SELECT * FROM {{ source('src_exchange_mysql', 'companies') }}
),
-- LOGIC
companies_rename AS (
SELECT
companies.id,
companies.name,
companies.reference AS marking_id,
companies.debtor AS account_software_id,
companies.type AS company_type,
companies.business_type,
companies.status,
companies.deleted_at,
companies.created_at,
companies.updated_at,
current_timestamp() AS _dbt_ran_at
FROM companies
),
-- FINAL
final__base_exchange__companies AS (
SELECT
id,
name,
marking_id,
account_software_id,
company_type,
business_type,
status,
deleted_at,
created_at,
updated_at,
_dbt_ran_at
FROM companies_rename
)
SELECT * FROM final__base_exchange__companies