1
votes

I am trying to copy data from azure sql database to Azure Blob Storage.

Source : Azure SQL Database. Destination : Azure Blob Storage.

"typeProperties": {
            "fileName": "MyFile.csv.zip",
            "folderPath": "myfolderpath/",
            "format": {
                "type": "TextFormat",
                "columnDelimiter": ",",
                "nullValue": "",
                "firstRowAsHeader": false
            },

            "compression": {
                "type": "ZipDeflate",
                "level": "Fastest"
            }
        },

Zip File is created perfectly but it contains auto-generated file name after extract (not MyFile.csv).

When I use the GZip as compression the .gz file contains the file with same file name like MyFile.csv

I read documentation, but cannot find anything.

Anybody has faced same issue? Please advise.

2

2 Answers

1
votes

Zip is different from GZip. The former is a compressor with archive, and the latter is a file-based compressor.

The filename you specified is only for the name of result zip file, not related to the inner file's name. Considering the data is extract from a SQL source without original file name, we simply use auto-generated names for it.

One zip file may have several inner files. If you are mentioning the inner file's name can be associated to the given zip file's when there is only one inner file. Yes, it is. But we haven't taken such improvement for now.

To mitigate and fulfill your requirement, you can author two activities. The first one get data from SQL to Blob with specified file name (MyFile.csv) as you want. The second one archive it to a zip file (MyFile.csv.zip).

0
votes

According to your description, I checked this issue on my side and I could reproduce the same issue as you mentioned as follows:

Compressed data in Azure Blob storage:

enter image description here

Decompressed files on local side:

enter image description here

enter image description here

For now, we could not change any configuration for solving this issue. You could add your feedback here.