Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.

Qlik Replicate: How to custom target endpoint syntax

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
john_wang
Support
Support

Qlik Replicate: How to custom target endpoint syntax

Last Update:

Sep 17, 2024 5:05:37 AM

Updated By:

Sonja_Bauernfeind

Created date:

Jul 18, 2022 10:44:38 AM

Sometimes the target default endpoint behavior does not meet our needs. This article is useful if we want to modify the default syntax. 

For example, while MySQL is the target endpoint, Qlik Replicate creates a net changes table and uses it in batch apply mode. The net changes table is created with the default engine type "InnoDB" which has limitations while "MyISAM" and does not have the Row size too large limitation in MySQL.

The below steps demonstrate how to change the net changes table engine type from "InnoDB" (default) to "MyISAM". After the setup is done, Qlik Replicate will create the net changes table automatically with engine type "MyISAM".

Environment

  • Qlik Replicate All supported versions

 

Detailed Steps

  1. From the Qlik Replicate computer where you want to import the task, open the Qlik Replicate command line console by doing the following:

    From the Start menu, expand Qlik Replicate and then select Qlik Replicate Command Line

    A command-line console is displayed with the correct prompt for Qlik Replicate.

    Alternatively, open a Windows Command Prompt using As Adinistrator and change to "<product dir>\Attunity\Replicate\bin" (default location)

  2. Run the following command:

    repctl.exe getprovidersyntax syntax_name=MySQL > MySQL_MyISAM.json
    If the DATA folder is non-default location, add option -d data_directory in the command.

  3. Edit the file MySQL_MyISAM.json

    1. Remove the first line and the latest line and include:

      command getprovidersyntax response:

      [getprovidersyntax command] Succeeded
    2. Modify the top few lines:

      Original:

      "provider_syntax": {
       "name": "MySQL",
       "query_syntax": {
      Modified:

      "provider_syntax": {
      "name": "MySQL_MyISAM",
      "repository.provider_syntax": {
      "name": "MySQL_MyISAM",
      "query_syntax": {
    3. Add ENGINE type ENGINE=MyISAM

      Original:

      "create_temporary_table": "CREATE TEMPORARY TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} ( ${COLUMN_LIST} ) CHARSET=utf8mb4",

      Modified:

      "create_temporary_table": "CREATE TEMPORARY TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} ( ${COLUMN_LIST} ) ENGINE=MyISAM CHARSET=utf8mb4",

  4. Save changes and move the file to "C:\Program Files\Attunity\Replicate\data\imports", or your custom DATA folder.

  5. Run the following command:

    repctl putobject data=MySQL_MyISAM
    Do not add the additional suffix ".json" in the end of the command as this will cause the command to fail.
  6. Add the Internal Parameter syntax to the target endpoint:

    1. Go to the  Endpoint connection
    2. Switch to the Advanced tab
    3. Click Internal Parameters
    4. Add the parameter: syntax
    5. Add the value: MySQL_MyISAM

      internal parameter syntax.png


      For more information about Internal Parameter, see Qlik Replicate: How to set Internal Parameters and what are they for?

  7. Resume or Reload the task.

Related Content

Labels (2)
Comments
micpage
Contributor II
Contributor II

Hello, How can I delete a custom provider syntax? This is not working:

repctl.exe removeprovidersyntax syntax_name=MyCustomSQL 
repctl.exe deleteprovidersyntax syntax_name=MyCustomSQL

 

Version history
Last update:
‎2024-09-17 05:05 AM
Updated by: