2024-12-10 19:09:00 +01:00

2.0 KiB

title slug
Query Mixin /sdk/python/api-reference/query-mixin

{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

module query_mixin

Mixin class containing Query specific methods

To be used by OpenMetadata class


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

class OMetaQueryMixin

OpenMetadata API methods related to Queries.

To be inherited by OpenMetadata


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method get_entity_queries

get_entity_queries(
    entity_id: Union[Uuid, str],
    fields: Optional[List[str]] = None
)  Optional[List[Query]]

Get the queries attached to a table

Args:

  • entity_id (Union[Uuid,str]): entity id of given entity
  • fields (Optional[List[str]]): list of fields to be included in response

Returns:

  • Optional[List[Query]]: List of queries

{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method ingest_entity_queries_data

ingest_entity_queries_data(
    entity: Union[Table, Dashboard],
    queries: List[CreateQueryRequest]
)  None

PUT queries for an entity

:param entity: Entity to update :param queries: CreateQueryRequest to add