Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
IS_qlik
Contributor
Contributor

Parameterize 'Target table schema' setting

I wanted to programmatically change the 'Target table schema'. Is this possible in Qlik Replicate? Please let me know. 

Labels (3)
3 Solutions

Accepted Solutions
Michael_Litz
Support
Support

Hi IS_qlik,

I am not sure how the screen shot relates to this question.

I think that there may be a way from a script to make restAPI calls to do this. It would certainly need to be tested out. This is just a very preliminary thought on an approach that may work.

1) Maybe using PowerShell or some other scripting language do the following steps.
2) Stop the task
3) Export the task json
4) Parse the json and change the schema name
5) Import the json
6) Resume / run the task

Thanks,
Michael

View solution in original post

Heinvandenheuvel
Specialist III
Specialist III

Please try to describe better what you are trying to accomplish. As Michael indicates, the attached screentshot does not seem to be connected to the problem on hand. fwiw - I find screeenshots terrible in general, vastly inferior to just some text copy & paste.

Is this perhaps a question in the process of moving multiple tasks from a lower (DEV) environment to the next (QA or PROD) and needed different on the targets? Or cloning tasks with with different schemas in the same DB?

Anyway the default target schema  has a unique name in the exported task JSON and can be changed by any  editing tool (powershell, perl, python, sed, awk,....) without extensive parsing. Just look for default_schema nd probably also control_schema and replace the quoted string after the colon on that line. See sample JSON snippet. Your choice whether to do this task by task or whether you can do an export 'all' and replace the those lines for all tasks in the export.  Of course this is how it works today, and Qlik has the right to change the syntax in the future in which case you need to change the script but that's very unlikely.

Export, edit, Import! - With a bit more programming you can do it all 'in the air' using the the Enterprise Manager API's and those JSON's never need to touch the directories, just string streams in memory.

Hein.

	"task_settings":	{
		"source_settings":	{
		},
		"target_settings":	{
			"default_schema":	"HEIN",
			"control_schema":	"HEIN",
			"queue_settings":	{

 

View solution in original post

SwathiPulagam
Support
Support

Hi @IS_qlik ,

We can create Global transformation as below In Qlik Replicate UI:

 

SwathiPulagam_0-1654030637405.png

 

Thanks,

Swathi

View solution in original post

4 Replies
Michael_Litz
Support
Support

Hi IS_qlik,

I am not sure how the screen shot relates to this question.

I think that there may be a way from a script to make restAPI calls to do this. It would certainly need to be tested out. This is just a very preliminary thought on an approach that may work.

1) Maybe using PowerShell or some other scripting language do the following steps.
2) Stop the task
3) Export the task json
4) Parse the json and change the schema name
5) Import the json
6) Resume / run the task

Thanks,
Michael

Heinvandenheuvel
Specialist III
Specialist III

Please try to describe better what you are trying to accomplish. As Michael indicates, the attached screentshot does not seem to be connected to the problem on hand. fwiw - I find screeenshots terrible in general, vastly inferior to just some text copy & paste.

Is this perhaps a question in the process of moving multiple tasks from a lower (DEV) environment to the next (QA or PROD) and needed different on the targets? Or cloning tasks with with different schemas in the same DB?

Anyway the default target schema  has a unique name in the exported task JSON and can be changed by any  editing tool (powershell, perl, python, sed, awk,....) without extensive parsing. Just look for default_schema nd probably also control_schema and replace the quoted string after the colon on that line. See sample JSON snippet. Your choice whether to do this task by task or whether you can do an export 'all' and replace the those lines for all tasks in the export.  Of course this is how it works today, and Qlik has the right to change the syntax in the future in which case you need to change the script but that's very unlikely.

Export, edit, Import! - With a bit more programming you can do it all 'in the air' using the the Enterprise Manager API's and those JSON's never need to touch the directories, just string streams in memory.

Hein.

	"task_settings":	{
		"source_settings":	{
		},
		"target_settings":	{
			"default_schema":	"HEIN",
			"control_schema":	"HEIN",
			"queue_settings":	{

 

IS_qlik
Contributor
Contributor
Author

Hi, 

Sorry for not specifying my question.  For example, if I want to move multiple tables to Google Cloud Storage target and I want to 'Target table schema' setting to have certain parameterized name such as '#SQLSERVERNAME#' or '{SERVER_NAME}' so that the folders created in GCP show up as {#SQLSERVERNAME#}.{TARGET_TABLE_NAME}. Is this possible in Qlik Replicate UI or through any automated python script?

SwathiPulagam
Support
Support

Hi @IS_qlik ,

We can create Global transformation as below In Qlik Replicate UI:

 

SwathiPulagam_0-1654030637405.png

 

Thanks,

Swathi