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.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
Returns: list[Connector]
connectors = await client.connectors.list("marketing-analytics")
get(space_slug, connector_id)
Get a connector by ID.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
connector_id | UUID | Connector UUID |
Returns: Connector
create(space_slug, *, name, connector_type, config=, source_system_id=, **extra)
Create a new connector.
| Parameter | Type | Default | Description |
|---|---|---|---|
space_slug | str | required | Target space |
name | str | required | Connector display name |
connector_type | str | required | Type (postgresql, bigquery, dbt, etc.) |
config | dict | None | None | Connection configuration |
source_system_id | UUID | None | None | Linked 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.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
connector_id | UUID | Connector 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.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
connector_id | UUID | Connector UUID |
**fields | Any | Fields to update |
Returns: Connector
delete(space_slug, connector_id)
Delete a connector.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
connector_id | UUID | Connector UUID |
Returns: None
upload_dbt_manifest(space_slug, connector_id, file_path)
Upload a dbt manifest.json file to trigger metadata synchronization.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
connector_id | UUID | Connector UUID |
file_path | str | Path | Path 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
FileNotFoundErrorif the file does not exist locally, before making any API call.