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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to connect multiple FTP locations in the same job

I have one table which contains many distributors and retailers ftp connection details.

The table structure is as follows:

Dist_Id       Reta_Id        Ftp_host       Ftp_user        Ftp_pswd
------------------------------------------------------------------------------------
1                 a                   123               abc                 xyz
1                 b                   456               def                  mno
2                 c                   431               ghi                  p9r
3                 d                   789               jkl                   12e


So for getting all files for Dist_Id=1, I want to connect ftp locations of Retailers a and b. And download files in each ftp location to the same folder.
How can I connect to multiple ftp locations and download files in the same folder??

Labels (2)
16 Replies
Anonymous
Not applicable
Author

Hi,

I have one more block to complete this job..0683p000009MPcz.png

 

While using context variable context.FTP_Files  as Filemask in FtpGet component,  it did not download files when more than one file name are provided in the FTP_Files column separated by comma.But downloads when only one file name is provided. How can I download all the files provided in the FTP_Files column?? 

 

Example: 

 

Dist_Id            Reta_Id             FTP_Files

---------------------------------------------------------------

 1                     a                       ab.csv,mn.csv

 1                     b                        pq.csv

 

In this case, for Dist_Id=1, context.FTP_Files only download pq.csv. Actually I want to download all these 3 csv files in the same folder.. (Dist_Id is same).

 

Thanks In Advance..0683p000009MACn.png

fdenis
Master
Master

filters are list you cannot dynamically convert strings to list.
so you have to use a tNormalise to split your file liste.
Anonymous
Not applicable
Author

Neena, 

 

below is the job with tNormalize as Denis suggested.

0683p000009M0RL.png

 

row 1 - settings:

0683p000009M0MB.png

tNormalize - component settings 

0683p000009M0WA.png

 Output

0683p000009M0WF.png

 

Input

Inout_ftp_demo.png

 

 

Regards,

Ragu

 

 

Anonymous
Not applicable
Author

Thanks for both of you..Smiley Happy It Works...

Anonymous
Not applicable
Author

Hi,

 

I have one more doubt..Smiley Tongue 

 

When I download all retailer files and inserted to one common table, it can not distinguish which data is getting from which Retailer.. So I want to append one column(Reta_Id) in all csv files when the file is downloaded from ftp location. Is it possible to append a column in csv at the time of downloading from FTP??

 

Thanks In advanceSmiley Happy

fdenis
Master
Master

yes you can but you have to download then open and add column.
Anonymous
Not applicable
Author

Thanks for your reply...

 

I want to add the Retailer_Id column in each file when it is downloaded.. Then only corresponding Retailer_Ids can be added.  Since there are many files Manually open and adding  the column is not possible..