-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backfill generation methods (#73)
## Scope Part of #61 This PR adds the method that generates backfill queries for the MS SQL source
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
framework/arcane-framework/src/main/resources/get_select_all_query.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
declare @currentVersion bigint = CHANGE_TRACKING_CURRENT_VERSION() | ||
|
||
SELECT | ||
{ChangeTrackingColumnsStatement}, | ||
@currentVersion AS 'ChangeTrackingVersion', | ||
lower(convert(nvarchar(128), HashBytes('SHA2_256', {MERGE_EXPRESSION}),2)) as [{MERGE_KEY}] | ||
FROM [{dbName}].[{schema}].[{tableName}] tq |
8 changes: 8 additions & 0 deletions
8
framework/arcane-framework/src/main/resources/get_select_all_query_date_partitioned.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
declare @currentVersion bigint = CHANGE_TRACKING_CURRENT_VERSION() | ||
|
||
SELECT | ||
{ChangeTrackingColumnsStatement}, | ||
@currentVersion AS 'ChangeTrackingVersion', | ||
lower(convert(nvarchar(128), HashBytes('SHA2_256', {MERGE_EXPRESSION}),2)) as [{MERGE_KEY}], | ||
{DATE_PARTITION_EXPRESSION} as [{DATE_PARTITION_KEY}] | ||
FROM [{dbName}].[{schema}].[{tableName}] tq |
This file contains 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
This file contains 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