Skip to main content

Mode

Module mode

Certified

Important Capabilities

CapabilityStatusNotes
Platform InstanceEnabled by default

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

CLI based Ingestion

Install the Plugin

pip install 'acryl-datahub[mode]'

Starter 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

Note that a . is used to denote nested fields in the YAML recipe.

View All Configuration Options
Field [Required]TypeDescriptionDefaultNotes
password [✅]string(password)Mode password for authentication.None
token [✅]stringMode user token.None
connect_uristringMode host URL.https://app.mode.com
default_schemastringDefault schema to use when schema is not provided in an SQL querypublic
owner_username_instead_of_emailbooleanUse username for owner URN instead of EmailTrue
platform_instance_mapmap(str,string)None
workspacestringNone
envstringThe environment that all assets produced by this connector belong toPROD
api_optionsModeAPIConfigRetry/Wait settings for Mode API to avoid "Too many Requests" error. See Mode API Options below{'retry_backoff_multiplier': 2, 'max_retry_interval': 10, 'max_attempts': 5}
api_options.max_attemptsintegerMaximum number of attempts to retry before failing5
api_options.max_retry_intervalUnionType (See notes for variants)Maximum interval to wait when retrying10One of integer,number
api_options.retry_backoff_multiplierUnionType (See notes for variants)Multiplier for exponential backoff when waiting to retry2One of integer,number

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

Code Coordinates

  • Class Name: datahub.ingestion.source.mode.ModeSource
  • Browse on GitHub

Questions

If you've got any questions on configuring ingestion for Mode, feel free to ping us on our Slack