Created
April 26, 2022 10:48
-
-
Save vvgsrk/6ff49d064e4b6ef01156bf1da7b8ebe6 to your computer and use it in GitHub Desktop.
Product management product history query in DBT Source layer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH source AS ( | |
SELECT | |
* | |
FROM | |
{{ source( | |
'product_management', | |
'product_history' | |
) }} | |
), | |
renamed AS ( | |
SELECT | |
"PRODUCT_ID" AS "PRODUCT_ID", | |
"PRODUCT_NAME" AS "PRODUCT_NAME", | |
"PRICE_PER_UNIT" AS "PRICE_PER_UNIT", | |
"BASIC_UNIT" AS "BASIC_UNIT", | |
"IS_STOCK_LIMITED" AS "IS_STOCK_LIMITED", | |
"IS_ACTIVE_FOR_SALE" AS "IS_ACTIVE_FOR_SALE", | |
"__EVENT_TS" AS "__EVENT_TS", | |
"__LOAD_TS" AS "__LOAD_TS" | |
FROM | |
source | |
) | |
SELECT | |
* | |
FROM | |
renamed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment