Preset
Important Capabilities
Capability | Status | Notes |
---|---|---|
Detect Deleted Entities | ✅ | Enabled by default via stateful ingestion. |
Domains | ✅ | Enabled by domain config to assign domain_key. |
Extract Tags | ✅ | Supported by default. |
Table-Level Lineage | ✅ | Supported by default. |
Variation of the Superset plugin that works with Preset.io (Apache Superset SaaS).
CLI based Ingestion
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: preset
config:
# Coordinates
connect_uri: Preset workspace URL
manager_uri: https://api.app.preset.io
# Credentials
api_key: API key
api_secret: API secret
database_alias:
example_name_1: business_name_1
example_name_2: business_name_2
sink:
# sink configs
Config Details
- Options
- Schema
Note that a .
is used to denote nested fields in the YAML recipe.
Field | Description |
---|---|
api_key One of string, null | Preset.io API key. Default: None |
api_secret One of string, null | Preset.io API secret. Default: None |
connect_uri string | Preset workspace URL. Default: |
database_alias map(str,string) | |
display_uri One of string, null | optional URL to use in links (if connect_uri is only for ingestion) Default: None |
ingest_charts boolean | Enable to ingest charts. Default: True |
ingest_dashboards boolean | Enable to ingest dashboards. Default: True |
ingest_datasets boolean | Enable to ingest datasets. Default: False |
manager_uri string | Preset.io API URL Default: https://api.app.preset.io |
max_threads integer | Max parallelism for API calls. Defaults to cpuCount or 40 |
options object | Default: {} |
password One of string, null | Superset password. Default: None |
platform_instance One of string, null | The instance of the platform that all assets produced by this recipe belong to. This should be unique within the platform. See https://docs.datahub.com/docs/platform-instances/ for more details. Default: None |
provider string | Superset provider. Default: db |
timeout integer | Timeout of single API call to superset. Default: 10 |
username One of string, null | Superset username. Default: None |
env string | Environment to use in namespace when constructing URNs Default: PROD |
chart_pattern AllowDenyPattern | A class to store allow deny regexes |
chart_pattern.ignoreCase One of boolean, null | Whether to ignore case sensitivity during pattern matching. Default: True |
dashboard_pattern AllowDenyPattern | A class to store allow deny regexes |
dashboard_pattern.ignoreCase One of boolean, null | Whether to ignore case sensitivity during pattern matching. Default: True |
database_pattern AllowDenyPattern | A class to store allow deny regexes |
database_pattern.ignoreCase One of boolean, null | Whether to ignore case sensitivity during pattern matching. Default: True |
dataset_pattern AllowDenyPattern | A class to store allow deny regexes |
dataset_pattern.ignoreCase One of boolean, null | Whether to ignore case sensitivity during pattern matching. Default: True |
domain map(str,AllowDenyPattern) | A class to store allow deny regexes |
domain. key .allowarray | List of regex patterns to include in ingestion Default: ['.*'] |
domain. key .allow.stringstring | |
domain. key .ignoreCaseOne of boolean, null | Whether to ignore case sensitivity during pattern matching. Default: True |
domain. key .denyarray | List of regex patterns to exclude from ingestion. Default: [] |
domain. key .deny.stringstring | |
stateful_ingestion One of StatefulStaleMetadataRemovalConfig, null | Preset Stateful Ingestion Config. Default: None |
stateful_ingestion.enabled boolean | Whether or not to enable stateful ingest. Default: True if a pipeline_name is set and either a datahub-rest sink or datahub_api is specified, otherwise False Default: False |
stateful_ingestion.fail_safe_threshold number | Prevents large amount of soft deletes & the state from committing from accidental changes to the source configuration if the relative change percent in entities compared to the previous state is above the 'fail_safe_threshold'. Default: 75.0 |
stateful_ingestion.remove_stale_metadata boolean | Soft-deletes the entities present in the last successful run but missing in the current run with stateful_ingestion enabled. Default: True |
The JSONSchema for this configuration is inlined below.
{
"$defs": {
"AllowDenyPattern": {
"additionalProperties": false,
"description": "A class to store allow deny regexes",
"properties": {
"allow": {
"default": [
".*"
],
"description": "List of regex patterns to include in ingestion",
"items": {
"type": "string"
},
"title": "Allow",
"type": "array"
},
"deny": {
"default": [],
"description": "List of regex patterns to exclude from ingestion.",
"items": {
"type": "string"
},
"title": "Deny",
"type": "array"
},
"ignoreCase": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": true,
"description": "Whether to ignore case sensitivity during pattern matching.",
"title": "Ignorecase"
}
},
"title": "AllowDenyPattern",
"type": "object"
},
"StatefulStaleMetadataRemovalConfig": {
"additionalProperties": false,
"description": "Base specialized config for Stateful Ingestion with stale metadata removal capability.",
"properties": {
"enabled": {
"default": false,
"description": "Whether or not to enable stateful ingest. Default: True if a pipeline_name is set and either a datahub-rest sink or `datahub_api` is specified, otherwise False",
"title": "Enabled",
"type": "boolean"
},
"remove_stale_metadata": {
"default": true,
"description": "Soft-deletes the entities present in the last successful run but missing in the current run with stateful_ingestion enabled.",
"title": "Remove Stale Metadata",
"type": "boolean"
},
"fail_safe_threshold": {
"default": 75.0,
"description": "Prevents large amount of soft deletes & the state from committing from accidental changes to the source configuration if the relative change percent in entities compared to the previous state is above the 'fail_safe_threshold'.",
"maximum": 100.0,
"minimum": 0.0,
"title": "Fail Safe Threshold",
"type": "number"
}
},
"title": "StatefulStaleMetadataRemovalConfig",
"type": "object"
}
},
"additionalProperties": true,
"properties": {
"platform_instance": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The instance of the platform that all assets produced by this recipe belong to. This should be unique within the platform. See https://docs.datahub.com/docs/platform-instances/ for more details.",
"title": "Platform Instance"
},
"env": {
"default": "PROD",
"description": "Environment to use in namespace when constructing URNs",
"title": "Env",
"type": "string"
},
"stateful_ingestion": {
"anyOf": [
{
"$ref": "#/$defs/StatefulStaleMetadataRemovalConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Preset Stateful Ingestion Config."
},
"connect_uri": {
"default": "",
"description": "Preset workspace URL.",
"title": "Connect Uri",
"type": "string"
},
"display_uri": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "optional URL to use in links (if `connect_uri` is only for ingestion)",
"title": "Display Uri"
},
"domain": {
"additionalProperties": {
"$ref": "#/$defs/AllowDenyPattern"
},
"default": {},
"description": "Regex patterns for tables to filter to assign domain_key. ",
"title": "Domain",
"type": "object"
},
"dataset_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns for dataset to filter in ingestion."
},
"chart_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Patterns for selecting chart names that are to be included"
},
"dashboard_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Patterns for selecting dashboard names that are to be included"
},
"database_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns for databases to filter in ingestion."
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Superset username.",
"title": "Username"
},
"password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Superset password.",
"title": "Password"
},
"ingest_dashboards": {
"default": true,
"description": "Enable to ingest dashboards.",
"title": "Ingest Dashboards",
"type": "boolean"
},
"ingest_charts": {
"default": true,
"description": "Enable to ingest charts.",
"title": "Ingest Charts",
"type": "boolean"
},
"ingest_datasets": {
"default": false,
"description": "Enable to ingest datasets.",
"title": "Ingest Datasets",
"type": "boolean"
},
"provider": {
"default": "db",
"description": "Superset provider.",
"title": "Provider",
"type": "string"
},
"options": {
"additionalProperties": true,
"default": {},
"description": "",
"title": "Options",
"type": "object"
},
"timeout": {
"default": 10,
"description": "Timeout of single API call to superset.",
"title": "Timeout",
"type": "integer"
},
"max_threads": {
"description": "Max parallelism for API calls. Defaults to cpuCount or 40",
"title": "Max Threads",
"type": "integer"
},
"database_alias": {
"additionalProperties": {
"type": "string"
},
"default": {},
"description": "Can be used to change mapping for database names in superset to what you have in datahub",
"title": "Database Alias",
"type": "object"
},
"manager_uri": {
"default": "https://api.app.preset.io",
"description": "Preset.io API URL",
"title": "Manager Uri",
"type": "string"
},
"api_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Preset.io API key.",
"title": "Api Key"
},
"api_secret": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Preset.io API secret.",
"title": "Api Secret"
}
},
"title": "PresetConfig",
"type": "object"
}
If you were using database_alias
in one of your other ingestions to rename your databases to something else based on business needs you can rename them in superset also
source:
type: preset
config:
# Coordinates
connect_uri: Preset workspace URL
manager_uri: https://api.app.preset.io
# Credentials
api_key: API key
api_secret: API secret
database_alias:
example_name_1: business_name_1
example_name_2: business_name_2
sink:
# sink configs
Code Coordinates
- Class Name:
datahub.ingestion.source.preset.PresetSource
- Browse on GitHub
Questions
If you've got any questions on configuring ingestion for Preset, feel free to ping us on our Slack.
Is this page helpful?