GET /v1/search/fieldQuery
from metadata.sdk import configure, get_client
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
client = get_client()
# Find tables with a specific column name
response = client.get("/search/fieldQuery", params={
"fieldName": "columns.name",
"fieldValue": "shop_id",
"index": "table_search_index"
})
for hit in response["hits"]["hits"]:
entity = hit["_source"]
print(f"{entity['fullyQualifiedName']} (score: {hit['_score']})")
# Find entities with a specific tag
response = client.get("/search/fieldQuery", params={
"fieldName": "tags.tagFQN",
"fieldValue": "PII.Sensitive",
"index": "table_search_index"
})
for hit in response["hits"]["hits"]:
entity = hit["_source"]
print(f"{entity['fullyQualifiedName']}")
// Find tables with a specific column name
var response = client.searchApi().fieldQuery(
"columns.name", // fieldName
"shop_id", // fieldValue
"table_search_index", // index
0, // from
10 // size
);
for (var hit : response.getHits().getHits()) {
var source = hit.getSource();
System.out.println(source.getFullyQualifiedName());
}
# Find tables with a specific column name
curl "{base_url}/api/v1/search/fieldQuery?fieldName=columns.name&fieldValue=shop_id&index=table_search_index" \
-H "Authorization: Bearer {access_token}"
# Find entities with a specific tag
curl "{base_url}/api/v1/search/fieldQuery?fieldName=tags.tagFQN&fieldValue=PII.Sensitive&index=table_search_index" \
-H "Authorization: Bearer {access_token}"
# Find entities owned by a specific user
curl "{base_url}/api/v1/search/fieldQuery?fieldName=owners.name&fieldValue=admin&index=table_search_index&size=20" \
-H "Authorization: Bearer {access_token}"
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0,
"skipped": 0
},
"hits": {
"total": {
"value": 12,
"relation": "eq"
},
"hits": [
{
"_index": "table_search_index",
"_id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
"_score": 1.8,
"_source": {
"id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
"name": "dim_customer",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer",
"entityType": "table",
"serviceType": "BigQuery",
"description": "Customer dimension table with shop_id reference",
"owners": [],
"tags": [],
"columns": [
{
"name": "shop_id",
"dataType": "NUMERIC",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer.shop_id"
}
]
}
}
]
}
}
Field Query
Search for entities by specific field values
GET
/
v1
/
search
/
fieldQuery
GET /v1/search/fieldQuery
from metadata.sdk import configure, get_client
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
client = get_client()
# Find tables with a specific column name
response = client.get("/search/fieldQuery", params={
"fieldName": "columns.name",
"fieldValue": "shop_id",
"index": "table_search_index"
})
for hit in response["hits"]["hits"]:
entity = hit["_source"]
print(f"{entity['fullyQualifiedName']} (score: {hit['_score']})")
# Find entities with a specific tag
response = client.get("/search/fieldQuery", params={
"fieldName": "tags.tagFQN",
"fieldValue": "PII.Sensitive",
"index": "table_search_index"
})
for hit in response["hits"]["hits"]:
entity = hit["_source"]
print(f"{entity['fullyQualifiedName']}")
// Find tables with a specific column name
var response = client.searchApi().fieldQuery(
"columns.name", // fieldName
"shop_id", // fieldValue
"table_search_index", // index
0, // from
10 // size
);
for (var hit : response.getHits().getHits()) {
var source = hit.getSource();
System.out.println(source.getFullyQualifiedName());
}
# Find tables with a specific column name
curl "{base_url}/api/v1/search/fieldQuery?fieldName=columns.name&fieldValue=shop_id&index=table_search_index" \
-H "Authorization: Bearer {access_token}"
# Find entities with a specific tag
curl "{base_url}/api/v1/search/fieldQuery?fieldName=tags.tagFQN&fieldValue=PII.Sensitive&index=table_search_index" \
-H "Authorization: Bearer {access_token}"
# Find entities owned by a specific user
curl "{base_url}/api/v1/search/fieldQuery?fieldName=owners.name&fieldValue=admin&index=table_search_index&size=20" \
-H "Authorization: Bearer {access_token}"
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0,
"skipped": 0
},
"hits": {
"total": {
"value": 12,
"relation": "eq"
},
"hits": [
{
"_index": "table_search_index",
"_id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
"_score": 1.8,
"_source": {
"id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
"name": "dim_customer",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer",
"entityType": "table",
"serviceType": "BigQuery",
"description": "Customer dimension table with shop_id reference",
"owners": [],
"tags": [],
"columns": [
{
"name": "shop_id",
"dataType": "NUMERIC",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer.shop_id"
}
]
}
}
]
}
}
Field Query
Search for entities by matching a specific field to a given value. This is useful for finding entities that have a particular column name, tag, owner, or other field-level attribute.Query Parameters
Field path to search. Common values:
columns.name, tags.tagFQN, owners.name, service.name, database.name, databaseSchema.name.Value to match against the specified field.
Search index to query. Options:
table_search_index, topic_search_index, dashboard_search_index, pipeline_search_index, mlmodel_search_index, container_search_index, search_entity_search_index, glossary_term_search_index, tag_search_index, user_search_index, team_search_index, domain_search_index, data_product_search_index.Starting offset for pagination.
Number of results to return.
GET /v1/search/fieldQuery
from metadata.sdk import configure, get_client
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
client = get_client()
# Find tables with a specific column name
response = client.get("/search/fieldQuery", params={
"fieldName": "columns.name",
"fieldValue": "shop_id",
"index": "table_search_index"
})
for hit in response["hits"]["hits"]:
entity = hit["_source"]
print(f"{entity['fullyQualifiedName']} (score: {hit['_score']})")
# Find entities with a specific tag
response = client.get("/search/fieldQuery", params={
"fieldName": "tags.tagFQN",
"fieldValue": "PII.Sensitive",
"index": "table_search_index"
})
for hit in response["hits"]["hits"]:
entity = hit["_source"]
print(f"{entity['fullyQualifiedName']}")
// Find tables with a specific column name
var response = client.searchApi().fieldQuery(
"columns.name", // fieldName
"shop_id", // fieldValue
"table_search_index", // index
0, // from
10 // size
);
for (var hit : response.getHits().getHits()) {
var source = hit.getSource();
System.out.println(source.getFullyQualifiedName());
}
# Find tables with a specific column name
curl "{base_url}/api/v1/search/fieldQuery?fieldName=columns.name&fieldValue=shop_id&index=table_search_index" \
-H "Authorization: Bearer {access_token}"
# Find entities with a specific tag
curl "{base_url}/api/v1/search/fieldQuery?fieldName=tags.tagFQN&fieldValue=PII.Sensitive&index=table_search_index" \
-H "Authorization: Bearer {access_token}"
# Find entities owned by a specific user
curl "{base_url}/api/v1/search/fieldQuery?fieldName=owners.name&fieldValue=admin&index=table_search_index&size=20" \
-H "Authorization: Bearer {access_token}"
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0,
"skipped": 0
},
"hits": {
"total": {
"value": 12,
"relation": "eq"
},
"hits": [
{
"_index": "table_search_index",
"_id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
"_score": 1.8,
"_source": {
"id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
"name": "dim_customer",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer",
"entityType": "table",
"serviceType": "BigQuery",
"description": "Customer dimension table with shop_id reference",
"owners": [],
"tags": [],
"columns": [
{
"name": "shop_id",
"dataType": "NUMERIC",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer.shop_id"
}
]
}
}
]
}
}
Returns
Returns an Elasticsearch-style response containing entities where the specified field matches the given value.Response
Time in milliseconds the search took to execute.
Whether the search timed out.
Search results container.
Show properties
Show properties
Array of matching entity results.
Common Field Paths
| Field Path | Description | Applicable Indexes |
|---|---|---|
columns.name | Column name within a table | table_search_index |
tags.tagFQN | Fully qualified tag name (e.g., PII.Sensitive) | All indexes |
owners.name | Owner username | All indexes |
service.name | Service name | All entity indexes |
database.name | Database name | table_search_index |
databaseSchema.name | Schema name | table_search_index |
Error Handling
| Code | Error Type | Description |
|---|---|---|
400 | BAD_REQUEST | Missing required parameters or invalid field path |
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to search entities |
Was this page helpful?
⌘I