Data Factory > file-generation-archive β
WARNING
The full documentation of the behavior of this task is detailed in the Learning Center.
TL;DR;
This task allows generating one or more archives.
Name:
Max execution time: 120 mins
Technical notes β
- This task uses the tool provided by
7zip. More details on how compression methods or levels work can be found here - An XSD validation is performed on the request file. The XSD file is available here. If validation fails, an
INVALID_XMLlog is added to the report.
Appendices β
- Jobs example: data-factory-job-collection/By Tasks/file-generation-archive
- Fix for creating empty zips: support-desk/issues/173
Execution Report Details β
General notes β
- The report follows the execution report standard structure.
Example β
xml
<Report task="file-generation-archive" start-at="2023-01-20T13:27:54.810Z" task-cid="..." job-cid="..." end-at="2023-01-20T13:28:51.414Z" duration-ms="56604">
<Input name="request">(l'url du fichier request)</Input>
<Input name="allowPartial">(true|false)</Input>
<Log type="warning" code="INVALID_FILE_PATH">
<Metadata name="xpath"></Metadata>
<Metadata name="path">/abc,,,,/a.jpg</Metadata>
<Message>the file path provided is invalid: /abc,,,,/a.jpg</Message>
</Log>
</Report>1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Available logs β
- For following logs, whatever the severity
info,warningouerror, the task finale status is success. The task ends up in error only when an unknown error is encountered (ie. an error not listed below).
| Code | Message | Metadata | Type | Remarks |
|---|---|---|---|---|
| ARCHIVE_GENERATED | The archive "{archiveName}" has been generated with success. | archiveName: The archive name | info | This log is added for each archive generated. |
| ARCHIVE_NOT_GENERATED | The archive "{archive name}" has not been generated. | archiveName: The archive name | warning | This log is always added when an archive has not been generated, even if the archive is not generated because of an error detailed below. |
| FILENAME_ALREADY_EXISTS | The file "{filename}" already exists in the archive "{archive name}". The file was therefore not added again to the archive | filename: The file name archiveName: The archive name | warning | In this case, if allowPartial=false, then the archive is not generated, if allowPartial=true, the archive is generated but the file is not added to it. |
| URL_NOT_REACHABLE | The url "`{filePath}" is unreachable. | archiveName: The archive name, url: L'url, httpStatusCode | warning | In this case, if allowPartial=false, then the archive is not generated, if allowPartial=true, the archive is genèrated but the file is not added to it. |
| ARCHIVE_MUST_NOT_BE_EMPTY | The archive "{archive name}" must not be empty. | archiveName: The archive name | error | gzip archive must not be empty. In this case, the task does not end in error, the archive is simply not generated. However, it is possible to create empty zip, 7z and tar archives. |
| INVALID_XML | The xml is not valid. | error | Before the task is executed, an xsd validation is performed on the xml. If the xml is not valid, the task ends in error. In this case, no archive is generated. However, an execution report is provided. | |
| INVALID_INPUT | The parameter is not valid: {inputName} | inputName: The input name, inputValue: The input value | error | This error occurs when an invalid input is provided. In this case, the archive is not generated. More information below. |
Details regarding the log INVALID_INPUT, the following case are covered:
| Case | Message | Metadata | Remarks |
|---|---|---|---|
allowPartial is empty / not valid | The parameter is not valid: | inputName=allowPartial, inputValue={provided value} | In this case, the task end in error, no archive are generated, an execution report is generated. |
request is empty / not a valid file path | The parameter is not valid: | inputName=request, inputValue={provided value} | In this case, the task end in error, no archive are generated, an execution report is generated. |
| A value in the XML is not valid (empty when mandatory / not a valid value) | The parameter is not valid: | inputName={inputName}, inputValue={provided value}, xpath={xpath} | In this case, the archive is not generated, an execution report is generated, the task end in success. |
Backwards compatibility β
Previously, the Archives and Archive tags were named Zips and Zip respectively. Although considered deprecated, the Zips and Zip tags remain allowed and usable within this Data Factory task.
WARNING
If the Zips and Zip tags are accompanied by the Archives and Archive tags, the latter will be considered.
The example below...
xml
<Zips>
<Archive>
<File-Name>A.zip</File-Name>
<Files>
<File>
<Path>/folder-1/image-1.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/ee0c68fabf0a2b3c76b2643bff3cc215030f0caf.jpg</Url>
</File>
<File>
<Path>/image-2.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/7a597747dbc536e53eeb47760b5145d002b5bc25.jpg</Url>
</File>
</Files>
</Archive>
<Zip>
<File-Name>C.zip</File-Name>
<Files>
<File>
<Path>/folder-1/image-1.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/ee0c68fabf0a2b3c76b2643bff3cc215030f0caf.jpg</Url>
</File>
<File>
<Path>/image-2.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/7a597747dbc536e53eeb47760b5145d002b5bc25.jpg</Url>
</File>
</Files>
</Zip>
</Zips>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
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
... is interpreted as:
xml
<Archives>
<Archive>
<File-Name>B.zip</File-Name>
<Files>
<File>
<Path>/folder-1/image-1.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/ee0c68fabf0a2b3c76b2643bff3cc215030f0caf.jpg</Url>
</File>
<File>
<Path>/image-2.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/7a597747dbc536e53eeb47760b5145d002b5bc25.jpg</Url>
</File>
</Files>
</Archive>
<Archive>
<File-Name>C.zip</File-Name>
<Files>
<File>
<Path>/folder-1/image-1.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/ee0c68fabf0a2b3c76b2643bff3cc215030f0caf.jpg</Url>
</File>
<File>
<Path>/image-2.jpg</Path>
<Url>https://prodstoragevazc.blob.core.windows.net/images/7a597747dbc536e53eeb47760b5145d002b5bc25.jpg</Url>
</File>
</Files>
</Archive>
</Archives>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
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