<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Read files from SFTP folder dynamically into QLiksense in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Read-files-from-SFTP-folder-dynamically-into-QLiksense/m-p/2087612#M12432</link>
    <description>&lt;P&gt;Hello LRAngela,&lt;/P&gt;
&lt;P&gt;Yes i have applied logic and it is working fine.&lt;/P&gt;
&lt;P&gt;You can initially define a varaible for your Folder.&lt;/P&gt;
&lt;P&gt;Let vFolder = replace('/internal/sftp_05958_07312','/','%2f');&lt;/P&gt;
&lt;P&gt;FileList:&lt;BR /&gt;LOAD&lt;BR /&gt;Name ,&lt;BR /&gt;Path,&lt;BR /&gt;IsDirectory,&lt;BR /&gt;CreationTime,&lt;BR /&gt;LastAccessTime,&lt;BR /&gt;LastWriteTime,&lt;BR /&gt;Size,&lt;BR /&gt;replace('$(vFolder)','%2f','/') as SFTP_Folder_Name,&lt;BR /&gt;'$(vFolder)' as SFTP_Folder_Encripted&lt;BR /&gt;FROM&lt;BR /&gt;[&lt;A href="http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPListFilesAndFolders&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5cTemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remoteDirectory=%2finternal%2fsftp_05958_07312&amp;amp;appID=](qvx" target="_blank"&gt;http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPListFilesAndFolders&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5cTemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remoteDirectory=%2finternal%2fsftp_05958_07312&amp;amp;appID=](qvx&lt;/A&gt;)&lt;BR /&gt;where WildMatch(Name, 'ALPSToQLIK_Contractor_*');&lt;/P&gt;
&lt;P&gt;Files: &lt;BR /&gt;Load Distinct &lt;BR /&gt;Name as File_Name ,&lt;BR /&gt;SFTP_Folder_Encripted as Folder,&lt;BR /&gt;LastWriteTime as Time&lt;BR /&gt;Resident FileList &lt;BR /&gt;order by Name,&lt;BR /&gt;SFTP_Folder_Encripted;&lt;BR /&gt;&lt;BR /&gt;Let vContractor_Time = Peek('Time');&lt;BR /&gt;Trace $(vContractor_Time);&lt;/P&gt;
&lt;P&gt;Then if you have multiple files in folder then&amp;nbsp; u can apply loop and read the files from sftp folder.&lt;/P&gt;
&lt;P&gt;For i=0 to NoOfRows('Files')-1&lt;BR /&gt;Let vPathF = Peek('Folder',$(i),'Files')&amp;amp;'%2f'&amp;amp;Peek('File_Name',$(i),'Files');&lt;BR /&gt;Let vFileName = Peek('File_Name',$(i),'Files');&lt;/P&gt;
&lt;P&gt;Contractor_Current_Load:&lt;BR /&gt;Load &lt;BR /&gt;[ALPS ID] as Emp_ID,&lt;BR /&gt;[EMPLOYEE GROUP],&lt;BR /&gt;[FIRST NAME],&lt;BR /&gt;[LAST NAME],&lt;BR /&gt;[LINE MANAGER] as LineManager_ALPS1,&lt;BR /&gt;[COST CENTER] as CostCenter_ALPS1,&lt;BR /&gt;[REPORTING UNIT] as ReportingUnit_ALPS1,&lt;BR /&gt;[COMPANY CODE] as CompanyCode_ALPS1,&lt;BR /&gt;[COUNTRY] as [Country],&lt;BR /&gt;[EFFECTIVE DATE],&lt;BR /&gt;EMPL_STATUS as [Employee Status],&lt;BR /&gt;'Contractor' as Flag&lt;BR /&gt;from&lt;BR /&gt;[&lt;A href="http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPGetRawFile&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5ctemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remotePath=$(vPathF)&amp;amp;appID=](txt" target="_blank"&gt;http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPGetRawFile&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5ctemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remotePath=$(vPathF)&amp;amp;appID=](txt&lt;/A&gt;, codepage is 28591, embedded labels, delimiter is ',', msq);&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2023 07:29:42 GMT</pubDate>
    <dc:creator>SunainaUmberkar</dc:creator>
    <dc:date>2023-06-26T07:29:42Z</dc:date>
    <item>
      <title>Read files from SFTP folder dynamically into QLiksense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Read-files-from-SFTP-folder-dynamically-into-QLiksense/m-p/1916846#M10536</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I need to extract files from SFTP folder dynamically. I am able to list the files in the folder.&lt;/P&gt;
