Skip to content

Commit

Permalink
v1.2.2 dev extract template re-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
robjharrison committed Oct 8, 2024
1 parent 8d4270a commit 7b3fbf1
Show file tree
Hide file tree
Showing 7 changed files with 4,993 additions and 660 deletions.
4,300 changes: 4,300 additions & 0 deletions deployment_extracts/cmsname_dbtype_ssd_template_v1.2.2_1_20240926.sql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ DECLARE @schema_name NVARCHAR(128) = N'ssd_development'; -- set your schema n
-- META-ELEMENT: {"type": "test"}
DECLARE @TableName NVARCHAR(128) = N'table_name_placeholder'; -- Note: also/seperately use of @table_name in non-test|live elements of script.


-- META-END

/* ********************************************************************************************************** */
Expand Down Expand Up @@ -420,7 +419,7 @@ IF OBJECT_ID('tempdb..#ssd_family') IS NOT NULL DROP TABLE #ssd_family;

-- META-ELEMENT: {"type": "create_table"}
CREATE TABLE ssd_development.ssd_family (
fami_table_id NVARCHAR(48) PRIMARY KEY, -- metadata={"item_ref":"FAMI003A"}
fami_table_id NVARCHAR(48) PRIMARY KEY, -- metadata={"item_ref":"FAMI003A"}
fami_family_id NVARCHAR(48), -- metadata={"item_ref":"FAMI001A"}
fami_person_id NVARCHAR(48) -- metadata={"item_ref":"FAMI002A"}
);
Expand All @@ -432,12 +431,19 @@ INSERT INTO ssd_development.ssd_family (
fami_family_id,
fami_person_id
)



SELECT
fc.EXTERNAL_ID AS fami_table_id,
fc.DIM_LOOKUP_FAMILYOFRESIDENCE_ID AS fami_family_id,
fc.DIM_PERSON_ID AS fami_person_id

FROM HDM.Child_Social.FACT_CONTACTS AS fc




WHERE EXISTS
( -- only ssd relevant records
SELECT 1
Expand Down
Loading

0 comments on commit 7b3fbf1

Please sign in to comment.