Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
SreehariPV
Contributor III
Contributor III

Create new tasks using QEM Python API

Hi team,

using QEM's Python API is it possible to create new task using a previous task's export file. I want to create 10 tasks using a previous task's export file. I want to know if there is any function called create_task() or someway using which I can create task using python.

Labels (3)
5 Replies
kng
Support
Support

Hello Team,
Good Day

Currently we don't have APIs to create task using Python API in QEM.

Please refer the below link which briefs you about the API provided in QEM

https://help.qlik.com/en-US/enterprise-manager/November2023/Content/EnterpriseManager/EnterpriseMana...

 

Also w.r.t current python API supported in QEM

Enterprise Manager Python API | Qlik Enterprise Manager Help


Regards,
shivananda

DesmondWOO
Support
Support

Hi @SreehariPV ,

Use export_task API to export your task definition. After modification, import them back using import_task API. Does this solution address your issue?

Regards,
Desmond

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
SushilKumar
Support
Support

Hello @SreehariPV 

Add more to @DesmondWOO comment is recommend approach where less modification is required . if there are lot of modification in term of tables and some manipulation then it recommends using GUI.

Regards.

Sushil Kumar

 

Heinvandenheuvel
Specialist II
Specialist II

@kng "Currently we don't have APIs to create task using Python API in QEM."

Shivananda, I do not understand this comment. import_task is a fine API for create a task, is it not?

 

@SushilKumar "f there are lot of modification in term of tables and some manipulation then it recommends using GUI."

I do not understand this comment either. IMHO the GUI is only good for small modifications. For large amount of changes a structured, managed, repeatable method through an API is the only way to go.

Specifically in the context of the original question " I want to create 10 tasks using a previous task's export file. " Clearly there you want run a script over a source JSON, produce 10 similar but dedicated target JSON files/memory-objects and import those. Much better, safer, than repeating similar changes in a GUI where an unpredicted change may slip in.

 

 

Jon_Donker
Creator
Creator

I have used python to combine tasks and move tasks from environment to environment by renaming certain values within the tasks json.

If I understand your need correctly:

  1. Create a simple task within the gui with one table and the common manipulations you need.  Export it out and this is now your template task
  2. Use python to add extra tables into the template and remove your "primer' table at the end if you don't need it
  3. Use the api import task to upload the newly created task's json

Hope this helps out