From ce14b714ef73c19ce92bd848c3e32413582edb48 Mon Sep 17 00:00:00 2001 From: Paul Andrew <60190428+mrpaulandrew@users.noreply.github.com> Date: Sat, 26 Feb 2022 10:18:40 +0000 Subject: [PATCH] Updating pipeline: 04 - Upload - From Metadata Adding dataset: LaptopFilesBinary Updating dataset: LakeFilesBinary --- Code/DataFactory/dataset/LakeFilesBinary.json | 21 +++++++++-- .../dataset/LaptopFilesBinary.json | 35 +++++++++++++++++++ .../pipeline/04 - Upload - From Metadata.json | 13 +++++++ 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 Code/DataFactory/dataset/LaptopFilesBinary.json diff --git a/Code/DataFactory/dataset/LakeFilesBinary.json b/Code/DataFactory/dataset/LakeFilesBinary.json index 479331e..45fe69e 100644 --- a/Code/DataFactory/dataset/LakeFilesBinary.json +++ b/Code/DataFactory/dataset/LakeFilesBinary.json @@ -2,9 +2,17 @@ "name": "LakeFilesBinary", "properties": { "linkedServiceName": { - "referenceName": "traininglak01", + "referenceName": "traininglake01", "type": "LinkedServiceReference" }, + "parameters": { + "Directory": { + "type": "string" + }, + "File": { + "type": "string" + } + }, "folder": { "name": "Lake" }, @@ -12,7 +20,16 @@ "type": "Binary", "typeProperties": { "location": { - "type": "AzureBlobFSLocation" + "type": "AzureBlobFSLocation", + "fileName": { + "value": "@dataset().File", + "type": "Expression" + }, + "folderPath": { + "value": "@dataset().Directory", + "type": "Expression" + }, + "fileSystem": "datawarehouse" } } } diff --git a/Code/DataFactory/dataset/LaptopFilesBinary.json b/Code/DataFactory/dataset/LaptopFilesBinary.json new file mode 100644 index 0000000..0fdba76 --- /dev/null +++ b/Code/DataFactory/dataset/LaptopFilesBinary.json @@ -0,0 +1,35 @@ +{ + "name": "LaptopFilesBinary", + "properties": { + "linkedServiceName": { + "referenceName": "LaptopFiles", + "type": "LinkedServiceReference" + }, + "parameters": { + "Directory": { + "type": "string" + }, + "File": { + "type": "string" + } + }, + "folder": { + "name": "Laptop" + }, + "annotations": [], + "type": "Binary", + "typeProperties": { + "location": { + "type": "FileServerLocation", + "fileName": { + "value": "@dataset().File", + "type": "Expression" + }, + "folderPath": { + "value": "@dataset().Directory", + "type": "Expression" + } + } + } + } +} \ No newline at end of file diff --git a/Code/DataFactory/pipeline/04 - Upload - From Metadata.json b/Code/DataFactory/pipeline/04 - Upload - From Metadata.json index 068db8c..9fdda9d 100644 --- a/Code/DataFactory/pipeline/04 - Upload - From Metadata.json +++ b/Code/DataFactory/pipeline/04 - Upload - From Metadata.json @@ -162,6 +162,19 @@ } } ] + }, + { + "name": "Switch1", + "type": "Switch", + "dependsOn": [], + "userProperties": [], + "typeProperties": { + "on": { + "value": "@substring(item().FileName,add(indexof(item().FileName,'.'),1),sub(length(item().FileName),add(indexof(item().FileName,'.'),1)))", + "type": "Expression" + }, + "cases": [] + } } ] }