# GoodData Reports

The GoodData Reports data source connector uses the [GoodData API](https://help.gooddata.com/display/API/API+Reference#/reference/dashboards-and-reporting/export-a-large-report/export-a-raw-report) to import
reports from the [GoodData](https://www.gooddata.com/) business intelligence platform and stores the data in Keboola Storage.

**Before you start**

You need:

- **A GoodData user name and password** for a user who can open the reports you want to export.
- **Your GoodData host and the URI of each report,** for example the host `secure.gooddata.com`. Both are in the report's URL; see Reports (#reports).

What each tab needs:

- **Prompt tab:** Kai, the **Kai Agent** button in the top bar, on supported stacks. A new Free Plan project has it from the start; elsewhere an organization admin turns it on once: Get started with Kai (/kai/getting-started/).
- **UI tab:** a browser.
- **CLI / API tab:** kbagent (/cli/getting-started/), connected to your project. The checks only read.

## Configuration
[Create a new configuration](https://help.keboola.com/components/configurations/#create-a-configuration) of the **GoodData Reports** connector.
Type in your GoodData host: secure.gooddata.com, keboola.eu.gooddata.com, or a custom host. Find the host
by opening the report you wish to extract.

![Screenshot - GoodData Host](https://help.keboola.com/components/extractors/marketing-sales/gooddata-reports/gooddata-reports-1.png)

### Reports
To select which reports to download, set one or multiple Uniform Resource Identifiers (URI).

![Screenshot - GoodData URI](https://help.keboola.com/components/extractors/marketing-sales/gooddata-reports/gooddata-reports-2.png)

When you open a report in your browser, the URL in the address field will look similar to this:

```
https://secure.gooddata.com/#s=/gdc/projects/wasxxxxxxxxxxxxxxxxxxxxxxxxxmox|analysisPage|head|/gdc/md/zggxxxxxxxxxxxxxxxxxxxxxxxxxmox/obj/71
```

The part in form `/gdc/md/zggxxxxxxxxxxxxxxxxxxxxxxxxxmox/obj/71` is the report URI.

### Credentials
Continue by providing your own GoodData **credentials**.

![Screenshot - GoodData Credentials](https://help.keboola.com/components/extractors/marketing-sales/gooddata-reports/gooddata-reports-3.png)

You can also choose an ID of the **GoodData Project** provisioned in one of the existing GoodData data destination connector configurations 
and use its credentials. The project ID (PID) of the provisioned project can be found in a GoodData data destination connector configuration.

![Screenshot - GoodData Data Destination Config with Provisioned Project](https://help.keboola.com/components/extractors/marketing-sales/gooddata-reports/gooddata-writer-1.png)

Copy the project ID from the data destination connector to the data source connector:

![Screenshot - Provisioned GoodData Project Id](https://help.keboola.com/components/extractors/marketing-sales/gooddata-reports/gooddata-reports-4.png)

When finished, remember to **Save** the configuration before you run the extraction. The data source connector will download the report contents as a
CSV file and store it as a table in Keboola Storage.

**Check:**

#### Prompt

```text title="Prompt" wrap
Did the latest job of my GoodData Reports configuration succeed, and which tables did it load, with row counts?
```

Kai only reads here, so it asks for no approval, and its answer links to what it found in your project.

#### UI

The job ends with status **Success** and Storage has one table per report, named after the report's
object ID, the number at the end of its URI (`71` in the example above).

#### CLI / API

```bash
kbagent job list --component-id keboola.ex-gooddata --config-id 123456789 --limit 1
kbagent storage tables --bucket-id in.c-keboola-ex-gooddata-123456789
```

Replace `123456789` with your configuration ID: `status` shows whether the job succeeded, and `id` and `rows_count` list the tables it loaded.

---
