Qlik Community

Knowledge

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY

How to create a CSV file with the Cloud Storage connector in Qlik Application Automation

cancel
Showing results for 
Search instead for 
Did you mean: 
Emile_Koslowski
Support
Support

How to create a CSV file with the Cloud Storage connector in Qlik Application Automation

This article explains how the Cloud Storage connector can be used to create CSV files. Note that this is a generic connector that can be used with multiple platforms.

Supported platforms: 

  • Dropbox (live in Qlik Application Automation)
  • Amazon S3 (coming soon to Qlik Application Automation)
  • FTP (coming soon to Qlik Application Automation)
  • SFTP (coming soon to Qlik Application Automation)
  • Google Cloud Storage
  • Google Drive

 

Steps to create a CSV file:

This example uses Dropbox but the process is similar for the other platforms. 

  1. Search for the "Create File" block from the Cloud Storage connector and drag this inside the editor and connect it to the "Start" block.
    Emile_Koslowski_5-1626353572818.png
  2. Go to the inputs tab of the Create File block and select "Dropbox" as the connector.
  3. Specify the path for your new file, this should also include the filename and file extension. For example, "retail_contacts.csv".
    Emile_Koslowski_6-1626353668810.png
  4. Go to the datasources tab of the Create File block and click "Connect new datasource" to connect your dropbox account.
  5. Search for the "Write Line To File" block from the Cloud Storage connector and connect this to the "Create File on Dropbox" block.
  6. Go to the inputs tab of the Write Line To File block and select your file from the Create File block as the value for the File parameter.
  7. Specify the line of text you want to write to your file. This block will only allow for 1 line to be written to your file, so let's use it to write the file headers.
    1. Select CSV as Mode. 
    2. Specify the header rows
    3. If the data in your source might be incomplete, it's best to specify the column names in the "Column names" field to make sure that each value is mapped to the right column.
  8. Now search for a connector you want to use as the source of records. This should be a list block. For example, the "List Contacts" block from Salesforce. Drag this block in your blend and connect your Salesforce account.
  9. Because the List Contacts block returns a list, it has a loop attached to it. When the blend is executed, the blocks inside this loop will be executed for each item in the list returned by the List Contacts block.
    1. Specify additional fields you want to retrieve from Salesforce in the Extra Fields input parameter in the inputs tab on the List Contacts block.
  10. Drag a new "Write Line To File" block inside the loop of the List Contacts block.
    1. Click the Data field in the inputs tab and select "Item" from the list returned by the List Contacts block:
      Emile_Koslowski_8-1626353819183.png
    2. Now click on the "List Contacts > Item" placeholder that appeared in the Data field and click "Add Formula" in the dropdown that appears.
    3. Search for the CSV formula. Inside the CSV formula settings specify the columns if you don't want to use all keys from the contact object. Click save, the placeholder in the Data input field should now look like the following image:
      Emile_Koslowski_9-1626353842139.png

       

  11. To finish the file, search for the "Save And Close File" block from the Cloud Storage connector and connect this to after the loop from the List contacts block.
  12. Go to the inputs tab in the "Save And Close File" block. Your automation should now look like this:
    Emile_Koslowski_2-1626353461575.png
  13. Bonus tip: add a comment to each block, this makes the automation easier to comprehend. To add a comment to a block, right-click the block and select "Edit comment'.
Labels (2)
Version history
Last update:
‎2021-09-06 09:14 AM
Updated by:
Contributors