Question

I'm attempting to upload graphs made/edited in Cloud Connect to GoodData via the api. I have been trying to use this call: http://docs.gooddata.apiary.io/#cloudconnectprocesses

The actual call I'm making has the json {"process": {"path": "/uploads/Bonobos_v6-1.grf", "name": "Bonobos Prod"}}

However, when I try to run this, it fails with

{
    "error": {
        "errorClass": "com.gooddata.msf.processes.InvalidProcessException",
        "trace": "",
        "message": "Can not read from file \"/uploads/Bonobos_v6-1.grf\"",
        "component": "MSF",
        "errorId": "83090caa-31c9-4ce2-bb79-040d5c4d2421",
        "errorCode": "gdc1151",
        "parameters": []
    }
}

Is there a specific way of creating a "process" that then needs to get uploaded to the server? I've tried both zip files of multiple graphs and individual .grf files, but to no avail. I'm also assuming that the error does not mean that GoodData can't see the file, but that would certainly explain some things.

Était-ce utile?

La solution

First of all you have to check where is your project located(na1 or secure). If your project resides on na1 follow this procedure:

  1. zip your CloudConnect project (it doesn't matter whether you zip whole folder or just its content)
  2. upload zip file to webdav - na1-di.gooddata.com/uploads using curl curl -k -T zippedCcProject.zip https://my_login%40company.com:my_password@na1-di.gooddata.com/uploads/zippedCcProject.zip
  3. open browser and go to the processes rest resource https://na1.secure.gooddata.com/gdc/projects/{projectId}/dataload/processes/ and fill proper attributes (type=GRAPH, name=myCloudConnectProject, path=/uploads/zippedCcProject.zip) and hit 'create the process'

Autres conseils

Before calling this API you have to upload the packed all files in your CloudConnect project and PUT them on the server. Have you done this?

So the whole process will be:

  1. ZIP archive all files (i.e. workspace.prm) and folders (graphs,meta,trans,...) from CloudConnect Project folder (please do not add data folder if there is a bigger volume of data, store them in external location then)
  2. PUT them on the webdav server (example is na1-di.gooddata.com/uploads/...)
  3. Call the API to Deploy it (the path will be "/uploads/your-folder/name-of-the-archive")

Remember: If you have your Project on https://secure.gooddata.com your webdav server is https://secure-di.gooddata.com/uploads/ if your project is on the https://na1.gooddata.com you have to use https://na1-di.gooddata.com/uploads/

Let me know if this helps you. We need to clarify this info in API docs anyway.

Thanks!

As example on how to PUT the file to the webdav server you can use following request:

curl -i -v -X PUT --data-binary @project.zip https://username%40company.com:PASSWORD@na1-di.gooddata.com/uploads/project.zip

You can check if the file is in place by accessing it via web browser. Then you can call the API as specified above.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top