This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Data Uploads in GoodData



Overview

The following operations allow you to work with data uploads. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with data uploads, see Sample configuration.

OperationDescription

getDataset

Retrieves the status of data uploads for a specific dataset.

getUploadStatusRetrieves the status of the upload pull request. 
uploadData

Executes a pull request to an already uploaded dataset.

Operation details

This section provides details on the operations.

Retrieving a dataset

The getDataset operation helps you identify datasets in your project.

getDataset
<gooddata.getDataset>
	<projectId>{$ctx:projectId}</projectId>
</gooddata.getDataset> 
Properties
  • projectId: Required - The project ID.
Sample request

Following is a sample REST request that can be handled by the getDataset operation.

Sample Request for getDataset
{
	"apiUrl":"https://secure.gooddata.com",
	"username":"user@gmail.com",
	"password":"user@123",
	"remember":"1",
	"projectId":"qy48iv4flikdlcwpwioizuip74wt8nb5"
} 
Related GoodData documentation

http://docs.gooddata.apiary.io/#get-%2Fgdc%2Fmd%2F%7Bproject-id%7D%2Fquery%2Fdatasets

Retrieving the upload status

The getUploadStatus operation retrieves the status of the upload pull request. 

getUploadStatus
<gooddata.getUploadStatus>
	<taskId>{$ctx:taskId}</taskId>
    <projectId>{$ctx:projectId}</projectId>
</gooddata.getUploadStatus> 
Properties
  • taskId: Required - The ID of the upload task.
  • projectId: Required - The ID of the project.
Sample request

Following is a sample REST request that can be handled by the getUploadStatus operation.

Sample Request for getUploadStatus
{
	"apiUrl":"https://secure.gooddata.com",
	"username":"user@gmail.com",
	"password":"user@123",
	"remember":1,
	"projectId":"qy48iv4flikdlcwpwioizuip74wt8nb5",
	"taskId":"15"
} 
Related GoodData documentation

http://docs.gooddata.apiary.io/#get-%2Fgdc%2Fmd%2F%7Bproject-id%7D%2Fetl%2Ftask%2F%7Btask-id%7D

Uploading data

The uploadData operation executes a pull request to an upload archive you have uploaded to a WebDav directory. The upload archive should be named upload.zip and must contain upload_info.json (SLI manifest) and a CSV file with the data. 

uploadData
<gooddata.uploadData>
	<pullIntegration>{$ctx:pullIntegration}</pullIntegration>
    <projectId>{$ctx:projectId}</projectId>
</gooddata.uploadData> 
Properties
  • pullIntegration: The WebDav directory with the upload archive.
  • projectId: Required - The project ID.
Sample request

Following is a sample REST request that can be handled by the uploadData operation.

Sample Request for uploadData
{
	"apiUrl":"https://secure.gooddata.com",
	"username":"user@gmail.com",
	"password":"user@123",
	"remember":1,
	"projectId":"qy48iv4flikdlcwpwioizuip74wt8nb5",
	"pullIntegration":"sarindu"
} 
Related GoodData documentation

http://docs.gooddata.apiary.io/#post-%2Fgdc%2Fmd%2F%7Bproject-id%7D%2Fetl%2Fpull

Sample configuration

Following is a sample proxy service that illustrates how to connect to GoodData with the init operation and use the getDataset operation. The sample request for this proxy can be found in getDataset sample request. You can use the sample below as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="gooddata_getDataset" transports="https" statistics="disable" trace="disable" startOnLoad="true">
  <target>
    <inSequence onError="faultHandlerSeq">
      <property name="apiUrl" expression="json-eval($.apiUrl)"/>
      <property name="username" expression="json-eval($.username)"/>
      <property name="password" expression="json-eval($.password)"/>
      <property name="remember" expression="json-eval($.remember)"/>
      <property name="projectId" expression="json-eval($.projectId)"/>    
	  <gooddata.init>
        <remember>{$ctx:remember}</remember>
        <username>{$ctx:username}</username>
        <apiUrl>{$ctx:apiUrl}</apiUrl>
        <password>{$ctx:password}</password>
	  </gooddata.init>	  
      <gooddata.getDataset>
        <projectId>{$ctx:projectId}</projectId>
      </gooddata.getDataset>
	  <respond></respond>
    </inSequence>
    <outSequence>
      <send></send>
    </outSequence>
  </target>
</proxy>