This tutorial describes advanced project management techniques in CleverMaps Shell.
...
The process of creating a project clone is very similar to the process of importing a data dimension. Data dimension is a project like any other, so by importing it to your own project, you're actually creating a clone of it.If we want to create a fresh, clean clone, we have to create a new project for it first. simple.
Log in to CleverMaps Shell and create a new project using the createProject
use cloneProject
command.
Code Block | ||||
---|---|---|---|---|
| ||||
CleverMaps$ login Found config file: /home/tomas/.cleverMaps/config * setting https:/var/local/metadata/secure.clevermaps.io as default dumpserver directory * setting https:/var/local/secure.clevermaps.iometadata as default serverdump directory Successfully logged in as tomas.schmidl@clevermaps.io tomas.schmidl@secure.clevermaps.io$ createProject --title "First project (clone)" Created project c2ovon61uudj9lpm Project c2ovon61uudj9lpm (First project (clone)) successfully opened (using access token) tomas.schmidl@secure.clevermaps.io/project:c2ovon61uudj9lpm$ |
Then we use the importProject
command. We specify the --project
parameter with the project's ID, and the --server
parameter to import the project from the server.
Code Block | ||||
---|---|---|---|---|
| ||||
tomas.schmidl@secure.clevermaps.io/project:c2ovon61uudj9lpm$ importProjectio$ cloneProject --project k5t8mf2a80tay2ng --server https://secure.clevermaps.io Validating DWH model/data integrity of project k5t8mf2a80tay2ng... OK Importing project k5t8mf2a80tay2ng from server https://secure.clevermaps.io... |
Let's skip some of the importProject
command output...
Code Block | ||||
---|---|---|---|---|
| ||||
Import finished! Source project: k5t8mf2a80tay2ng (First project) Source server: https://secure.clevermaps.io Destination project: c2ovon61uudj9lpm (First project (clone)) Destination server: https://secure.clevermaps.io Imported datasets: 17 Imported metadata objects: 5 Imported CSV files: 9 To view detailed imported content, use status command. Now you can make changes, or import another project. When you're done, use addMetadata command to add the metadata to the project. To push the data to the project, use pushProject command. organization <your_organization_id> Created project c2ovon61uudj9lpm Project c2ovon61uudj9lpm successfully opened Project title: Clone of First project Organization: <your_organization> Opening dump... You don't have dump to open for this project. Starting cloning of project k5t8mf2a80tay2ng... Cloning of project m4slgmqh2ihbm62k was successful. tomas.schmidl@secure.clevermaps.io/project:c2ovon61uudj9lpm/dump:2019-01-30_14-08-31$ |
...
c2ovon61uudj9lpm$ |
Info |
---|
Cloning of project can take a few minutes. If you are having trouble with cloning, you can try server side import method below. |
Info |
---|
<your_organization_id> is provided with your CleverMaps license |
After successfully cloning project, use dumpProject to dump your project.
This creates an identical clone of the original project. A clone might serve multiple purposes. It can be used as:
...
The final step to restore the backup dump is to upload the data and metadata to the project. As usually, use addMetadata
and pushProject
to do that.
Info | ||
---|---|---|
| ||
The
|
...
And as the finish message tells us, use the usual addMetadata
and pushProject
commands to upload the updated dump to the live project.
...