Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Downloading files of a sub-folder in azure storage container is saving folders as empty text files

Hi,

 

I am using TOS_BD_V6.4.1 on Ubuntu. I am trying to download files from a azure storage container using tAzureStorageGet. My folder structure in azure storage is "dev/TestFolder/inside/abc.xlsx" (dev is the container) and I am trying to download all the files in "TestFolder" directory to a local folder "Test" in downloads directory.

But when I run the package, it is creating a file "TestFolder" inside "Test" directory in my local and then throws "/*/*/inside Not a directory" error.

Below is my tAzureStorageGet config:

0683p000009Ls22.pngBelow is the error:
0683p000009LruI.png

 

Please help and thanks in advance.

Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You have to use the global variable of the tAzureStorageList component.

Can you try giving this value - "((String)globalMap.get("tAzureStorageList_1_ACCOUNT_KEY"))" in the prefix and try again?

0683p000009LruS.png

View solution in original post

10 Replies
Anonymous
Not applicable
Author

I think in most cloud storage technologies, there is no concept of a 'sub-folder' which is created explicitly.

For example, the name of the file abc.xlsx is actually "TestFolder/inside/abc.xlsx".

So in your component you can download only one file at a time. What I would suggest is to use the tAzureStorageList Component to get all the files names under the TestFolder prefix and connect the iterate component to the tAzureStorageGet Component to download the files.

0683p000009Ls2G.png

 

Anonymous
Not applicable
Author

Hi ArvinRapt, thanks for your response.

Earlier, I was following the example that was mentioned here. Even when I use iterate to download the files list as you mentioned, i'm getting the same error. But on iterate over the list i can see the names of all the files and folders in the console using tJava.

Anonymous
Not applicable
Author

can you post a screenshot of the tAzureStorageGet component and how its connected to the iterate link?

That'll be more helpful.

Anonymous
Not applicable
Author

ArvinRapt, thanks for your time.

Below is my tAzureStorageGet component

0683p000009LrxX.png

Here is the flow:

 

0683p000009Ls1J.png

 

I noticed that if i put the entire file path of the file in prefix ("TestFolder/inside/abc.xlsx") it is downloading that file but i want to download all the files in the directory.

Anonymous
Not applicable
Author

You have to use the global variable of the tAzureStorageList component.

Can you try giving this value - "((String)globalMap.get("tAzureStorageList_1_ACCOUNT_KEY"))" in the prefix and try again?

0683p000009LruS.png

Anonymous
Not applicable
Author

ArvinRapt,

I am getting "Can't open the specified file input stream from file" error on using the global variable of the tAzureStorageList component as shown below.0683p000009LrzE.png

 

Anonymous
Not applicable
Author

ArvinRapt,

 

I removed the test folder and tried with a new folder and it worked. But it is downloading all the files under dev container (other folders as well). Can you please let me know how i can limit it to download from one folder.

Anonymous
Not applicable
Author

Using the tAzureStorageList component? or by just using the tAzureGet Component?

Either way I would suggest checking the value that you are passing to the prefix parameter.

Anonymous
Not applicable
Author

ArvinRapt,

I used ((String)globalMap.get("tAzureStorageList_1_CURRENT_BLOB")) in tAzureStorageGet as prefix and iterated on the tAzureStorageList_1 list. It solved my issue.

Thanks a lot for guiding me through.