from metadata.sdk import configurefrom metadata.sdk.entities import StoredProceduresconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# List first pageprocedures = StoredProcedures.list(limit=50)for sp in procedures.entities: print(f"{sp.fullyQualifiedName.root}")# List all with auto-paginationfor sp in StoredProcedures.list_all(): print(f"{sp.fullyQualifiedName.root}")# Filter by database schemaprocedures = StoredProcedures.list( filters={"databaseSchema": "snowflake_prod.analytics.public"}, fields=["owners", "tags", "domains"], limit=50)for sp in procedures.entities: print(f"{sp.fullyQualifiedName.root}") if sp.owners: print(f" Owners: {[o.name for o in sp.owners.root]}") if sp.tags: print(f" Tags: {[t.tagFQN.root for t in sp.tags]}")
import org.openmetadata.sdk.models.ListParams;import org.openmetadata.sdk.models.ListResponse;import org.openmetadata.schema.entity.data.StoredProcedure;// client is an initialized OpenMetadataClient.// List first pageListResponse<StoredProcedure> firstPage = client.storedProcedures().list( new ListParams().setLimit(50));for (StoredProcedure sp : firstPage.getData()) { System.out.println(sp.getFullyQualifiedName());}// Filter by database schema with fieldsListResponse<StoredProcedure> filtered = client.storedProcedures().list( new ListParams() .setDatabaseSchema("snowflake_prod.analytics.public") .setFields("owners,tags,domains") .setLimit(50));for (StoredProcedure sp : filtered.getData()) { System.out.println(sp.getFullyQualifiedName());}
# List allcurl "{base_url}/api/v1/storedProcedures?limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by database schemacurl "{base_url}/api/v1/storedProcedures?databaseSchema=sample_data.ecommerce_db.shopify&limit=50" \ -H "Authorization: Bearer {access_token}"# With fieldscurl "{base_url}/api/v1/storedProcedures?databaseSchema=sample_data.ecommerce_db.shopify&fields=owners,tags,domains&limit=50" \ -H "Authorization: Bearer {access_token}"
{ "data": [ { "id": "d02b24fa-a246-4563-adf1-9ad21f251c0e", "name": "calculate_average", "fullyQualifiedName": "sample_data.ecommerce_db.shopify.calculate_average", "description": "Procedure to calculate average", "storedProcedureCode": { "code": "CREATE OR REPLACE PROCEDURE calculate_average(numbers INT ARRAY) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$DECLARE sum_val INT = 0;count_val INT = 0;average_val FLOAT;BEGIN\n FOR num IN ARRAY numbers DO sum_val := sum_val + num;\n count_val := count_val + 1;\nEND FOR;\nIF count_val = 0 THEN\n average_val := 0.0;\nELSE\n average_val := sum_val / count_val;\nEND IF;\nRETURN average_val;\nEND;$$;" }, "version": 0.1, "updatedAt": 1769982660822, "updatedBy": "admin", "storedProcedureType": "StoredProcedure", "href": "http://localhost:8585/api/v1/storedProcedures/d02b24fa-a246-4563-adf1-9ad21f251c0e", "databaseSchema": { "id": "4dd30184-009c-4792-b296-9562eaed651f", "type": "databaseSchema", "name": "shopify", "fullyQualifiedName": "sample_data.ecommerce_db.shopify", "description": "This **mock** database contains schema related to shopify sales and orders with related dimension tables.", "displayName": "shopify", "deleted": false, "href": "http://localhost:8585/api/v1/databaseSchemas/4dd30184-009c-4792-b296-9562eaed651f" }, "database": { "id": "0be090de-0941-48c4-af49-a6157c91cda0", "type": "database", "name": "ecommerce_db", "fullyQualifiedName": "sample_data.ecommerce_db", "description": "This **mock** database contains schemas related to shopify sales and orders with related dimension tables.", "displayName": "ecommerce_db", "deleted": false, "href": "http://localhost:8585/api/v1/databases/0be090de-0941-48c4-af49-a6157c91cda0" }, "serviceType": "BigQuery", "deleted": false, "owners": [], "tags": [], "domains": [], "processedLineage": false, "entityStatus": "Unprocessed" } ], "paging": { "after": "...", "total": 12 }}
List Stored Procedures
List all stored procedures with optional filtering and pagination
GET
/
v1
/
storedProcedures
GET /v1/storedProcedures
from metadata.sdk import configurefrom metadata.sdk.entities import StoredProceduresconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# List first pageprocedures = StoredProcedures.list(limit=50)for sp in procedures.entities: print(f"{sp.fullyQualifiedName.root}")# List all with auto-paginationfor sp in StoredProcedures.list_all(): print(f"{sp.fullyQualifiedName.root}")# Filter by database schemaprocedures = StoredProcedures.list( filters={"databaseSchema": "snowflake_prod.analytics.public"}, fields=["owners", "tags", "domains"], limit=50)for sp in procedures.entities: print(f"{sp.fullyQualifiedName.root}") if sp.owners: print(f" Owners: {[o.name for o in sp.owners.root]}") if sp.tags: print(f" Tags: {[t.tagFQN.root for t in sp.tags]}")
import org.openmetadata.sdk.models.ListParams;import org.openmetadata.sdk.models.ListResponse;import org.openmetadata.schema.entity.data.StoredProcedure;// client is an initialized OpenMetadataClient.// List first pageListResponse<StoredProcedure> firstPage = client.storedProcedures().list( new ListParams().setLimit(50));for (StoredProcedure sp : firstPage.getData()) { System.out.println(sp.getFullyQualifiedName());}// Filter by database schema with fieldsListResponse<StoredProcedure> filtered = client.storedProcedures().list( new ListParams() .setDatabaseSchema("snowflake_prod.analytics.public") .setFields("owners,tags,domains") .setLimit(50));for (StoredProcedure sp : filtered.getData()) { System.out.println(sp.getFullyQualifiedName());}
# List allcurl "{base_url}/api/v1/storedProcedures?limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by database schemacurl "{base_url}/api/v1/storedProcedures?databaseSchema=sample_data.ecommerce_db.shopify&limit=50" \ -H "Authorization: Bearer {access_token}"# With fieldscurl "{base_url}/api/v1/storedProcedures?databaseSchema=sample_data.ecommerce_db.shopify&fields=owners,tags,domains&limit=50" \ -H "Authorization: Bearer {access_token}"
{ "data": [ { "id": "d02b24fa-a246-4563-adf1-9ad21f251c0e", "name": "calculate_average", "fullyQualifiedName": "sample_data.ecommerce_db.shopify.calculate_average", "description": "Procedure to calculate average", "storedProcedureCode": { "code": "CREATE OR REPLACE PROCEDURE calculate_average(numbers INT ARRAY) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$DECLARE sum_val INT = 0;count_val INT = 0;average_val FLOAT;BEGIN\n FOR num IN ARRAY numbers DO sum_val := sum_val + num;\n count_val := count_val + 1;\nEND FOR;\nIF count_val = 0 THEN\n average_val := 0.0;\nELSE\n average_val := sum_val / count_val;\nEND IF;\nRETURN average_val;\nEND;$$;" }, "version": 0.1, "updatedAt": 1769982660822, "updatedBy": "admin", "storedProcedureType": "StoredProcedure", "href": "http://localhost:8585/api/v1/storedProcedures/d02b24fa-a246-4563-adf1-9ad21f251c0e", "databaseSchema": { "id": "4dd30184-009c-4792-b296-9562eaed651f", "type": "databaseSchema", "name": "shopify", "fullyQualifiedName": "sample_data.ecommerce_db.shopify", "description": "This **mock** database contains schema related to shopify sales and orders with related dimension tables.", "displayName": "shopify", "deleted": false, "href": "http://localhost:8585/api/v1/databaseSchemas/4dd30184-009c-4792-b296-9562eaed651f" }, "database": { "id": "0be090de-0941-48c4-af49-a6157c91cda0", "type": "database", "name": "ecommerce_db", "fullyQualifiedName": "sample_data.ecommerce_db", "description": "This **mock** database contains schemas related to shopify sales and orders with related dimension tables.", "displayName": "ecommerce_db", "deleted": false, "href": "http://localhost:8585/api/v1/databases/0be090de-0941-48c4-af49-a6157c91cda0" }, "serviceType": "BigQuery", "deleted": false, "owners": [], "tags": [], "domains": [], "processedLineage": false, "entityStatus": "Unprocessed" } ], "paging": { "after": "...", "total": 12 }}
from metadata.sdk import configurefrom metadata.sdk.entities import StoredProceduresconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# List first pageprocedures = StoredProcedures.list(limit=50)for sp in procedures.entities: print(f"{sp.fullyQualifiedName.root}")# List all with auto-paginationfor sp in StoredProcedures.list_all(): print(f"{sp.fullyQualifiedName.root}")# Filter by database schemaprocedures = StoredProcedures.list( filters={"databaseSchema": "snowflake_prod.analytics.public"}, fields=["owners", "tags", "domains"], limit=50)for sp in procedures.entities: print(f"{sp.fullyQualifiedName.root}") if sp.owners: print(f" Owners: {[o.name for o in sp.owners.root]}") if sp.tags: print(f" Tags: {[t.tagFQN.root for t in sp.tags]}")
import org.openmetadata.sdk.models.ListParams;import org.openmetadata.sdk.models.ListResponse;import org.openmetadata.schema.entity.data.StoredProcedure;// client is an initialized OpenMetadataClient.// List first pageListResponse<StoredProcedure> firstPage = client.storedProcedures().list( new ListParams().setLimit(50));for (StoredProcedure sp : firstPage.getData()) { System.out.println(sp.getFullyQualifiedName());}// Filter by database schema with fieldsListResponse<StoredProcedure> filtered = client.storedProcedures().list( new ListParams() .setDatabaseSchema("snowflake_prod.analytics.public") .setFields("owners,tags,domains") .setLimit(50));for (StoredProcedure sp : filtered.getData()) { System.out.println(sp.getFullyQualifiedName());}
# List allcurl "{base_url}/api/v1/storedProcedures?limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by database schemacurl "{base_url}/api/v1/storedProcedures?databaseSchema=sample_data.ecommerce_db.shopify&limit=50" \ -H "Authorization: Bearer {access_token}"# With fieldscurl "{base_url}/api/v1/storedProcedures?databaseSchema=sample_data.ecommerce_db.shopify&fields=owners,tags,domains&limit=50" \ -H "Authorization: Bearer {access_token}"
{ "data": [ { "id": "d02b24fa-a246-4563-adf1-9ad21f251c0e", "name": "calculate_average", "fullyQualifiedName": "sample_data.ecommerce_db.shopify.calculate_average", "description": "Procedure to calculate average", "storedProcedureCode": { "code": "CREATE OR REPLACE PROCEDURE calculate_average(numbers INT ARRAY) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$DECLARE sum_val INT = 0;count_val INT = 0;average_val FLOAT;BEGIN\n FOR num IN ARRAY numbers DO sum_val := sum_val + num;\n count_val := count_val + 1;\nEND FOR;\nIF count_val = 0 THEN\n average_val := 0.0;\nELSE\n average_val := sum_val / count_val;\nEND IF;\nRETURN average_val;\nEND;$$;" }, "version": 0.1, "updatedAt": 1769982660822, "updatedBy": "admin", "storedProcedureType": "StoredProcedure", "href": "http://localhost:8585/api/v1/storedProcedures/d02b24fa-a246-4563-adf1-9ad21f251c0e", "databaseSchema": { "id": "4dd30184-009c-4792-b296-9562eaed651f", "type": "databaseSchema", "name": "shopify", "fullyQualifiedName": "sample_data.ecommerce_db.shopify", "description": "This **mock** database contains schema related to shopify sales and orders with related dimension tables.", "displayName": "shopify", "deleted": false, "href": "http://localhost:8585/api/v1/databaseSchemas/4dd30184-009c-4792-b296-9562eaed651f" }, "database": { "id": "0be090de-0941-48c4-af49-a6157c91cda0", "type": "database", "name": "ecommerce_db", "fullyQualifiedName": "sample_data.ecommerce_db", "description": "This **mock** database contains schemas related to shopify sales and orders with related dimension tables.", "displayName": "ecommerce_db", "deleted": false, "href": "http://localhost:8585/api/v1/databases/0be090de-0941-48c4-af49-a6157c91cda0" }, "serviceType": "BigQuery", "deleted": false, "owners": [], "tags": [], "domains": [], "processedLineage": false, "entityStatus": "Unprocessed" } ], "paging": { "after": "...", "total": 12 }}