Skip to content

Commit

Permalink
comment out filter of deletion before bulkLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
qishipengqsp committed Sep 24, 2024
1 parent f791222 commit ee19aa6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions transformation/snapshot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SELECT Account.id AS accountId,
Account.accountLevel AS accountLevel,
FROM Account
WHERE Account.createTime <= :start_date_long
AND Account.deleteTime > :start_date_long
-- AND Account.deleteTime > :start_date_long
ORDER BY Account.createTime )
TO ':output_dir/snapshot/Account.:output_format';

Expand Down Expand Up @@ -91,7 +91,8 @@ COPY
Transfer.payType AS payType,
Transfer.goodsType AS goodsType
FROM Transfer
WHERE Transfer.createTime <= :start_date_long AND Transfer.deleteTime > :start_date_long
WHERE Transfer.createTime <= :start_date_long
-- AND Transfer.deleteTime > :start_date_long
)
UNION ALL
(SELECT
Expand All @@ -104,7 +105,8 @@ COPY
LoanTransfer.payType AS payType,
LoanTransfer.goodsType AS goodsType
FROM LoanTransfer
WHERE LoanTransfer.createTime <= :start_date_long AND LoanTransfer.deleteTime > :start_date_long
WHERE LoanTransfer.createTime <= :start_date_long
-- AND LoanTransfer.deleteTime > :start_date_long
)
ORDER BY createTime
)
Expand All @@ -119,7 +121,7 @@ SELECT Withdraw.fromId AS fromId,
epoch_ms(Withdraw.createTime) AS createTime
FROM Withdraw
WHERE Withdraw.createTime <= :start_date_long
AND Withdraw.deleteTime > :start_date_long
-- AND Withdraw.deleteTime > :start_date_long
ORDER BY Withdraw.createTime )
TO ':output_dir/snapshot/AccountWithdrawAccount.:output_format';

Expand All @@ -132,7 +134,7 @@ SELECT Repay.accountId AS accountId,
epoch_ms(Repay.createTime) AS createTime
FROM Repay
WHERE Repay.createTime <= :start_date_long
AND Repay.deleteTime > :start_date_long
-- AND Repay.deleteTime > :start_date_long
ORDER BY Repay.createTime )
TO ':output_dir/snapshot/AccountRepayLoan.:output_format';

Expand All @@ -145,7 +147,7 @@ SELECT Deposit.loanId AS loanId,
epoch_ms(Deposit.createTime) AS createTime
FROM Deposit
WHERE Deposit.createTime <= :start_date_long
AND Deposit.deleteTime > :start_date_long
-- AND Deposit.deleteTime > :start_date_long
ORDER BY Deposit.createTime )
TO ':output_dir/snapshot/LoanDepositAccount.:output_format';

Expand All @@ -158,7 +160,7 @@ SELECT SignIn.mediumId AS mediumId,
SignIn.location AS location
FROM SignIn
WHERE SignIn.createTime <= :start_date_long
AND SignIn.deleteTime > :start_date_long
-- AND SignIn.deleteTime > :start_date_long
ORDER BY SignIn.createTime )
TO ':output_dir/snapshot/MediumSignInAccount.:output_format';

Expand Down Expand Up @@ -242,7 +244,7 @@ SELECT PersonOwnAccount.personId AS personId,
epoch_ms(PersonOwnAccount.createTime) AS createTime
FROM PersonOwnAccount
WHERE PersonOwnAccount.createTime <= :start_date_long
AND PersonOwnAccount.deleteTime > :start_date_long
-- AND PersonOwnAccount.deleteTime > :start_date_long
ORDER BY PersonOwnAccount.createTime )
TO ':output_dir/snapshot/PersonOwnAccount.:output_format';

Expand All @@ -254,6 +256,6 @@ SELECT CompanyOwnAccount.companyId AS companyId,
epoch_ms(CompanyOwnAccount.createTime) AS createTime
FROM CompanyOwnAccount
WHERE CompanyOwnAccount.createTime <= :start_date_long
AND CompanyOwnAccount.deleteTime > :start_date_long
-- AND CompanyOwnAccount.deleteTime > :start_date_long
ORDER BY CompanyOwnAccount.createTime )
TO ':output_dir/snapshot/CompanyOwnAccount.:output_format';

0 comments on commit ee19aa6

Please sign in to comment.