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 Models in GoodData
Overview
The following operations allow you to work with data models. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with data models, see Sample configuration.
Operation | Description |
---|---|
Executes MAQL DDL scripts for data model management. | |
getTaskStatus | Retrieves the asynchronous task status. |
Operation details
This section provides details on the operations.
Creating a project model
The createProjectModel
operation is used as a resource for executing MAQL DDL scripts for data model management. The resource is asynchronous, so you have to poll the returned URL to get the result.
<gooddata.createProjectModel> <projectId>{$ctx:projectId}</projectId> <maql>{$ctx:maql}</maql> </gooddata.createProjectModel>
Properties
projectId:
Required - Refers to the ID of the project.maql:
The MAQL script to execute.
Sample request
Following is a sample REST request that can be handled by the createProjectModel operation.
{ "apiUrl":"https://secure.gooddata.com", "username":"user@gmail.com", "password":"user@123", "remember":1, "projectId":"qy48iv4flikdlcwpwioizuip74wt8nb5", "maql" : "CREATE DATASET {ds.hrdemo} VISUAL (TITLE 'HR Demo', DESCRIPTION 'Dataset with basic attributes and facts from HR Demo model');" }
Related GoodData documentation
http://docs.gooddata.apiary.io/#post-%2Fgdc%2Fmd%2F%7Bproject-id%7D%2Fldm%2Fmanage2
Retrieving task status
The getTaskStatus
operation is used as a resource for retrieving the asynchronous task status.
<gooddata.getTaskStatus> <taskId>{$ctx:taskId}</taskId> <projectId>{$ctx:projectId}</projectId> </gooddata.getTaskStatus>
Properties
taskId:
Required - The task ID.projectId:
Required - The project ID.
Sample request
Following is a sample REST request that can be handled by the getTaskStatus
operation.
{ "apiUrl":"https://secure.gooddata.com", "username":"user@gmail.com", "password":"user@123", "remember":1, "projectId":"qy48iv4flikdlcwpwioizuip74wt8nb5", "taskId":"1180ba42548140babbffe6d9d20ce44b00000039" }
Related GoodData documentation
http://docs.gooddata.apiary.io/#get-%2Fgdc%2Fmd%2F%7Bproject-id%7D%2Ftasks%2F%7Btask-id%7D%2Fstatus
Sample configuration
Following is a sample proxy service that illustrates how to connect to GoodData with the init
operation and use the createProjectModel
operation. The sample request for this proxy can be found in createProjectModel sample request. You can use the sample below as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="gooddata_createProjectModel" 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)"/> <property name="maql" expression="json-eval($.maql)"/> <gooddata.init> <remember>{$ctx:remember}</remember> <username>{$ctx:username}</username> <apiUrl>{$ctx:apiUrl}</apiUrl> <password>{$ctx:password}</password> </gooddata.init> <gooddata.createProjectModel> <projectId>{$ctx:projectId}</projectId> <maql>{$ctx:maql}</maql> </gooddata.createProjectModel> <respond></respond> </inSequence> <outSequence> <send></send> </outSequence> </target> </proxy>