Skip to content

Commit 599866d

Browse files
committed
Sample additions
1 parent 49dd996 commit 599866d

7 files changed

+317
-18
lines changed

Virtual_EDW/Templates/templateCollection.json

Lines changed: 49 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
1515
"TemplateFilePath": "templateHubViewWithDeliveryKey.handlebars",
1616
"TemplateNotes": "Standard Hub template - display the distinct list of Business Keys for a Core Business Concept."
17-
},
17+
},
1818
{
1919
"TemplateName": "100 Data Vault Link View Template",
2020
"TemplateType": "NaturalBusinessRelationship",
@@ -39,14 +39,6 @@
3939
"TemplateFilePath": "templateLinkSatelliteView.handlebars",
4040
"TemplateNotes": ""
4141
},
42-
{
43-
"TemplateName": "150 Data Vault Link-Satellite View Template With Zero Record",
44-
"TemplateType": "NaturalBusinessRelationshipContext",
45-
"TemplateConnectionKey": "PsaConnectionInternalId",
46-
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
47-
"TemplateFilePath": "templateLinkSatelliteViewZeroRecord.handlebars",
48-
"TemplateNotes": ""
49-
},
5042
{
5143
"TemplateName": "100 Data Vault Satellite View Template",
5244
"TemplateType": "Context",
@@ -55,14 +47,6 @@
5547
"TemplateFilePath": "templateSatelliteView.handlebars",
5648
"TemplateNotes": ""
5749
},
58-
{
59-
"TemplateName": "150 Data Vault Satellite View Template With Delivery Key",
60-
"TemplateType": "Context",
61-
"TemplateConnectionKey": "PsaConnectionInternalId",
62-
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
63-
"TemplateFilePath": "templateSatelliteViewWithDeliveryKey.handlebars",
64-
"TemplateNotes": "Regular Satellite pattern extended with delivery key concept."
65-
},
6650
{
6751
"TemplateName": "100 Dimension / PIT Select Template",
6852
"TemplateType": "Presentation",
@@ -111,6 +95,22 @@
11195
"TemplateFilePath": "templateLinkViewNoHash.Handlebars",
11296
"TemplateNotes": ""
11397
},
98+
{
99+
"TemplateName": "150 Data Vault Link-Satellite View Template With Zero Record",
100+
"TemplateType": "NaturalBusinessRelationshipContext",
101+
"TemplateConnectionKey": "PsaConnectionInternalId",
102+
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
103+
"TemplateFilePath": "templateLinkSatelliteViewZeroRecord.handlebars",
104+
"TemplateNotes": ""
105+
},
106+
{
107+
"TemplateName": "150 Data Vault Satellite View Template With Delivery Key",
108+
"TemplateType": "Context",
109+
"TemplateConnectionKey": "PsaConnectionInternalId",
110+
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
111+
"TemplateFilePath": "templateSatelliteViewWithDeliveryKey.handlebars",
112+
"TemplateNotes": "Regular Satellite pattern extended with delivery key concept."
113+
},
114114
{
115115
"TemplateName": "150 Data Vault Satellite View Template With Zero Record",
116116
"TemplateType": "Context",
@@ -366,5 +366,37 @@
366366
"TemplateOutputFileConvention": "{targetDataObject.name}_Test_Sat_StagingMappingCheck.sql",
367367
"TemplateFilePath": "template_test_SAT_StagingMappingCheck.handlebars",
368368
"TemplateNotes": "Data Vault Sat Pattern to create unit test for checking mapping and data completeness between STG and SAT"
369+
},
370+
{
371+
"TemplateName": "100 Landing With Direct Wrapper",
372+
"TemplateType": "StagingArea",
373+
"TemplateConnectionKey": "StagingConnectionInternalId",
374+
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
375+
"TemplateFilePath": "templateLandingWithDirect.handlebars",
376+
"TemplateNotes": "This template performs a full copy of a source data object into the landing area, using a DIRECT wrapper"
377+
},
378+
{
379+
"TemplateName": "100 Landing",
380+
"TemplateType": "StagingArea",
381+
"TemplateConnectionKey": "StagingConnectionInternalId",
382+
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
383+
"TemplateFilePath": "templateLanding.handlebars",
384+
"TemplateNotes": ""
385+
},
386+
{
387+
"TemplateName": "900 Unit Test - Landing Reconciliation",
388+
"TemplateType": "StagingArea",
389+
"TemplateConnectionKey": "StagingConnectionInternalId",
390+
"TemplateOutputFileConvention": "{targetDataObject.name}_TEST_RECON.sql",
391+
"TemplateFilePath": "templateLandingTestReconciliation.handlebars",
392+
"TemplateNotes": ""
393+
},
394+
{
395+
"TemplateName": "Persistent Staging Area Stored Procedure",
396+
"TemplateType": "PersistentStagingArea",
397+
"TemplateConnectionKey": "PsaConnectionInternalId",
398+
"TemplateOutputFileConvention": "{targetDataObject.name}.sql",
399+
"TemplateFilePath": "templatePersistentStaging.handlebars",
400+
"TemplateNotes": "This template expects a full copy of incoming data to be placed in a landing area, and performs a full outer join to detects data changes."
369401
}
370402
]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{#each dataObjectMappings}}
2+
--
3+
-- Landing process for {{targetDataObject.name}}.
4+
--
5+
6+
SELECT
7+
{{#each dataItemMappings}}
8+
[{{sourceDataItems.0.name}}],
9+
{{/each}}
10+
SYSDATETIME() AS [{{../metadataConfiguration.eventDateTimeAttribute}}]
11+
,'I' AS [{{../metadataConfiguration.changeDataCaptureAttribute}}]
12+
,0 AS [{{../metadataConfiguration.etlProcessAttribute}}]
13+
,'0x00' AS [{{../metadataConfiguration.recordChecksumAttribute}}]
14+
FROM [{{sourceDataObjects.0.dataObjectConnection.extensions.1.value}}].[{{sourceDataObjects.0.name}}]
15+
{{/each}}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{{#each dataObjectMappings}}
2+
--
3+
-- Reconciliation Test for {{targetDataObject.name}}.
4+
--
5+
6+
DECLARE @TestId INT;
7+
EXEC [ut].[RegisterTest]
8+
-- Mandatory
9+
@TemplateId = '1',
10+
@Name = 'RECON_STG_{{sourceDataObjects.0.name}}',
11+
-- sample with test procedure
12+
@Debug='Y',
13+
@TestCode = 'BEGIN
14+
-- Framework required (added for unit testing)
15+
--DECLARE @TestResult VARCHAR(10) = ''Fail'';
16+
--DECLARE @TestOutput VARCHAR(MAX);
17+
-- Local
18+
DECLARE @Issues INT = 0;
19+
20+
BEGIN TRY
21+
SELECT @Issues = COUNT(*)
22+
FROM (
23+
SELECT {{#each dataItemMappings}}
24+
[{{sourceDataItems.0.name}}]{{#unless @last}},{{/unless}}{{/each}}
25+
FROM [{{sourceDataObjects.0.dataObjectConnection.extensions.1.value}}].[{{sourceDataObjects.0.name}}] stg
26+
EXCEPT
27+
SELECT {{#each dataItemMappings}}
28+
[{{sourceDataItems.0.name}}]{{#unless @last}},{{/unless}}{{/each}}
29+
FROM [{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}]
30+
) sub
31+
32+
SET @TestOutput = CONVERT(VARCHAR(10),@Issues)+'' issues were found.''
33+
34+
IF @Issues=0
35+
BEGIN
36+
SET @TestResult=''Pass''
37+
END
38+
END TRY
39+
BEGIN CATCH
40+
--THROW
41+
SET @TestOutput = ERROR_MESSAGE();
42+
SET @TestResult=''Fail''
43+
END CATCH
44+
45+
SELECT @TestOutput AS [OUTPUT], @TestResult AS [RESULT]
46+
END ',
47+
@TestObject = '{{targetDataObject.dataObjectConnection.extensions.1.value}}.{{targetDataObject.name}}',
48+
-- Output
49+
@TestId = @TestId OUTPUT;
50+
51+
-- Add DIRECT registration to run from control framework
52+
DECLARE @ModuleId INT;
53+
54+
EXEC [omd].[RegisterModule]
55+
@ModuleCode = 'RECON_STG_{{sourceDataObjects.0.name}}'
56+
,@ModuleAreaCode = 'Maintenance'
57+
,@Executable = 'EXEC [ut].[RunTest] @TestName = ''RECON_STG_{{sourceDataObjects.0.name}}'''
58+
-- Non mandatory
59+
,@ModuleDescription = 'Reconciliation Unit Test'
60+
,@Debug = 'Y'
61+
,@ModuleId = @ModuleId OUTPUT;
62+
63+
PRINT 'The Module Id is: '+CONVERT(VARCHAR(10),@ModuleId)+'.';
64+
65+
-- Example - running the DIRECT Module
66+
-- EXEC omd.RunModule @ModuleCode = 'EXEC omd.RunModule @ModuleCode = 'RECON_STG_CUSTOMER_PERSONAL''
67+
68+
{{/each}}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{{#each dataObjectMappings}}
2+
--
3+
-- Landing process for {{targetDataObject.name}} using a DIRECT wrapper.
4+
--
5+
6+
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'SP_{{targetDataObject.name}}') AND type in (N'P'))
7+
DROP PROCEDURE [SP_{{targetDataObject.name}}];
8+
GO
9+
10+
CREATE OR ALTER PROCEDURE [SP_{{targetDataObject.name}}] @{{../metadataConfiguration.etlProcessAttribute}} INT
11+
AS
12+
13+
TRUNCATE TABLE [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}]
14+
15+
INSERT INTO [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}]
16+
(
17+
[{{../metadataConfiguration.etlProcessAttribute}}],
18+
[{{../metadataConfiguration.eventDateTimeAttribute}}],
19+
[{{../metadataConfiguration.changeDataCaptureAttribute}}],
20+
[{{../metadataConfiguration.recordChecksumAttribute}}],
21+
{{#each dataItemMappings}}
22+
[{{sourceDataItems.0.name}}]{{#unless @last}},{{/unless}}
23+
{{/each}}
24+
)
25+
SELECT
26+
@AUDIT_TRAIL_ID AS [{{../metadataConfiguration.etlProcessAttribute}}]
27+
,SYSDATETIME() AS [{{../metadataConfiguration.eventDateTimeAttribute}}]
28+
,'I' AS [{{../metadataConfiguration.changeDataCaptureAttribute}}]
29+
,0x00 AS [{{../metadataConfiguration.recordChecksumAttribute}}]
30+
{{#each dataItemMappings}}
31+
,[{{sourceDataItems.0.name}}]
32+
{{/each}}
33+
FROM [{{sourceDataObjects.0.dataObjectConnection.extensions.0.value}}].[{{sourceDataObjects.0.dataObjectConnection.extensions.1.value}}].[{{sourceDataObjects.0.name}}]
34+
GO
35+
36+
-- DIRECT module registration
37+
38+
EXEC [900_Direct_Framework].[omd].[RegisterModule]
39+
@ModuleCode = '100_{{targetDataObject.name}}'
40+
,@ModuleAreaCode = 'STG'
41+
,@Executable = 'EXEC [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[SP_{{targetDataObject.name}}] @AUDIT_TRAIL_ID = @ModuleInstanceId'
42+
,@ModuleDescription = 'Source to landing for [{{sourceDataObjects.0.name}}]'
43+
,@ModuleSourceDataObject = '[{{sourceDataObjects.0.dataObjectConnection.extensions.0.value}}].[{{sourceDataObjects.0.dataObjectConnection.extensions.1.value}}].[{{sourceDataObjects.0.name}}]'
44+
,@ModuleTargetDataObject = '[{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}]'
45+
46+
-- Run the process
47+
EXEC [900_Direct_Framework].[omd].[RunModule] @ModuleCode = '100_{{targetDataObject.name}}', @Debug='Y', @ModuleInstanceIdColumnName='AUDIT_TRAIL_ID'
48+
{{/each}}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{{#each dataObjectMappings}}
2+
3+
--
4+
-- PSA DIRECT proces for {{targetDataObject.name}} using a DIRECT wrapper.
5+
--
6+
7+
--
8+
-- Persistent Staging Area Delta Detection Procedure for {{targetDataObject.name}}
9+
--
10+
11+
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'SP_{{targetDataObject.name}}') AND type in (N'P'))
12+
DROP PROCEDURE [SP_{{targetDataObject.name}}];
13+
GO
14+
15+
CREATE PROCEDURE [SP_{{targetDataObject.name}}] @{{../metadataConfiguration.etlProcessAttribute}} INT
16+
AS
17+
18+
WITH STG_CTE AS
19+
(
20+
SELECT
21+
{{#each dataItemMappings}}
22+
[{{sourceDataItems.0.name}}] AS [{{targetDataItem.name}}],
23+
{{/each}}
24+
HASHBYTES('MD5',
25+
{{#each dataItemMappings}}
26+
ISNULL(RTRIM(CONVERT(NVARCHAR(100),[{{sourceDataItems.0.name}}])), 'N/A') + '#~!'{{#unless @last}} +{{/unless}}
27+
{{/each}}
28+
) AS [{{../metadataConfiguration.recordChecksumAttribute}}]
29+
FROM [{{sourceDataObjects.0.dataObjectConnection.extensions.0.value}}].[{{sourceDataObjects.0.dataObjectConnection.extensions.1.value}}].[{{sourceDataObjects.0.name}}]
30+
),
31+
PSA_CTE AS
32+
(
33+
SELECT
34+
A.[{{../metadataConfiguration.recordChecksumAttribute}}] AS [{{../metadataConfiguration.recordChecksumAttribute}}],
35+
{{#each dataItemMappings}}
36+
A.[{{sourceDataItems.0.name}}] AS [{{targetDataItem.name}}]{{#unless @last}},{{/unless}}
37+
{{/each}}
38+
FROM [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}] A
39+
JOIN
40+
(
41+
SELECT {{#each businessKeys}} {{#each businessKeyComponentMapping}}
42+
[{{sourceDataItems.0.name}}], {{/each}} {{/each}}
43+
MAX({{../metadataConfiguration.loadDateTimeAttribute}}) AS MAX_{{../metadataConfiguration.loadDateTimeAttribute}}
44+
FROM [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}] A
45+
GROUP BY {{#each businessKeys}} {{#each businessKeyComponentMapping}}
46+
[{{sourceDataItems.0.name}}] {{#unless @last}},{{/unless}}{{/each}} {{/each}}
47+
) B ON {{#each businessKeys}} {{#each businessKeyComponentMapping}}
48+
A.[{{sourceDataItems.0.name}}] = B.[{{sourceDataItems.0.name}}] AND {{/each}} {{/each}}
49+
A.{{../metadataConfiguration.loadDateTimeAttribute}} = B.MAX_{{../metadataConfiguration.loadDateTimeAttribute}}
50+
WHERE {{../metadataConfiguration.changeDataCaptureAttribute}} != 'D'
51+
)
52+
INSERT INTO [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}]
53+
(
54+
[{{../metadataConfiguration.loadDateTimeAttribute}}],
55+
[{{../metadataConfiguration.sourceRowIdAttribute}}],
56+
[{{../metadataConfiguration.eventDateTimeAttribute}}],
57+
[{{../metadataConfiguration.changeDataCaptureAttribute}}],
58+
[{{../metadataConfiguration.etlProcessAttribute}}],
59+
[{{../metadataConfiguration.recordChecksumAttribute}}],
60+
{{#each dataItemMappings}}
61+
[{{sourceDataItems.0.name}}]{{#unless @last}},{{/unless}}
62+
{{/each}}
63+
)
64+
SELECT
65+
-- Framework columns
66+
SYSDATETIME() [{{../metadataConfiguration.loadDateTimeAttribute}}],
67+
ROW_NUMBER() OVER
68+
(ORDER BY
69+
{{#each businessKeys}}{{#each businessKeyComponentMapping}}CASE WHEN STG_CTE.[{{sourceDataItems.0.name}}] IS NULL THEN PSA_CTE.[{{sourceDataItems.0.name}}] ELSE STG_CTE.[{{sourceDataItems.0.name}}] END{{#unless @last}},{{/unless}}{{/each}}{{/each}}
70+
) AS [{{../metadataConfiguration.sourceRowIdAttribute}}],
71+
SYSDATETIME() [{{../metadataConfiguration.eventDateTimeAttribute}}],
72+
CASE
73+
WHEN STG_CTE.{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}[{{sourceDataItems.0.name}}]{{/if}}{{/each}}{{/each}} IS NULL THEN 'D'
74+
WHEN PSA_CTE.{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}[{{sourceDataItems.0.name}}]{{/if}}{{/each}}{{/each}} IS NULL THEN 'C' --Inserts are also C
75+
WHEN STG_CTE.{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}[{{sourceDataItems.0.name}}]{{/if}}{{/each}}{{/each}} IS NOT NULL
76+
AND PSA_CTE.{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}[{{sourceDataItems.0.name}}]{{/if}}{{/each}}{{/each}} IS NOT NULL
77+
AND STG_CTE.[{{../metadataConfiguration.recordChecksumAttribute}}] != PSA_CTE.[{{../metadataConfiguration.recordChecksumAttribute}}] THEN 'C' ELSE 'No Change'
78+
END AS {{../metadataConfiguration.changeDataCaptureAttribute}},
79+
@AUDIT_TRAIL_ID AS [{{../metadataConfiguration.etlProcessAttribute}}],
80+
CASE
81+
WHEN STG_CTE.{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}[{{sourceDataItems.0.name}}]{{/if}}{{/each}}{{/each}} IS NULL
82+
THEN PSA_CTE.[{{../metadataConfiguration.recordChecksumAttribute}}]
83+
ELSE STG_CTE.[{{../metadataConfiguration.recordChecksumAttribute}}]
84+
END AS [{{../metadataConfiguration.recordChecksumAttribute}}],
85+
-- Regular columns
86+
{{#each dataItemMappings}}
87+
CASE
88+
WHEN STG_CTE.{{#each ../businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}[{{sourceDataItems.0.name}}]{{/if}}{{/each}}{{/each}} IS NULL
89+
THEN PSA_CTE.[{{sourceDataItems.0.name}}]
90+
ELSE STG_CTE.[{{sourceDataItems.0.name}}]
91+
END AS [{{sourceDataItems.0.name}}]{{#unless @last}},{{/unless}}{{/each}}
92+
FROM STG_CTE
93+
FULL OUTER JOIN PSA_CTE ON {{#each businessKeys}} {{#each businessKeyComponentMapping}}
94+
PSA_CTE.[{{sourceDataItems.0.name}}] = STG_CTE.[{{sourceDataItems.0.name}}]{{#unless @last}} AND{{/unless}}{{/each}} {{/each}}
95+
WHERE
96+
(
97+
CASE
98+
WHEN {{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}STG_CTE.[{{sourceDataItems.0.name}}] IS NULL THEN 'D'{{/if}}{{/each}}{{/each}}
99+
WHEN {{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}PSA_CTE.[{{sourceDataItems.0.name}}] IS NULL THEN 'C'{{/if}}{{/each}}{{/each}}
100+
WHEN {{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#if @first}}PSA_CTE.[{{sourceDataItems.0.name}}] IS NOT NULL AND PSA_CTE.{{sourceDataItems.0.name}} IS NOT NULL AND STG_CTE.[{{../../../metadataConfiguration.recordChecksumAttribute}}] != PSA_CTE.[{{../../../metadataConfiguration.recordChecksumAttribute}}] THEN 'C'{{/if}}{{/each}}{{/each}}
101+
ELSE 'No Change'
102+
END
103+
) != 'No Change'
104+
105+
SELECT @@ROWCOUNT AS ROWS_INSERTED
106+
GO
107+
108+
EXEC [900_Direct_Framework].[omd].[RegisterModule]
109+
@ModuleCode = '150_{{targetDataObject.name}}'
110+
,@ModuleAreaCode = 'PSA'
111+
,@Executable = 'EXEC [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[SP_{{targetDataObject.name}}] @AUDIT_TRAIL_ID = @ModuleInstanceId'
112+
,@ModuleDescription = 'Persistent Staging Area process for [{{sourceDataObjects.0.name}}]'
113+
,@ModuleSourceDataObject = '[{{sourceDataObjects.0.dataObjectConnection.extensions.0.value}}].[{{sourceDataObjects.0.dataObjectConnection.extensions.1.value}}].[{{sourceDataObjects.0.name}}]'
114+
,@ModuleTargetDataObject = '[{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}]'
115+
116+
-- Run the process
117+
EXEC [900_Direct_Framework].[omd].[RunModule] @ModuleCode = '150_{{targetDataObject.name}}', @Debug='Y', @ModuleInstanceIdColumnName='AUDIT_TRAIL_ID'
118+
{{/each}}

Virtual_EDW/Templates/templateSatelliteViewWithDeliveryKey.Handlebars

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ SELECT
5858
{{#each dataItemMappings}}{{#each targetDataItem.dataItemClassification}}{{#if classification}}{{../targetDataItem.name}},{{/if}}{{/each}}{{/each}}
5959
{{../metadataConfiguration.loadDateTimeAttribute}},
6060
{{../metadataConfiguration.sourceRowIdAttribute}}
61-
) AS DATA_DELIVERY_KEY
61+
) AS DATA_DELIVERY_KEY,
62+
CONVERT(NUMERIC(38,0), LEFT(REPLACE(REPLACE(REPLACE(REPLACE(CONVERT(CHAR(27), CAST(STATE_TIMESTAMP AS DATETIME2(7))), '-', ''), ' ', ''), ':', ''), '.', ''), 21)
63+
+ RIGHT('0000000000' + CONVERT(VARCHAR(38), 1), 10)
64+
+ RIGHT('0000000' + CONVERT(VARCHAR(38), {{../metadataConfiguration.sourceRowIdAttribute}}), 7)
65+
) AS STATE_TIMESTAMP_KEY
6266
FROM
6367
(
6468
SELECT

Virtual_EDW/Virtual_Data_Warehouse.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
<StartupObject>Virtual_Data_Warehouse.Program</StartupObject>
6161
<PlatformTarget>x64</PlatformTarget>
6262
</PropertyGroup>
63+
<ItemGroup>
64+
<None Remove="Templates\templateLanding.Handlebars" />
65+
<None Remove="Templates\templateLandingTestReconciliation.Handlebars" />
66+
<None Remove="Templates\templateLandingWithDirect.Handlebars" />
67+
</ItemGroup>
6368
<ItemGroup>
6469
<Reference Include="TEAM_Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
6570
<SpecificVersion>False</SpecificVersion>
@@ -85,6 +90,15 @@
8590
<Content Include="Templates\templateHubView_DBT_Snowflake.Handlebars">
8691
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
8792
</Content>
93+
<Content Include="Templates\templateLanding.Handlebars">
94+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
95+
</Content>
96+
<Content Include="Templates\templateLandingTestReconciliation.Handlebars">
97+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
98+
</Content>
99+
<Content Include="Templates\templateLandingWithDirect.Handlebars">
100+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
101+
</Content>
88102
<Content Include="Templates\templateLinkInsertInto.Handlebars">
89103
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
90104
</Content>

0 commit comments

Comments
 (0)