Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
TomaszRomanowski
Partner - Contributor
Partner - Contributor

Use of repctl for configure global rules

I have several replication tasks that uses the same global rules (5 rules).

I found out that using "repctl putglobalmanipulation ..." I could automate set up the same rules for all my tasks.

But problem is that there is no detail docs with any example how to create such command.

From "repctl help" there is:

"command putglobalmanipulation:
request arguments:

task:required string
global_manipulation:required structure {
name:required string
...."

I tried command like (to add table prefix "QR_"):

repctl putglobalmanipulation task="mssql_test" global_manipulation={name="global_manipulation",rules=[{action=02,name="Rename table to QR_",expression="'QR_' || $AR_M_MODIFIED_TABLE_NAME",column={where_column_name="%",new_data_type=12,where_sub_data_type=00,new_sub_data_type=00},sub_action=02,to_value="QR_"}]}

But each time I get error:
[putglobalmanipulation command] Failed
command putglobalmanipulation: Messages are not supported (exit status 20014)

 

I tested some sample commands for repctl (those without "structure" in syntax) and they execute without any problem.

All those with "structure" in syntax have the same problem: "Messages are not supported (exit status 20014)"

Thanks for any help.

 

 

Labels (1)
1 Solution

Accepted Solutions
Heinvandenheuvel
Specialist III
Specialist III

>> I found out that using "repctl putglobalmanipulation ..." I could automate set up the same rules for all my tasks.

Yeah, NO. That ain't going to work ever. It only appears that you might be able to use that, but as you found out the hard way, it is impossible to provide a 'structure' as input for REPCTL. I've tried every whch way in the past and confirmed with R&D - impossible. The REPCTL help is generated from an internal API and not all commands map to the command line tool. That's part of the UNSUPPORTED-ness of REPCTL.

You'll have to manipulate the JSON yourself to automate this. SMOP!

Years ago I made 'superscripts' for various JSON manipulations both in PERL and Powershell. They may already do what you need, or should be easily adaptable to do so, or at least serve as starting point. It so happens that only minutes ago I attached those scripts to an other question. Check out:

https://community.qlik.com/t5/Qlik-Replicate/What-is-the-syntax-on-repctl-command-line-to-exportrepo...

Hein.

 

View solution in original post

1 Reply
Heinvandenheuvel
Specialist III
Specialist III

>> I found out that using "repctl putglobalmanipulation ..." I could automate set up the same rules for all my tasks.

Yeah, NO. That ain't going to work ever. It only appears that you might be able to use that, but as you found out the hard way, it is impossible to provide a 'structure' as input for REPCTL. I've tried every whch way in the past and confirmed with R&D - impossible. The REPCTL help is generated from an internal API and not all commands map to the command line tool. That's part of the UNSUPPORTED-ness of REPCTL.

You'll have to manipulate the JSON yourself to automate this. SMOP!

Years ago I made 'superscripts' for various JSON manipulations both in PERL and Powershell. They may already do what you need, or should be easily adaptable to do so, or at least serve as starting point. It so happens that only minutes ago I attached those scripts to an other question. Check out:

https://community.qlik.com/t5/Qlik-Replicate/What-is-the-syntax-on-repctl-command-line-to-exportrepo...

Hein.