From ce3cce80a8ae6434caf934e7baa601ba36c41874 Mon Sep 17 00:00:00 2001 From: Cesar Hernandez Date: Tue, 17 Apr 2018 13:16:05 -0700 Subject: [PATCH 1/3] blob events trigger --- .../entityTypes/Trigger.json | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json index e0ab1a2bd29d..bcd91c2bc0f4 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json @@ -275,6 +275,65 @@ "typeProperties" ] }, + "BlobEventsTrigger": + { + "description": "Trigger that runs everytime a Blob event occurs.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/MultiplePipelineTrigger" + } + ], + "properties": { + "typeProperties": + { + "description": "Blob Events Trigger properties", + "x-ms-client-flatten": true, + "properties": { + "blobPath": { + "description": "path to container, folder, blob, or file extension for which events can trigger the pipeline.", + "type": "string" + }, + "events": { + "description": "the type of events for which we want to trigger the pipeline.", + "$ref": "#/definitions/BlobEventTypes" + }, + "scope": { + "description": "the resource id of the Storage Account.", + "type": "string" + }, + "maxConcurrency": { + "description": "the max number of parallel events to handle when it is triggered.", + "type": "integer" + } + }, + "required": [ + "blobPath", + "events", + "scope", + "maxConcurrency" + ] + } + }, + "required": [ + "typeProperties" + ] + }, + "BlobEventTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "blobCreated", + "blobDeleted" + ], + "x-ms-enum": { + "name": "BlobEventTypes", + "modelAsString": true + } + }, + "description": "blob event types" + }, "TumblingWindowTrigger": { "description": "Trigger that schedules pipeline runs for all fixed time interval windows from a start time without gaps and also supports backfill scenarios (when start time is in the past).", "type": "object", From af2af5124c1789a46dce1086f97b9e7a6e2b2928 Mon Sep 17 00:00:00 2001 From: Cesar Hernandez Date: Thu, 3 May 2018 15:39:26 -0700 Subject: [PATCH 2/3] address review feedback --- .../entityTypes/Trigger.json | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json index bcd91c2bc0f4..53dd3bcaafbc 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json @@ -287,31 +287,26 @@ "properties": { "typeProperties": { - "description": "Blob Events Trigger properties", + "description": "Blob Events Trigger properties.", "x-ms-client-flatten": true, "properties": { "blobPath": { - "description": "path to container, folder, blob, or file extension for which events can trigger the pipeline.", + "description": "Expression to determine if trigger should fire. For example, @startswith('/records/blobs/december/') will only fire the trigger for blobs in the december folder under the records container.", "type": "string" }, "events": { - "description": "the type of events for which we want to trigger the pipeline.", + "description": "The type of events that cause this trigger to fire.", "$ref": "#/definitions/BlobEventTypes" }, "scope": { - "description": "the resource id of the Storage Account.", + "description": "The ARM resource ID of the Storage Account.", "type": "string" - }, - "maxConcurrency": { - "description": "the max number of parallel events to handle when it is triggered.", - "type": "integer" } }, "required": [ "blobPath", "events", - "scope", - "maxConcurrency" + "scope" ] } }, @@ -324,15 +319,15 @@ "items": { "type": "string", "enum": [ - "blobCreated", - "blobDeleted" + "Microsoft.Storage.BlobCreated", + "Microsoft.Storage.BlobDeleted" ], "x-ms-enum": { "name": "BlobEventTypes", "modelAsString": true } }, - "description": "blob event types" + "description": "Blob event types." }, "TumblingWindowTrigger": { "description": "Trigger that schedules pipeline runs for all fixed time interval windows from a start time without gaps and also supports backfill scenarios (when start time is in the past).", From 31a95abf24bd5a79c06d22c611e949e83d0d41c2 Mon Sep 17 00:00:00 2001 From: Cesar Hernandez Date: Thu, 10 May 2018 11:01:53 -0700 Subject: [PATCH 3/3] resolve blob path property issue --- .../preview/2017-09-01-preview/entityTypes/Trigger.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json index 53dd3bcaafbc..921b0da9c4da 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/preview/2017-09-01-preview/entityTypes/Trigger.json @@ -290,8 +290,12 @@ "description": "Blob Events Trigger properties.", "x-ms-client-flatten": true, "properties": { - "blobPath": { - "description": "Expression to determine if trigger should fire. For example, @startswith('/records/blobs/december/') will only fire the trigger for blobs in the december folder under the records container.", + "blobPathBeginsWith": { + "description": "The blob path must begin with the pattern provided for trigger to fire. For example, '/records/blobs/december/' will only fire the trigger for blobs in the december folder under the records container. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith.", + "type": "string" + }, + "blobPathEndsWith": { + "description": "The blob path must end with the pattern provided for trigger to fire. For example, 'december/boxes.csv' will only fire the trigger for blobs named boxes in a december folder. At least one of these must be provided: blobPathBeginsWith, blobPathEndsWith.", "type": "string" }, "events": { @@ -304,7 +308,6 @@ } }, "required": [ - "blobPath", "events", "scope" ]