Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jonna
Partner - Creator
Partner - Creator

Any advice for using Subversion as Version Control for Replicate ?

Hi folks

 

In our organisation it is mandatory for us to use Subversion for version control.  Does anyone have experiences of using Subversion for version control for Replicate and Compose that could be shared with us?

 

Any tips or advice would be greatly appreciated.

 

Thanks, jonna

Labels (3)
1 Solution

Accepted Solutions
lyka
Support
Support

Hi @jonna,

 

Please let us know if any of the proposed solution solves your issue

 

Thanks

Lyka

View solution in original post

4 Replies
KellyHobson
Support
Support

Hey @jonna 

Thanks for posting your question- it is an interesting one! I have not come across Replicate standards for version control as it typically is up to the customer based on their environment.

You can take snapshots of your Replicate environment in two ways:

1. At a global level,  you can export the entire repository any time there is a change or a task added. This will require some manual steps or scripting to produce a file called Replication_Definition.json which you can then commit.

       a. Stop all running tasks

       b. export Replicate repository (with server info):

       Running command prompt as administrator:

       Example:

        C:\Program Files\Attunity\Replicate\bin> repctl -d "C:\Program Files\Attunity\Replicate\data"         exportrepository include_server_settings=TRUE

output should look like this:

{

"message": "Export succeeded",

"file_path": "C:\\Program Files\\Attunity\\Replicate\\data\\imports\\Replication_Definition.json"

}

[exportrepository command] Succeeded

2. At the task level, you can use the following repctl command to download the task .json anytime a change is made. This option may be helpful if you want to commit/track at the task level.

C:\Program Files\Attunity\Replicate\bin>repctl exportrepository task=test_juli

command exportrepository response:

{

        "message":      "Export succeeded",

        "file_path":    "C:\\Program Files\\Attunity\\Replicate\\data\\imports\\test_juli.json"

}

[exportrepository command] Succeeded

 

Note: if you did revert to an older version of a task/Replication_Definition.json file you would most likely need to do a reload or a restart from timestamp to reproduce associated metadata or sqlite files to get the task up and running.

Further reference:

https://help.qlik.com/en-US/replicate/November2021/Content/Global_Common/Content/SharedEMReplicate/D...

https://community.qlik.com/t5/Knowledge/Repctl-Stop-Start-Task-using-REPCTL-command-line-interface/t...

https://hdfiles.jitbit.com/getfile/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzM3BhdGgiOiIzMjQ0OC8yOTM5...

Best,

Kelly

Heinvandenheuvel
Specialist II
Specialist II

Good advise @KellyHobson 

A few remarks - 

  • No need at all to stop tasks before requesting an export repository.
  • You can often (most of the time?) just STOP, IMPORT and RESUME  to revert a change. Changed tables will be reloaded as needed.
  • Folks often struggle when using REPCTL for the first time
    • Make sure REPCTL.EXE is in the current PATH
    • Provide the Replicate Datadirectory with the -d command option (optional if default directory)
    • TEST with REPCTL -D <data> VERSION
  • The Export Repository output has a date-stamp inside. Copy and/or rename the output to have a data.
  • Save the master json (with datestamp) but take it all apart (with some PowerShell or Perl or Awk script as you please into indivual files for tasks,databases,(server)settings and make those files your source control (subversion or otherwise) objects.
  • Check out REPCTL GETTASKLIST for to drive a script to get individual task JSONs. I'd still take them apart into the tasks itself, and the (two) databases used. REPCTL -d xx HELP OPTION=1 for a list of all commands.
  • Consider using the Enterprise Manager Replicate API to get your (task) JSON's

hth,

Hein.

lyka
Support
Support

Hi @jonna,

 

Please let us know if any of the proposed solution solves your issue

 

Thanks

Lyka

jonna
Partner - Creator
Partner - Creator
Author

thanks very much @lyka  and @Heinvandenheuvel  and @KellyHobson 

 

I am beginning the migration to different environment on Monday. This advice looks like a great help.

 

cheers, jonna