Skip to content

Commit

Permalink
Bug: missing ACTION_TYPE column
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartbryson committed Aug 9, 2023
1 parent 66aeaba commit 6818ae5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion models/bronze/brokerage/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

sources:
- name: brokerage
database: tpc_di
database: tpcdi
schema: digen
loader: snowpark

Expand Down
2 changes: 1 addition & 1 deletion models/bronze/crm/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

sources:
- name: crm
database: tpc_di
database: tpcdi
schema: digen
loader: snowpark

Expand Down
2 changes: 1 addition & 1 deletion models/bronze/finwire/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

sources:
- name: finwire
database: tpc_di
database: tpcdi
schema: digen
loader: snowpark

Expand Down
2 changes: 1 addition & 1 deletion models/bronze/hr/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

sources:
- name: hr
database: tpc_di
database: tpcdi
schema: digen
loader: snowpark

Expand Down
2 changes: 1 addition & 1 deletion models/bronze/reference/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

sources:
- name: reference
database: tpc_di
database: tpcdi
schema: digen
loader: snowpark

Expand Down
2 changes: 1 addition & 1 deletion models/bronze/syndicated/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

sources:
- name: syndicated
database: tpc_di
database: tpcdi
schema: digen
loader: snowpark

Expand Down
3 changes: 2 additions & 1 deletion tpcdi.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,11 @@ def get_phone_number(
xmlget(col('customer'), lit('Account'), 0).alias('account'),
get(col('$1'), lit('@ActionTS')).cast('STRING').alias('action_ts'),
get_xml_attribute('customer','C_TIER','STRING'),
get_xml_attribute('$1','ActionType','STRING'),
)
.select(
to_timestamp(col('action_ts'), lit('yyyy-mm-ddThh:mi:ss')).alias('action_ts'),
get_xml_attribute('$1','ActionType','STRING'),
col('ActionType').alias('ACTION_TYPE'),
get_xml_attribute('customer','C_ID','NUMBER'),
get_xml_attribute('customer','C_TAX_ID','STRING'),
get_xml_attribute('customer','C_GNDR','STRING'),
Expand Down

0 comments on commit 6818ae5

Please sign in to comment.