Skip to content

Commit

Permalink
Add vax-data ingestion pipeline (#1)
Browse files Browse the repository at this point in the history
* Updating pipeline: Ingest Vax Data
Updating pipeline: OD 2 SQL
Updating pipeline: PCM-DPC 2 SQL
Adding pipeline: Data Ingestion

* Adding linkedService: DPC GitHub

* Adding linkedService: Italia OD GitHub

* Updating dataset: GithubDPC
Updating dataset: GithubOD

* Deleting linkedService: GithubHTTPS

* Updating linkedService: DPC GitHub

* Updating pipeline: Ingest Pandemic Data
Updating pipeline: PCM-DPC 2 SQL

* Adding trigger: DBUpdate
  • Loading branch information
fabriziomiano authored Oct 26, 2021
1 parent 68d341f commit 6210528
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 41 deletions.
2 changes: 1 addition & 1 deletion dataset/GithubDPC.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "GithubDPC",
"properties": {
"linkedServiceName": {
"referenceName": "GithubHTTPS",
"referenceName": "DPC GitHub",
"type": "LinkedServiceReference"
},
"parameters": {
Expand Down
2 changes: 1 addition & 1 deletion dataset/GithubOD.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "GithubOD",
"properties": {
"linkedServiceName": {
"referenceName": "GithubHTTPS",
"referenceName": "Italia OD GitHub",
"type": "LinkedServiceReference"
},
"parameters": {
Expand Down
12 changes: 12 additions & 0 deletions linkedService/DPC GitHub.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "DPC GitHub",
"properties": {
"annotations": [],
"type": "HttpServer",
"typeProperties": {
"url": "https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/",
"enableServerCertificateValidation": true,
"authenticationType": "Anonymous"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "GithubHTTPS",
"name": "Italia OD GitHub",
"properties": {
"annotations": [],
"type": "HttpServer",
Expand Down
87 changes: 87 additions & 0 deletions pipeline/Data Ingestion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"name": "Data Ingestion",
"properties": {
"activities": [
{
"name": "Ingest Pandemic Data",
"type": "ExecutePipeline",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"pipeline": {
"referenceName": "Ingest Pandemic Data",
"type": "PipelineReference"
},
"waitOnCompletion": true
}
},
{
"name": "Ingest Vax Data",
"type": "ExecutePipeline",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"pipeline": {
"referenceName": "Ingest Vax Data",
"type": "PipelineReference"
},
"waitOnCompletion": true
}
},
{
"name": "Wait ingestion",
"type": "Wait",
"dependsOn": [
{
"activity": "Ingest Pandemic Data",
"dependencyConditions": [
"Succeeded"
]
},
{
"activity": "Ingest Vax Data",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"waitTimeInSeconds": 1
}
},
{
"name": "Transform administrations data",
"type": "SqlServerStoredProcedure",
"dependsOn": [
{
"activity": "Wait ingestion",
"dependencyConditions": [
"Succeeded"
]
}
],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"storedProcedureName": "[dbo].[UpdateAdminsData]"
},
"linkedServiceName": {
"referenceName": "AzureSqlDatabase",
"type": "LinkedServiceReference",
"parameters": {
"SchemaName": "dbo",
"TableName": "somministrazioni-vaccini-latest"
}
}
}
],
"annotations": []
}
}
7 changes: 4 additions & 3 deletions pipeline/Ingest Pandemic Data.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
},
"waitOnCompletion": true,
"parameters": {
"TableName": "REGIONI"
"DPCDirectory": "dati-regioni",
"DPCFileName": "dpc-covid19-ita-regioni.csv",
"SchemaName": "dbo"
}
}
},
Expand All @@ -50,8 +52,7 @@
"parameters": {
"DPCDirectory": "dati-province",
"DPCFileName": "dpc-covid19-ita-province.csv",
"SchemaName": "dbo",
"TableName": "PROVINCE"
"SchemaName": "dbo"
}
}
}
Expand Down
31 changes: 0 additions & 31 deletions pipeline/Ingest Vax Data.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,6 @@
"SchemaName": "dbo"
}
}
},
{
"name": "Update administrations data",
"type": "SqlServerStoredProcedure",
"dependsOn": [
{
"activity": "Ingest Vax Administrations Data",
"dependencyConditions": [
"Succeeded"
]
}
],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"storedProcedureName": "[dbo].[UpdateAdminsData]"
},
"linkedServiceName": {
"referenceName": "AzureSqlDatabase",
"type": "LinkedServiceReference",
"parameters": {
"SchemaName": "dbo",
"TableName": "somministrazioni-vaccini-latest"
}
}
}
],
"annotations": []
Expand Down
2 changes: 1 addition & 1 deletion pipeline/OD 2 SQL.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
}
},
"folder": {
"name": "General Purpose"
"name": "Copy Activities"
},
"annotations": []
}
Expand Down
6 changes: 3 additions & 3 deletions pipeline/PCM-DPC 2 SQL.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@
"parameters": {
"DPCDirectory": {
"type": "string",
"defaultValue": "dati-regioni"
"defaultValue": "dati-andamento-nazionale"
},
"DPCFileName": {
"type": "string",
"defaultValue": "dpc-covid19-ita-regioni.csv"
"defaultValue": "dpc-covid19-ita-andamento-nazionale.csv"
},
"SchemaName": {
"type": "string",
"defaultValue": "dbo"
}
},
"folder": {
"name": "General Purpose"
"name": "Copy Activities"
},
"annotations": []
}
Expand Down
25 changes: 25 additions & 0 deletions trigger/DBUpdate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "DBUpdate",
"properties": {
"annotations": [],
"runtimeState": "Stopped",
"pipeline": {
"pipelineReference": {
"referenceName": "Data Ingestion",
"type": "PipelineReference"
}
},
"type": "TumblingWindowTrigger",
"typeProperties": {
"frequency": "Hour",
"interval": 24,
"startTime": "2021-10-27T18:45:00Z",
"delay": "00:00:00",
"maxConcurrency": 50,
"retryPolicy": {
"intervalInSeconds": 30
},
"dependsOn": []
}
}
}

0 comments on commit 6210528

Please sign in to comment.