Skip to main content

Connectors

The Connectors resource (client.connectors) manages data connectors that bridge external data sources to the Qarion catalog for automated metadata scraping.

Methods

list(space_slug)

List all connectors in a space.

ParameterTypeDescription
space_slugstrSpace identifier

Returns: list[Connector]

connectors = await client.connectors.list("marketing-analytics")

get(space_slug, connector_id)

Get a connector by ID.

ParameterTypeDescription
space_slugstrSpace identifier
connector_idUUIDConnector UUID

Returns: Connector


create(space_slug, *, name, connector_type, config=, source_system_id=, **extra)

Create a new connector.

ParameterTypeDefaultDescription
space_slugstrrequiredTarget space
namestrrequiredConnector display name
connector_typestrrequiredType (postgresql, bigquery, dbt, etc.)
configdict | NoneNoneConnection configuration
source_system_idUUID | NoneNoneLinked source system

Returns: Connector

connector = await client.connectors.create(
"marketing-analytics",
name="Production PostgreSQL",
connector_type="postgresql",
config={
"host": "db.example.com",
"port": 5432,
"database": "analytics",
},
)

sync(space_slug, connector_id)

Trigger a metadata sync for a connector.

ParameterTypeDescription
space_slugstrSpace identifier
connector_idUUIDConnector UUID

Returns: SyncJob

job = await client.connectors.sync("marketing-analytics", connector_id)
print(f"Sync job started: {job.id}")

update(space_slug, connector_id, **fields)

Update a connector's configuration.

ParameterTypeDescription
space_slugstrSpace identifier
connector_idUUIDConnector UUID
**fieldsAnyFields to update

Returns: Connector


delete(space_slug, connector_id)

Delete a connector.

ParameterTypeDescription
space_slugstrSpace identifier
connector_idUUIDConnector UUID

Returns: None


upload_dbt_manifest(space_slug, connector_id, file_path)

Upload a dbt manifest.json file to trigger metadata synchronization.

ParameterTypeDescription
space_slugstrSpace identifier
connector_idUUIDConnector UUID
file_pathstr | PathPath to the manifest.json file

Returns: SyncJob

from pathlib import Path

job = await client.connectors.upload_dbt_manifest(
"marketing-analytics",
connector_id,
Path("target/manifest.json"),
)

Tip: This method raises FileNotFoundError if the file does not exist locally, before making any API call.