2021-12-09 16:10:08 -08:00
|
|
|
# Mode
|
|
|
|
|
|
|
|
For context on getting started with ingestion, check out our [metadata ingestion guide](../README.md).
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
To install this plugin, run `pip install 'acryl-datahub[mode]'`.
|
|
|
|
|
|
|
|
See documentation for Mode's API at https://mode.com/developer/api-reference/introduction/
|
|
|
|
|
|
|
|
|
|
|
|
## Capabilities
|
|
|
|
|
|
|
|
This plugin extracts Charts, Reports, and associated metadata from a given Mode workspace. This plugin is in beta and has only been tested
|
|
|
|
on PostgreSQL database.
|
|
|
|
|
|
|
|
### Report
|
|
|
|
|
|
|
|
[/api/{account}/reports/{report}](https://mode.com/developer/api-reference/analytics/reports/) endpoint is used to
|
|
|
|
retrieve the following report information.
|
|
|
|
|
|
|
|
- Title and description
|
|
|
|
- Last edited by
|
|
|
|
- Owner
|
|
|
|
- Link to the Report in Mode for exploration
|
|
|
|
- Associated charts within the report
|
|
|
|
|
|
|
|
### Chart
|
|
|
|
|
|
|
|
[/api/{workspace}/reports/{report}/queries/{query}/charts'](https://mode.com/developer/api-reference/analytics/charts/#getChart) endpoint is used to
|
|
|
|
retrieve the following information.
|
|
|
|
|
|
|
|
- Title and description
|
|
|
|
- Last edited by
|
|
|
|
- Owner
|
|
|
|
- Link to the chart in Metabase
|
|
|
|
- Datasource and lineage information from Report queries.
|
|
|
|
|
|
|
|
The following properties for a chart are ingested in DataHub.
|
|
|
|
|
|
|
|
#### Chart Information
|
|
|
|
| Name | Description |
|
|
|
|
|-----------|----------------------------------------|
|
|
|
|
| `Filters` | Filters applied to the chart |
|
|
|
|
| `Metrics` | Fields or columns used for aggregation |
|
|
|
|
| `X` | Fields used in X-axis |
|
|
|
|
| `X2` | Fields used in second X-axis |
|
|
|
|
| `Y` | Fields used in Y-axis |
|
|
|
|
| `Y2` | Fields used in second Y-axis |
|
|
|
|
|
|
|
|
|
|
|
|
#### Table Information
|
|
|
|
| Name | Description |
|
|
|
|
|-----------|------------------------------|
|
|
|
|
| `Columns` | Column names in a table |
|
|
|
|
| `Filters` | Filters applied to the table |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### Pivot Table Information
|
|
|
|
| Name | Description |
|
|
|
|
|-----------|----------------------------------------|
|
|
|
|
| `Columns` | Column names in a table |
|
|
|
|
| `Filters` | Filters applied to the table |
|
|
|
|
| `Metrics` | Fields or columns used for aggregation |
|
|
|
|
| `Rows` | Row names in a table |
|
|
|
|
|
|
|
|
## Quickstart recipe
|
|
|
|
|
|
|
|
Check out the following recipe to get started with ingestion! See [below](#config-details) for full configuration options.
|
|
|
|
|
|
|
|
For general pointers on writing and running a recipe, see our [main recipe guide](../README.md#recipes).
|
|
|
|
|
|
|
|
```yml
|
|
|
|
source:
|
|
|
|
type: mode
|
|
|
|
config:
|
|
|
|
# Coordinates
|
|
|
|
connect_uri: http://app.mode.com
|
|
|
|
|
|
|
|
# Credentials
|
|
|
|
token: token
|
|
|
|
password: pass
|
|
|
|
|
|
|
|
# Options
|
|
|
|
workspace: "datahub"
|
|
|
|
default_schema: "public"
|
|
|
|
|
|
|
|
sink:
|
|
|
|
# sink configs
|
|
|
|
```
|
|
|
|
|
|
|
|
## Config details
|
|
|
|
|
2021-12-10 17:56:39 -08:00
|
|
|
| Field | Required | Default | Description |
|
|
|
|
|-----------------------------------| -------- |--------------------------|-------------------------------------------------------------------|
|
|
|
|
| `connect_uri` | ✅ | `"https://app.mode.com"` | Mode host URL. |
|
|
|
|
| `token` | ✅ | | Mode user token. |
|
|
|
|
| `password` | ✅ | | Mode password for authentication. |
|
|
|
|
| `default_schema` | | `public` | Default schema to use when schema is not provided in an SQL query |
|
|
|
|
| `env` | | `"PROD"` | Environment to use in namespace when constructing URNs. |
|
|
|
|
| `owner_username_instead_of_email` | | `True` | Use username for owner URN instead of Email |
|
2021-12-09 16:10:08 -08:00
|
|
|
|
|
|
|
See Mode's [Authentication documentation](https://mode.com/developer/api-reference/authentication/) on how to generate `token` and `password`.
|
|
|
|
|
|
|
|
## Compatibility
|
|
|
|
|
2021-12-10 17:56:39 -08:00
|
|
|
N/A
|
2021-12-09 16:10:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
## Questions
|
|
|
|
|
|
|
|
If you've got any questions on configuring this source, feel free to ping us on
|
|
|
|
[our Slack](https://slack.datahubproject.io/)!
|