&lt;P&gt;This file will be updated everyday. i need to extract the file dynamically. I tried to use variables to do same. There is no error displayed while loading but file data is not extracted.&lt;/P&gt;
&lt;P&gt;Please find the code below.&lt;/P&gt;
&lt;P&gt;FileList: LOAD Name as Name1, Path, IsDirectory, CreationTime, LastAccessTime, LastWriteTime, Size, FileName() as filename FROM [&lt;A href="http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPListFilesAndFolders&amp;amp;host=10.243.216.11&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5ctemp%5cRSA_Key%5cRSA_Key%5cPREPROD_Private_Key&amp;amp;ignoreProxy=False&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remoteDirectory=%2finternal%2fsftp_05958_07312&amp;amp;appID=" target="_blank"&gt;http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPListFilesAndFolders&amp;amp;host=10.243.216.11&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5ctemp%5cRSA_Key%5cRSA_Key%5cPREPROD_Private_Key&amp;amp;ignoreProxy=False&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remoteDirectory=%2finternal%2fsftp_05958_07312&amp;amp;appID=&lt;/A&gt;] (qvx)&amp;nbsp;where WildMatch(Name,'Contractor_*');&lt;/P&gt;
&lt;P&gt;Let vContractor = Peek('Name1');&lt;/P&gt;
&lt;P&gt;Let vFilepath='[&lt;A href="http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPGetRawFile&amp;amp;host=10.243.216.11&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5cTemp%5cRSA_Key%5cRSA_Key%5cPREPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remotePath=%2finternal%2fsftp_05958_07312%2f" target="_blank"&gt;http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPGetRawFile&amp;amp;host=10.243.216.11&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5cTemp%5cRSA_Key%5cRSA_Key%5cPREPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remotePath=%2finternal%2fsftp_05958_07312%2f&lt;/A&gt;';&lt;/P&gt;
&lt;P&gt;Trace $(vContractor );&lt;/P&gt;
&lt;P&gt;Trace $(vFilepath);&lt;/P&gt;
&lt;P&gt;Now trying to read this variables in below code to extract files.&lt;/P&gt;
&lt;P&gt;Load * from '$(vFilepath)$(vContractor )&amp;amp;appID=]';&lt;/P&gt;
&lt;P&gt;This code is not loading the data from file. Kindly suggest where i am going wrong in this. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 11:10:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Read-files-from-SFTP-folder-dynamically-into-QLiksense/m-p/1916846#M10536</guid>
      <dc:creator>SunainaUmberkar</dc:creator>
      <dc:date>2022-04-11T11:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Read files from SFTP folder dynamically into QLiksense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Read-files-from-SFTP-folder-dynamically-into-QLiksense/m-p/2087528#M12431</link>
      <description>&lt;P&gt;Hi，I have the same problem as you, do you have a solution?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 03:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Read-files-from-SFTP-folder-dynamically-into-QLiksense/m-p/2087528#M12431</guid>
      <dc:creator>LRAngela</dc:creator>
      <dc:date>2023-06-26T03:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Read files from SFTP folder dynamically into QLiksense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Read-files-from-SFTP-folder-dynamically-into-QLiksense/m-p/2087612#M12432</link>
      <description>&lt;P&gt;Hello LRAngela,&lt;/P&gt;
