Public Repository for GoodData Demos and Packages
This is an example of using gooddemo sample data
- There is an existing user in adminGroup
- Prepare the data source for demo
- Connect to your snowflake data source, run the snowflake.ddl to create your demo data source
- Loading sample data in .csv files into your snowflake data source if this is created in 2.1
- You can ignore this step if you just want to use the existing sample data source of gooddata (already defined in gooddemo sample data)
- Setting the environment variables (replace the GDC_API_TOKEN and ENDPOINT value by yours) by command
- Contact support team to get the GDC_API_TOKEN (refer "https://docs-dev.anywhere.gooddata.com/1.7/administration/auth/").
- At the moment, we are testing on endpoint "https://qa.stg11.intgdc.com".
GDC_API_TOKEN="<TOKEN>"
ENDPOINT="<endpoint url>"
We will create a data source the same as the existing GoodDemo data source
Using content body in this file, just replace the password value (, you can change the name and the id of your data source if required)
You can also change the url, username and password if you have an existing one or you created it in Step 2 of ## Before you start
For example:
curl --request POST \
--header "Authorization: Bearer $GDC_API_TOKEN" \
--header 'Content-Type: application/vnd.gooddata.api+json' \
--data '{
"data": {
"attributes": {
"name": "GDC Good Demo Data source",
"url": "jdbc:snowflake://xjtztmi-wf97506.snowflakecomputing.com?warehouse=TEST_WAREHOUSE&db=TEST",
"schema": "gooddemo",
"type": "SNOWFLAKE",
"username": "thuantran",
"password": "<your password>"
},
"id": "gdc_ds_gooddemo",
"type": "dataSource"
}
}' $ENDPOINT/api/entities/dataSources
We will create a data source the same as the existing GoodDemo physical data model
Using content body in this file, just replace the by id in Step 1, in this example, it is: gdc_ds_gooddemo
For example:
curl --request PUT \
--header "Authorization: Bearer $GDC_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '@./gooddemo/dataSource/pdm.json' $ENDPOINT/api/layout/dataSources/<dataSourceId>/physicalModel
We will create a data source the same as the existing GoodDemo / demo workspace
Using content body in this file, you can change the name and the id of your workspace if required
For example:
curl --request POST \
--header "Authorization: Bearer $GDC_API_TOKEN" \
--header 'Content-Type: application/vnd.gooddata.api+json' \
--data '{
"data": {
"attributes": {
"name": "Demo"
},
"id": "demo",
"type": "workspace"
}
}' $ENDPOINT/api/entities/workspaces
Copy the content data of demo workspace logical data model and analytics into one model
Replace the by id in Step 3, in this example, it is: demo
And then perform the API call as below (replace model of ldm and analytics by the appropriate content from above files)
curl --request PUT \
--header "Authorization: Bearer $GDC_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"ldm": {...},
"analytics": {...}
}' $ENDPOINT/api/layout/workspaces/<workspaceId>
We will create a workspace logical data model the same as the existing demo workspace logical data model
Using content body in this file, just replace the by id in Step 3, in this example, it is: demo
For example:
curl --request PUT \
--header "Authorization: Bearer $GDC_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '@./gooddemo/workspaces/demo/ldm.json' $ENDPOINT/api/layout/workspaces/<workspaceId>