Hey there! Is there a way I can copy a development...
# gooddata-platform
p
Hey there! Is there a way I can copy a development workspace's configuration (dashboards, metrics, insights) from my dev domain to my test domain?
🙌 1
1
m
Sure Philippe, depending on what all you want to copy you can use these mechanisms: • partial metadata export&import ◦ this serves for migrating metadata objects (dashboards, metrics, insights) between existing workspaces ◦ you select which object(s) to export from one workspace, you will receive a “token” and use this “token” in the target workspace to import the metadata ◦ internally it uses the identifiers to determine what is the same object and should be overwritten ◦ the export and import are done in a cascade so if you export just a dashboard, it will also export all the insights and all the metrics used in it ◦ the source and target workspaces should have the same logical data model otherwise the import can fail if some referenced object does not exist in the model ◦ It is described here: https://help.gooddata.com/pages/viewpage.action?pageId=86796809full export&import (cloning) ◦ this is good if you want to create an exact copy of existing workspace ◦ it will not only copy ALL the dashboards, insights and metrics but also the whole data model and there is also an option to copy the data and even the users ◦ again you export the workspace into a “token” and then import it to a blank workspace (it can not be done into a workspace which already contains anything in it). ▪︎ It is described here: https://help.gooddata.com/pages/viewpage.action?pageId=86796786 ◦ Note that this method does not transfer some selected features ▪︎ data loading processes and schedules are not transferred. You can use the export&import pipeline feature to do so afterwards. ▪︎ the Logical Data Model Mapping (i.e. to your source tables in ADDv2) are not transferred. You can use the export&import model feature to do so afterwards.
Since both these methods require some switching between the standard UI and “the grey pages” (simple API interface), you might find useful this GoodData Extension for Chrome if you are using this browser. It simplifies some tasks and provides easier navigation to the most often used gray pages. There is a whole help page about it here: https://help.gooddata.com/doc/enterprise/en/workspace-and-user-administration/adminis[…]ces-and-workspace-objects/gooddata-extension-tool-for-chrome
p
Hi Michal! As always, that's a wonderfully clear and detailed answer. You are a champ! Thanks for the info, that clearly answers my question.
I just attempted the steps to do a partial md export from our dev to test domain, and I get the following error:
Copy code
{
  "error": {
    "component": "GDC::Project::Package::Exporter::DFSExporter",
    "errorClass": "GDC::Exception::NotFound",
    "message": "Package related to token \"%s\" is no longer available.",
    "parameters": [
      "<redacted>"
    ],
    "requestId": "4utoHgbcefT5CL9q:ugj37sl6gqkegkn1"
  }
}
Steps taken: 1. Obtain object ID for an analytical dashboard on dev domain using
https://{dev-domain}.<http://on.gooddata.com/gdc/md/{project}/query/analyticaldashboard|on.gooddata.com/gdc/md/{project}/query/analyticaldashboard>
2. Fill up the
https://{dev-domain}.<http://on.gooddata.com/gdc/md/{project}/maintenance/partialmdexport|on.gooddata.com/gdc/md/{project}/maintenance/partialmdexport>
with the object ID obtained in 1 3. Copy the token generated in 2 4. Paste token generated in 2 in
https://{test-domain}.<http://on.gooddata.com/gdc/md/{project}/maintenance/partialmdimport|on.gooddata.com/gdc/md/{project}/maintenance/partialmdimport>
5. Get the above error
Is the grey pages method reserved only for copies between workspaces on the same domain?
m
The partial MD export/import should also work across domains. If there was not a typo in the token, and if you have not mistakenly used the API for full import instead of the partial import, then I would suggest to try again and check the “_available across US/EU data centers_” option while exporting. This should ensure that it works also if by some chance your dev and test domains were in different datacenters (but I do not think that is very probable).
👍 1
p
OK, I'll do another attempt right now
Should I check
add necessary data required to clone attribute properties
?
m
that is usually not needed. I believe it allows to transfer some special attribute configuration like drill paths, label types etc. But that should not be needed for standard tranfer.
p
No luck, that doesn't work either
m
is it failing on the export or on the import?
p
I think the export - I just clicked on the status uri of the export and it gives me the following error:
Copy code
{
  "error": {
    "component": "GDC::Maintenance::PartialMD",
    "errorClass": "GDC::Exception::User",
    "message": "Can't export metadata, there is no object of id \"%s\".",
    "parameters": [
      "analyticaldashboard"
    ],
    "requestId": "OZpzlcNp0muKyjYN:0l79k1n2fky1s2r2"
  }
}
OK, I think I had the wrong dashboard URL, it's proceeding
👍 1
m
Great. Just one more note - between the steps 3. Copy the token generated in 2 and 4. Paste token generated in 2 in
https://{test-domain}.<http://on.gooddata.com/gdc/md/{project}/maintenance/partialmdimport|on.gooddata.com/gdc/md/{project}/maintenance/partialmdimport>
you need to wait till the export API finishes - you just click the link it gives you (copy the token first, it will not give it to you again) and wait till the polling link returns status “OK” it usually takes between a few seconds to a few minutes depending on the complexity of the export
p
Great! It worked! That's lovely, will save me a great deal of time 😃
🙌 1