Exporting Data from Data Warehouse

To export data from Agile Data Warehouse Service (ADS), you must contact GoodData Support to enable the ADS export add-on. The add-on enables workspace administrators to export data from their ADS instance. Before following any of the instructions in this article, contact GoodData support to request the add-on. With the assistance of GoodData Support, additional user roles can be granted permission to export data from ADS.

Contents:

Create an ADS Data Source

Before you can export data from ADS, you must first create an Agile Data Warehouse Service Data Source. The option to create an Agile Data Warehouse Service Data Source is available only if you have access to an ADS instance and the enableADSDataSource platform setting is set to true. Otherwise, the option is not visibile. For more information on how to configure platform settings, see Configure Various Features via Platform Settings. For more information on how to create a Data Source, see Create a Data Source.

Export ADS Data

After you have created an ADS Data Source, users with the appropriate permissions can send an SQL query by making a POST request to https://<your_domain>/gdc/projects/<project_id>/unload/executeQuery using the following format: 

POST https://<your_domain>/gdc/projects/<project_id>/unload/executeQuery
{
  "executeQuery": {
    "dataSourceAlias": "<ads_datasource_alias>",
    "query": "<sql_query>",
    "setting": {
      "preview": true|false
    } 
  }
}

Parameters:

  • your_domain

    The domain name for where your workspace resides. For example, secure.gooddata.com.

  • project_id

    The workspace ID where the ADS Data Source is located. For more information, see Find the Workspace ID.

  • ads_datasource_alias

    The alias of the ADS Data Source to be exported.

  • sql_query

    The SQL query to execute. Retrieved contents are exported.

    Limits:

    • SQL queries cannot be nested.
    • Data can be exported from only a single table or view at a time.
    • Data from ADS system tables cannot be exported.
    • Only LCM workspaces can be exported when you export data from a table with an x__client_id column. For more information, see Managing Workspaces via Life Cycle Management.
  • preview

    Determines whether the data is returned in the response body or is uploaded to the user staging folder as a zip file when you poll the task.

    • true

      Returns the data in the response body.

    • false

      Uploads the data as a zip file to the user staging folder. For more information, see User Specific Data Storage.

Retrieve Exported Data

After you export the data, you must poll the URL to retrieve the data.

{
    "asyncTask": {
        "links": {
            "poll": "<your_domain>/gdc/projects/<project_id>/unload/executeQuery/<task_id>"
        }
    }
}