mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
init from dbt cloud hosting repo
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user