from metadata.sdk import configure
from metadata.sdk.entities import DatabaseServices
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# List with pagination
page = DatabaseServices.list(limit=50, fields=["owners", "tags"])
for svc in page.entities:
print(f"{svc.name} ({svc.serviceType})")
if svc.owners:
print(f" Owners: {[o.name for o in svc.owners]}")
# List all with auto-pagination
all_services = DatabaseServices.list_all(batch_size=100)
for service in all_services:
print(f"{service.fullyQualifiedName}")
{
"data": [
{
"id": "fd2193af-fe09-4366-92b7-1e0d01cd8c09",
"name": "sample_data",
"fullyQualifiedName": "sample_data",
"serviceType": "BigQuery",
"description": "Sample data service for BigQuery",
"version": 0.1,
"updatedAt": 1769982650000,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09",
"connection": {
"config": {
"type": "BigQuery",
"scheme": "bigquery",
"hostPort": "bigquery.googleapis.com",
"taxonomyProjectID": [],
"taxonomyLocation": "us",
"usageLocation": "us",
"supportsMetadataExtraction": true,
"supportsUsageExtraction": true,
"supportsLineageExtraction": true,
"supportsDBTExtraction": true,
"supportsProfiler": true,
"supportsQueryComment": true
}
},
"owners": [],
"tags": [],
"deleted": false,
"domains": [],
"entityStatus": "Unprocessed"
},
{
"id": "4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
"name": "mysql_sample",
"fullyQualifiedName": "mysql_sample",
"serviceType": "Mysql",
"description": "Sample MySQL database service",
"version": 0.1,
"updatedAt": 1769982658000,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/databaseServices/4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
"connection": {
"config": {
"type": "Mysql",
"scheme": "mysql+pymysql",
"hostPort": "localhost:3306",
"supportsMetadataExtraction": true,
"supportsProfiler": true,
"supportsQueryComment": true
}
},
"owners": [],
"tags": [],
"deleted": false,
"domains": [],
"entityStatus": "Unprocessed"
}
],
"paging": {
"after": "eyJ...",
"total": 6
}
}
List all database services with optional filtering and pagination
from metadata.sdk import configure
from metadata.sdk.entities import DatabaseServices
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# List with pagination
page = DatabaseServices.list(limit=50, fields=["owners", "tags"])
for svc in page.entities:
print(f"{svc.name} ({svc.serviceType})")
if svc.owners:
print(f" Owners: {[o.name for o in svc.owners]}")
# List all with auto-pagination
all_services = DatabaseServices.list_all(batch_size=100)
for service in all_services:
print(f"{service.fullyQualifiedName}")
{
"data": [
{
"id": "fd2193af-fe09-4366-92b7-1e0d01cd8c09",
"name": "sample_data",
"fullyQualifiedName": "sample_data",
"serviceType": "BigQuery",
"description": "Sample data service for BigQuery",
"version": 0.1,
"updatedAt": 1769982650000,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09",
"connection": {
"config": {
"type": "BigQuery",
"scheme": "bigquery",
"hostPort": "bigquery.googleapis.com",
"taxonomyProjectID": [],
"taxonomyLocation": "us",
"usageLocation": "us",
"supportsMetadataExtraction": true,
"supportsUsageExtraction": true,
"supportsLineageExtraction": true,
"supportsDBTExtraction": true,
"supportsProfiler": true,
"supportsQueryComment": true
}
},
"owners": [],
"tags": [],
"deleted": false,
"domains": [],
"entityStatus": "Unprocessed"
},
{
"id": "4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
"name": "mysql_sample",
"fullyQualifiedName": "mysql_sample",
"serviceType": "Mysql",
"description": "Sample MySQL database service",
"version": 0.1,
"updatedAt": 1769982658000,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/databaseServices/4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
"connection": {
"config": {
"type": "Mysql",
"scheme": "mysql+pymysql",
"hostPort": "localhost:3306",
"supportsMetadataExtraction": true,
"supportsProfiler": true,
"supportsQueryComment": true
}
},
"owners": [],
"tags": [],
"deleted": false,
"domains": [],
"entityStatus": "Unprocessed"
}
],
"paging": {
"after": "eyJ...",
"total": 6
}
}
pipelines, owners, tags, domains, followers.all, deleted, or non-deleted entities.from metadata.sdk import configure
from metadata.sdk.entities import DatabaseServices
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# List with pagination
page = DatabaseServices.list(limit=50, fields=["owners", "tags"])
for svc in page.entities:
print(f"{svc.name} ({svc.serviceType})")
if svc.owners:
print(f" Owners: {[o.name for o in svc.owners]}")
# List all with auto-pagination
all_services = DatabaseServices.list_all(batch_size=100)
for service in all_services:
print(f"{service.fullyQualifiedName}")
{
"data": [
{
"id": "fd2193af-fe09-4366-92b7-1e0d01cd8c09",
"name": "sample_data",
"fullyQualifiedName": "sample_data",
"serviceType": "BigQuery",
"description": "Sample data service for BigQuery",
"version": 0.1,
"updatedAt": 1769982650000,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09",
"connection": {
"config": {
"type": "BigQuery",
"scheme": "bigquery",
"hostPort": "bigquery.googleapis.com",
"taxonomyProjectID": [],
"taxonomyLocation": "us",
"usageLocation": "us",
"supportsMetadataExtraction": true,
"supportsUsageExtraction": true,
"supportsLineageExtraction": true,
"supportsDBTExtraction": true,
"supportsProfiler": true,
"supportsQueryComment": true
}
},
"owners": [],
"tags": [],
"deleted": false,
"domains": [],
"entityStatus": "Unprocessed"
},
{
"id": "4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
"name": "mysql_sample",
"fullyQualifiedName": "mysql_sample",
"serviceType": "Mysql",
"description": "Sample MySQL database service",
"version": 0.1,
"updatedAt": 1769982658000,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/databaseServices/4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
"connection": {
"config": {
"type": "Mysql",
"scheme": "mysql+pymysql",
"hostPort": "localhost:3306",
"supportsMetadataExtraction": true,
"supportsProfiler": true,
"supportsQueryComment": true
}
},
"owners": [],
"tags": [],
"deleted": false,
"domains": [],
"entityStatus": "Unprocessed"
}
],
"paging": {
"after": "eyJ...",
"total": 6
}
}
fields parameter to request additional data.
Show properties
fields contains owners.fields contains tags.fields contains domains.fields contains pipelines.fields contains followers.Was this page helpful?