Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Some best practices and tips & tricks to build and maintain your first Automations

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
PietMichielRappelet
Former Employee
Former Employee

Some best practices and tips & tricks to build and maintain your first Automations

Last Update:

Feb 22, 2024 7:11:41 AM

Updated By:

Emile_Koslowski

Created date:

Sep 9, 2021 4:17:21 AM

Hi Community

This article contains some tips & tricks that can help you improve your building experience. I encourage everyone to share additional practices you feel can help other users in making the best automations possible!

 

 

# 1 - Use variables in the beginning of your automation for field values you use in different blocks and can chance ad hoc.

Example: Event_id that is used in several blocks

When you have a workflow syncing data for a specific event or from a specific table, instead of manually adding this Id in the block requesting that id, create a variable on top of the flow and use that variable.

PietMichielRappelet_0-1624612118307.png

PietMichielRappelet_1-1624612127877.png

 

# 2 Do not use variables to store the last output of a block.

The last output of a block is always kept in memory and can be used in the input field of other blocks;
It does not make sense to save this output in a variable and refer to that variable. You even risk hitting the automation memory limit

 

# 3 Use a 'TEST' variable for blends you want other behavior in test vs production

If you require other behavior when running a blend for a test vs production, you can create a copy of the automation and have one for test and one for production. But in most cases, you can also use a variable to be used in the flow to decide what should happen: E.g. email need to be sent out to other recipients, do not save just output something, use sandbox datasource vs production datastource, ...

PietMichielRappelet_2-1624612605892.png

 

PietMichielRappelet_3-1624612632804.png

 

 

# 4 When running a sync processing multiple records, set blocks that might fail due to 'warning' and add error handling.

When you process a list of records, you do not want your flow to fail entirely when one record gives an error. Especially if that error is a logical error (e.g. 'no valid email for this record' ).

1. set block that upserts data in the loop to 'warning'

PietMichielRappelet_4-1624612864560.png

2. add manual error handling

PietMichielRappelet_5-1624612878833.png

3. Add, after the loop, some communication flow to inform the admin of occurred errors.

PietMichielRappelet_6-1624612918219.png

 

4. in your run history, you can easily switch between the errors using the 'go to next error' button. 

PietMichielRappelet_0-1677061070021.png

 

see https://help.qlik.com/en-US/blendr/Content/blend-editor/error-handling.htm

 

# 5 Use the block 'Update Run Title' to tag runs with some key information

Using the 'incremental pattern' you might have a lot of automation executions (runs) that do not process any data. Adding a job title to the runs that did process data can be very useful to debug or just find where some data was processed in the history overview

 

update_run_title.PNG

Also triggered or webhook automation that does single record processing can benefit a lot from this feature. You can add the record name or id that has been processed in the job title, making it very easy to see from the history overview what has been processed when with success or not.

The same approach can be used to store e.g. the app_id you are reloading in your automation. 

PietMichielRappelet_1-1677061133518.png

 

PietMichielRappelet_2-1677061230206.png

 

#6 Some magic behind one right-click in the editor: share and navigate

> Export and import your automation easily with the 'download and upload workspace' action

Right-click on the editor and find this amazing option to easily share an automation with whomever you want.

 

PietMichielRappelet_0-1669311986785.png

 


> You can also share automations with others in your tenant by promoting the flow to a template (private or shared).

 

PietMichielRappelet_1-1669312007756.png

 

> or just right-click on the editor to easily navigate in your flow

 

Version history
Last update:
‎2024-02-22 07:11 AM
Updated by: