Skip to main content

Mode

For context on getting started with ingestion, check out our metadata ingestion guide.

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} 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' 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

NameDescription
FiltersFilters applied to the chart
MetricsFields or columns used for aggregation
XFields used in X-axis
X2Fields used in second X-axis
YFields used in Y-axis
Y2Fields used in second Y-axis

Table Information

NameDescription
ColumnsColumn names in a table
FiltersFilters applied to the table

Pivot Table Information

NameDescription
ColumnsColumn names in a table
FiltersFilters applied to the table
MetricsFields or columns used for aggregation
RowsRow names in a table

Quickstart recipe

Check out the following recipe to get started with ingestion! See below for full configuration options.

For general pointers on writing and running a recipe, see our main recipe guide.

source:
type: mode
config:
# Coordinates
connect_uri: http://app.mode.com

# Credentials
token: token
password: pass

# Options
workspace: "datahub"
default_schema: "public"
owner_username_instead_of_email: False
api_options:
retry_backoff_multiplier: 2
max_retry_interval: 10
max_attempts: 5

sink:
# sink configs

Config details

FieldRequiredDefaultDescription
connect_uri"https://app.mode.com"Mode host URL.
tokenMode user token.
passwordMode password for authentication.
default_schemapublicDefault 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_emailTrueUse username for owner URN instead of Email
api_optionsRetry/Wait settings for Mode API to avoid "Too many Requests" error. See Mode API Options below

See Mode's Authentication documentation on how to generate token and password.


Mode API Options

FieldRequiredDefaultDescription
retry_backoff_multiplier1Multiplier for exponential backoff when waiting to retry
max_retry_interval10Maximum interval to wait when retrying
max_attempts5Maximum number of attempts to retry before failing

Compatibility

N/A

Questions

If you've got any questions on configuring this source, feel free to ping us on our Slack!