&lt;P&gt;Yes i have applied logic and it is working fine.&lt;/P&gt;
&lt;P&gt;You can initially define a varaible for your Folder.&lt;/P&gt;
&lt;P&gt;Let vFolder = replace('/internal/sftp_05958_07312','/','%2f');&lt;/P&gt;
&lt;P&gt;FileList:&lt;BR /&gt;LOAD&lt;BR /&gt;Name ,&lt;BR /&gt;Path,&lt;BR /&gt;IsDirectory,&lt;BR /&gt;CreationTime,&lt;BR /&gt;LastAccessTime,&lt;BR /&gt;LastWriteTime,&lt;BR /&gt;Size,&lt;BR /&gt;replace('$(vFolder)','%2f','/') as SFTP_Folder_Name,&lt;BR /&gt;'$(vFolder)' as SFTP_Folder_Encripted&lt;BR /&gt;FROM&lt;BR /&gt;[&lt;A href="http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPListFilesAndFolders&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5cTemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remoteDirectory=%2finternal%2fsftp_05958_07312&amp;amp;appID=](qvx" target="_blank"&gt;http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPListFilesAndFolders&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5cTemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remoteDirectory=%2finternal%2fsftp_05958_07312&amp;amp;appID=](qvx&lt;/A&gt;)&lt;BR /&gt;where WildMatch(Name, 'ALPSToQLIK_Contractor_*');&lt;/P&gt;
&lt;P&gt;Files: &lt;BR /&gt;Load Distinct &lt;BR /&gt;Name as File_Name ,&lt;BR /&gt;SFTP_Folder_Encripted as Folder,&lt;BR /&gt;LastWriteTime as Time&lt;BR /&gt;Resident FileList &lt;BR /&gt;order by Name,&lt;BR /&gt;SFTP_Folder_Encripted;&lt;BR /&gt;&lt;BR /&gt;Let vContractor_Time = Peek('Time');&lt;BR /&gt;Trace $(vContractor_Time);&lt;/P&gt;
&lt;P&gt;Then if you have multiple files in folder then&amp;nbsp; u can apply loop and read the files from sftp folder.&lt;/P&gt;
&lt;P&gt;For i=0 to NoOfRows('Files')-1&lt;BR /&gt;Let vPathF = Peek('Folder',$(i),'Files')&amp;amp;'%2f'&amp;amp;Peek('File_Name',$(i),'Files');&lt;BR /&gt;Let vFileName = Peek('File_Name',$(i),'Files');&lt;/P&gt;
&lt;P&gt;Contractor_Current_Load:&lt;BR /&gt;Load &lt;BR /&gt;[ALPS ID] as Emp_ID,&lt;BR /&gt;[EMPLOYEE GROUP],&lt;BR /&gt;[FIRST NAME],&lt;BR /&gt;[LAST NAME],&lt;BR /&gt;[LINE MANAGER] as LineManager_ALPS1,&lt;BR /&gt;[COST CENTER] as CostCenter_ALPS1,&lt;BR /&gt;[REPORTING UNIT] as ReportingUnit_ALPS1,&lt;BR /&gt;[COMPANY CODE] as CompanyCode_ALPS1,&lt;BR /&gt;[COUNTRY] as [Country],&lt;BR /&gt;[EFFECTIVE DATE],&lt;BR /&gt;EMPL_STATUS as [Employee Status],&lt;BR /&gt;'Contractor' as Flag&lt;BR /&gt;from&lt;BR /&gt;[&lt;A href="http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPGetRawFile&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5ctemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remotePath=$(vPathF)&amp;amp;appID=](txt" target="_blank"&gt;http://localhost:5555/data?connectorID=FileTransferConnector&amp;amp;table=SFTPGetRawFile&amp;amp;host=10.243.208.12&amp;amp;port=22&amp;amp;userName=sftp_07312&amp;amp;pathToKeyFile=E%3a%5ctemp%5cRSA_Key%5cRSA_Key%5cPROD_Private_Key&amp;amp;ignoreProxy=True&amp;amp;ignoreClientCertificateErrors=False&amp;amp;remotePath=$(vPathF)&amp;amp;appID=](txt&lt;/A&gt;, codepage is 28591, embedded labels, delimiter is ',', msq);&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 07:29:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Read-files-from-SFTP-folder-dynamically-into-QLiksense/m-p/2087612#M12432</guid>
      <dc:creator>SunainaUmberkar</dc:creator>
      <dc:date>2023-06-26T07:29:42Z</dc:date>
    </item>
  </channel>
</rss>

