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,41 @@
-- IMPORTS
WITH jobs AS (
SELECT * FROM {{ source('src_exchange_mysql', 'jobs') }}
),
-- LOGIC
jobs_rename AS (
SELECT
jobs.id,
jobs.queue,
jobs.payload,
jobs.attempts,
TO_TIMESTAMP(jobs.reserved_at) AS reserved_at,
TO_TIMESTAMP(jobs.available_at) AS available_at,
TO_TIMESTAMP(jobs.created_at) AS created_at,
current_timestamp() AS _dbt_ran_at
FROM jobs
),
-- FINAL
final__base_exchange__jobs AS (
SELECT
id,
queue,
payload,
attempts,
reserved_at,
available_at,
created_at,
_dbt_ran_at
FROM jobs_rename
)
SELECT * FROM final__base_exchange__jobs