|
16 | 16 | current_date, |
17 | 17 | date_format, |
18 | 18 | date_sub, |
| 19 | + datediff, |
19 | 20 | lit, |
20 | 21 | substring, |
21 | 22 | to_date, |
22 | 23 | to_timestamp, |
23 | | - datediff, |
24 | 24 | when, |
25 | 25 | ) |
26 | 26 | from pyspark.sql.window import Window |
| 27 | + |
27 | 28 | from scripts.helpers.helpers import ( |
28 | 29 | PARTITION_KEYS, |
29 | 30 | add_import_time_columns, |
@@ -575,7 +576,7 @@ def export_dynamic_frame_as_xml_gzip( |
575 | 576 | ) |
576 | 577 | ) |
577 | 578 | accounts_int = accounts.where( |
578 | | - col("description").isin({"Introductory", "Mense Profit Ac"}) |
| 579 | + col("description").isin({"Introductory", "Mense Profit Ac", "Mesne Profit Ac"}) |
579 | 580 | ) |
580 | 581 | accounts_int = accounts_int.join( |
581 | 582 | accounts_s, |
@@ -665,7 +666,7 @@ def export_dynamic_frame_as_xml_gzip( |
665 | 666 | "AgreementCode as ArrangementCode", |
666 | 667 | # "initial_payment_date as FirstInstallmentDueDate", |
667 | 668 | # "AgreementCreatedDate", |
668 | | - "Amount as PaymentAmount" |
| 669 | + "Amount as PaymentAmount", |
669 | 670 | # "uh_ten_ref as TenReference", |
670 | 671 | # "import_date" |
671 | 672 | ) |
@@ -771,7 +772,7 @@ def export_dynamic_frame_as_xml_gzip( |
771 | 772 | # "Address3", |
772 | 773 | "PostCode as PropertyPostCode", |
773 | 774 | "Email as PrimaryEmailAddress", |
774 | | - "'' as SecondaryEmailAddress" |
| 775 | + "'' as SecondaryEmailAddress", |
775 | 776 | # "PropertyType", |
776 | 777 | # "uh_ten_ref as TenReference", |
777 | 778 | # "import_date" |
@@ -817,7 +818,7 @@ def export_dynamic_frame_as_xml_gzip( |
817 | 818 | balances = balances.selectExpr( |
818 | 819 | "paymentreference as AccountReference", |
819 | 820 | "previousweekbalance as CurrentBalance", |
820 | | - "BalanceDate" |
| 821 | + "BalanceDate", |
821 | 822 | # "uh_ten_ref as TenReference", |
822 | 823 | # "import_date" |
823 | 824 | ) |
@@ -1055,7 +1056,7 @@ def export_dynamic_frame_as_xml_gzip( |
1055 | 1056 | "iso8601_format as TransactionPostDate", |
1056 | 1057 | "trans_type as TransactionCode", |
1057 | 1058 | "real_value as TransactionAmount", |
1058 | | - "code_lookup as TransactionDescription" |
| 1059 | + "code_lookup as TransactionDescription", |
1059 | 1060 | # "uh_ten_ref as TenReference", |
1060 | 1061 | # "import_date" |
1061 | 1062 | ) |
|
0 commit comments