Data Factory > azure-storage-blob-put β
TL;DR;
This task allow to put files on a given Azure Blob Storage account.
Name:
Max execution time: 120 mins
Target β
Put/add a file on an Azure storage account.
Example of use in a job β
- Generate Zip files and upload them to an Azure Blob Storage account
md
1. Export items - Exports items from a user selection
2. XSLT - Define the zips to be generated
3. Generate archive - Generates archives
4. XSLT - Defines the files to be uploaded to the Azure storage account
5. Azure Storage Put - Places the aforementioned images on the target storage account1
2
3
4
5
2
3
4
5
- Places the images of an item in an Azure storage account
md
1. Export items - Exports items from a user selection
2. XSLT - Define the items whose images can/should be uploaded to the storage account
3. XSLT - Builds the XML document expected by the Azure Storage Put task
4. Azure Storage Put - Places the aforementioned images on the target storage account1
2
3
4
2
3
4
Inputs and Outputs β
json
{
"name": "azure-storage-blob-put",
"taskReferenceName": "azure_put",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"authenticationMode": "SHARED_KEY",
"sharedKey": "",
"account": "",
"container": "",
"request": ""
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
Inputs β
TIP
If at least one task parameter (whether mandatory or not) is invalid, task execution is stopped and the returned status is FAILED. For example:
- The proposed value for the
connectionStringproperty is invalid.
| Property | Description |
|---|---|
authenticationMode | Mandatory β Enum - CONNECTION_STRING; SHARED_KEY, SAS_TOKEN |
connectionString | Mandatory if authenticationMode = CONNECTION_STRING - String See Configure Azure Storage connection strings Ex: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xN... |
sharedKey | Mandatory if authenticationMode = SHARED_KEY - String Ex: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== |
sasToken | Mandatory if authenticationMode = SAS_TOKEN - String Ex: sv=2015-04-05&sr=b&si=tutorial-policy-635959936145100803&sig=9aCzs76n0E7y5BpEi2GvsSv433BZa22leDOZXX%2BXXIU%3D |
account | Mandatory if authenticationMode = SHARED_KEY or authenticationMode = SAS_TOKEN - String |
container | Mandatory |
request | Mandatory - File See below |
Outputs β
TIP
The outputs of the task defined below are always available if the task completes its execution (status COMPLETED and FAILED). If the task is stopped before the end of its execution (if the task is canceled by the user for example - CANCELED status, or if it exceeds the authorized execution time - TIMED_OUT), the outputs are not available.
| Property | Description |
|---|---|
report | File An XML file, see below |
allFilesUploaded | Enum - YES, NOYES if all the files indicated in request have been successfully uploaded to the target storage account |
Example of an input request file β
xml
<Azure-Storage-Blob-Put>
<File>
<Url>https://prodstoragevazc.blob.core.windows.net/images/ee0c68fabf0a2b3c76b2643bff3cc215030f0caf.jpg</Url>
<Name>img/products-1.jpg</Name>
<Metadata>
<ean>1234567890123</ean>
<hash>8cca35ef9731da58ba0826e01e2c9047e41ba3e8692282de7999bf601d7adc88</hash>
</Metadata>
</File>
<File>
<Url>https://prodstoragevazc.blob.core.windows.net/images/7a597747dbc536e53eeb47760b5145d002b5bc25.jpg</Url>
<Name>img/products-2.jpg</Name>
<Metadata>
<ean>1234567890123</ean>
<hash>8cca35ef9731da58ba0826e01e2c9047e41ba3e8692282de7999bf601d7adc87</hash>
</Metadata>
</File>
</Azure-Storage-Blob-Put>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| XPath | Description | Occurrence |
|---|---|---|
Azure-Storage-Blob-Put | Root | 1 |
File | For each file to move | 0..* |
Url | The resource url to put | 1 |
Name | Target full path with extension The name must not start with a /. | 1 |
Metadata | A tag users can use to put anything in (see above). A metadata must be in lowercase, without space nor dash | 0..1 |
Example of an output report file β
xml
<Azure-Storage-Blob-Put-Report>
<File>
<Url>https://prodstoragevazc.blob.core.windows.net/images/ee0c68fabf0a2b3c76b2643bff3cc215030f0caf.jpg</Url>
<Name>img/products-1.jpg</Name>
<Response>
<Content-MD5></Content-MD5>
<Date></Date>
<Error-Code></Error-Code>
<Last-Modified></Last-Modified>
<Metadata>
<ean>1234567890123</ean>
<hash>8cca35ef9731da58ba0826e01e2c9047e41ba3e8692282de7999bf601d7adc87</hash>
</Metadata>
</Response>
</File>
<File>
<Url>https://prodstoragevazc.blob.core.windows.net/images/7a597747dbc536e53eeb47760b5145d002b5bc25.jpg</Url>
<Name>img/products-2.jpg</Name>
<Response>
<Content-MD5></Content-MD5>
<Date></Date>
<Error-Code></Error-Code>
<Last-Modified></Last-Modified>
<Metadata>
<ean>1234567890123</ean>
<hash>8cca35ef9731da58ba0826e01e2c9047e41ba3e8692282de7999bf601d7adc87</hash>
</Metadata>
</Response>
</File>
</Azure-Storage-Blob-Put-Report>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| XPath | Description | Occurrence |
|---|---|---|
Azure-Storage-Blob-Put-Report | Root | 1 |
File | For each file uploaded (successful or error) | 0..* |
URL | The full URL of the resource listed in the request file | 1 |
Name | The full path with destination extension | 1 |
Response | The response formulated by the Azure API | 1 |
Response/ Content-MD5 | The md5 of the drop file generated by Azure | 1 |
Response/Date | The date on which this response was formulated (UTC format) | 1 |
Response/Error-Code | 1 | |
Response/Last-Modified | Date the blob was last modified | 1 |
Response/Metadata | 1 |
Limits and recommendations β
| Element | Description | Limitation | Recommendation |
|---|---|---|---|
| Number of files | 1000 | 100 | |
| Max file size | 2Go | ||
| Total max file size | 20Go |