Skip to main content

Qlik Application Automation: How to use the cloud storage blocks in automations

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Marius_Nuca
Support
Support

Qlik Application Automation: How to use the cloud storage blocks in automations

Last Update:

Apr 26, 2023 2:09:48 AM

Updated By:

Sonja_Bauernfeind

Created date:

May 17, 2022 11:16:27 AM

Attachments

This article covers the usage of the Qlik Application Automation cloud storage blocks and gives design flow examples which apply them. You can also download an example JSON using Google Cloud Storage, and we have compiled a list of links for more in-depth platform connections and atypical usages.

qlik application automation cloud storage block.png

Content

 

The Available Blocks

Selecting Cloud storage when creating your automation will present you with the following list:

  • Open File

    The open file block is a read-only block that is used together with the "Move file", "Copy file" and "Read data from a file" blocks. It requires a valid connection to a cloud storage platform or a URL link.

  • Create File

    As the name implies it creates a new file at the suggested location. If the file already exists the automation run will end up in failure.

    Warning: this block cannot be used if a file with the same filename exists at that same location. In order to do that you will need to use the overwrite flow rules at the end of this article.

  • Copy File

    This block copies the output from an "Open file" block and sends the stream to a given source path on the target platform. As mentioned now and beforehand, this block needs to be preceded by an "Open file" in the automation flow.

  • Read Data From File

    Reads data from a file opened with the "Open file" block but what is different from the previous one is that the data stream is mostly used only when you need to use the stream for other blocks apart from the native file blocks or to update other files. This block it has several modes of reading data:
    • Automatic: given the file type and contents we try to approximate the algorithm to use and try to apply it to the file
    • CSV: mostly used in conjecture with spreadsheet files and you can choose your own headers and separators to be used in the reading algorithm
    • JSON: allows you to fully utilize the Automations format in order to use the read data easier inside an automation
    • RAW: reads the file line by line (mostly used for text files)

  • Write Line To File

    This block writes data to a newly created file with the "Create file" block. As mentioned previously, this block also has several modes in which to write the data stream:

    • Automatic: given the file type and contents we try to approximate the algorithm to use and try to apply it to writing to the file
    • CSV: mostly used in conjecture with spreadsheet files and you can choose your own headers and separators to be used in the writing algorithm
    • JSON: allows you to fully utilize the Automations format in order to use the write data easier inside an automation
    • RAW: reads the file line by line (mostly used for text files)

  • Save And Close File

    The block is used to close opened files by the use of the "Create file" block. You will need to use this block in order to see the target result on the cloud platform.

  • Delete File

    Will delete the file with the filename given found at the target path/location. Mostly used in the overwrite file flow implementation.

  • Move File

    Has mostly the same functionality as the "Copy file" block but instead of leaving the source file at the initial platform, it deletes it.

  • Check If File Exists

    Verifies the existence of the file with the given filename at the target path/location. Again this is mostly used in the overwrite file flow protocol.

  • List Files

    Simply shows you all the files found at the given target path/location.

 

Verify if File Exists / Delete File Example

Here is an example of how to verify if a file exists prior to creating a new one. This is specifically important when you set up an automation meant to save your result in a target file that might or might not be at the location suggested. Since you cannot create a new file if a previous one exists, you will need to apply the following to your automation:

check if the file exists then delete and create a new one.png

You can verify if the file exists initially, and, based on the response from that block, either simply create a new file or delete the old file and create a new one to write data to.

 

Supported Platforms and Connectors

And last but not least, this is a list of supported platforms for the native blocks as well as links to how to connect to them as well as more quirky details they have.

Connectors.png

 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

Labels (2)
Comments
retech4s
Contributor
Contributor

Im having trouble to save a generated report in qlik automation to a google storage bucket, is this a supported functionallity?

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @retech4s 

This is supported. I've attached an example automation (for information on how to import this, see How to import and export automations).

The end result from this test would be:

google cloud storage bucket.png

If you have additional questions or need assistance getting this to work, please post directly in our Qlik Application Automation forum, including potential errors you get.

All the best,
Sonja 

retech4s
Contributor
Contributor

@Sonja_Bauernfeind hello im having trouble finding the attachment, is it on one of those links?

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @retech4s 

That was my bad! I forgot to attach it. Please see the original article for the attached file.

All the best,
Sonja 

Ken_T
Specialist
Specialist

the JSON file given, does not match the screenshots of automation flow in this document...

can the json files for the flow described on this page, be included so we can review what actual block are used?  The screenshot could be improved by naming the blocks with enough info that tells  the folks new to automations, wheret the block is

like 
Cloud Storage > Create File : this block is used to blah blah blah in this flow 

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @Ken_T 

The .JSON was created later on. We will likely be updating the flow images, rather than the other way around. I will log an improvement to be looked into to have the article reviewed and updated.

 

Version history
Last update:
‎2023-04-26 02:09 AM
Updated by: