Skip to content
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.

added most fhir resources to table generation ymp files and looping for data factory #41

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
1,187 changes: 1,147 additions & 40 deletions Configuration-Generator/propertiesGroupConfig.yml

Large diffs are not rendered by default.

1,417 changes: 1,397 additions & 20 deletions Configuration-Generator/resourcesConfig.yml

Large diffs are not rendered by default.

Binary file not shown.
113 changes: 79 additions & 34 deletions Scripts/DeployCdmToSynapsePipeline.ps1
Original file line number Diff line number Diff line change
@@ -1,34 +1,79 @@
param (
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$Config
)

$configContent = (Get-Content $Config) | ConvertFrom-Json

# Deploy CDM to synapse pipelines

Write-Host "Deploying..."
$count = 0
foreach ($entity in $configContent.TemplateParameters.Entities){
$count++
Write-Host "Deploy the $entity [$($count)/$($configContent.TemplateParameters.Entities.count)]"

$templateParameters = @{
DataFactoryName = $configContent.TemplateParameters.DataFactoryName; `
SynapseWorkspace =$configContent.TemplateParameters.SynapseWorkspace; `
DedicatedSqlPool = $configContent.TemplateParameters.DedicatedSqlPool; `
AdlsAccountForCdm = $configContent.TemplateParameters.AdlsAccountForCdm; `
CdmRootLocation = $configContent.TemplateParameters.CdmRootLocation; `
StagingContainer = $configContent.TemplateParameters.StagingContainer; `
CdmLocalEntity = $entity
}

New-AzResourceGroupDeployment `
-Name DeployLocalTemplate `
-ResourceGroupName $configContent.ResourceGroup `
-TemplateFile $configContent.TemplateFilePath `
-TemplateParameterObject $templateParameters `
-verbose
}
Write-Host "Complete!"
param (
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$Config,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$ConfigM,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$ConfigL
)

$configContentM = (Get-Content $ConfigM) | ConvertFrom-Json
$configContent = (Get-Content $Config) | ConvertFrom-Json
$configContentL = (Get-Content $ConfigL) | ConvertFrom-Json
$groupCount = 40
$j = $groupCount

# Deploy CDM to synapse pipelines

Write-Host "Deploying Master..."

$templateParametersM = @{
DataFactoryName = $configContentM.TemplateParameters.DataFactoryName; `
MasterPipelineName = $configContentM.TemplateParameters.MasterPipelineName;
}

New-AzResourceGroupDeployment `
-Name DeployLocalTemplateM `
-ResourceGroupName $configContentM.ResourceGroup `
-TemplateFile $configContentM.TemplateFilePath `
-TemplateParameterObject $templateParametersM `
-verbose

Write-Host "Deploying Children..."

$count = 0
foreach ($entity in $configContent.TemplateParameters.Entities){
$count++
Write-Host "Deploy the $entity [$($count)/$($configContent.TemplateParameters.Entities.count)]"

$templateParameters = @{
DataFactoryName = $configContent.TemplateParameters.DataFactoryName; `
SynapseWorkspace =$configContent.TemplateParameters.SynapseWorkspace; `
DedicatedSqlPool = $configContent.TemplateParameters.DedicatedSqlPool; `
AdlsAccountForCdm = $configContent.TemplateParameters.AdlsAccountForCdm; `
CdmRootLocation = $configContent.TemplateParameters.CdmRootLocation; `
StagingContainer = $configContent.TemplateParameters.StagingContainer; `
MasterPipelineName = $configContent.TemplateParameters.MasterPipelineName; `
CdmLocalEntity = $entity;
}

New-AzResourceGroupDeployment `
-Name DeployLocalTemplate `
-ResourceGroupName $configContent.ResourceGroup `
-TemplateFile $configContent.TemplateFilePath `
-TemplateParameterObject $templateParameters `
-verbose
}

Write-Host "Deploying Loop..."

for($i = 0; $i -le ($configContentL.TemplateParameters.Entities).length; ($i = $i + $groupCount), ($j = $j + $groupCount)){

$templateParameters = @{
DataFactoryName = $configContentL.TemplateParameters.DataFactoryName; `
MasterPipelineName = $configContentL.TemplateParameters.MasterPipelineName; `
CdmLocalEntities = $configContentL.TemplateParameters.Entities[$i..$j];
}

New-AzResourceGroupDeployment `
-Name DeployLocalTemplateL `
-ResourceGroupName $configContentL.ResourceGroup `
-TemplateFile $configContentL.TemplateFilePath `
-TemplateParameterObject $templateParameters `
-verbose
}

Write-Host "Complete!"
27 changes: 14 additions & 13 deletions Scripts/config.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Scripts/configLoop.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Scripts/configMaster.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"ResourceGroup": "{yourresgrp}",
"TemplateFilePath": "../Templates/cdmToSynapseMaster.json",
"TemplateParameters": {
"DataFactoryName": "{yourdfname}",
"MasterPipelineName": "Cdm2Synapse-MasterPipeline"
}
}
Loading