prefect_azure.cosmos_db
Tasks for interacting with Azure Cosmos DB
Functions
cosmos_db_query_items
query: The Azure Cosmos DB SQL query to execute.container: The ID (name) of the container, a ContainerProxy instance, or a dict representing the properties of the container to be retrieved.database: The ID (name), dict representing the properties or DatabaseProxy instance of the database to read.cosmos_db_credentials: Credentials to use for authentication with Azure.parameters: Optional array of parameters to the query. Each parameter is a dict() with ‘name’ and ‘value’ keys.partition_key: Partition key for the item to retrieve.**kwargs: Additional keyword arguments to pass.
- An
listof results.
cosmos_db_read_item
item: The ID (name) or dict representing item to retrieve.partition_key: Partition key for the item to retrieve.container: The ID (name) of the container, a ContainerProxy instance, or a dict representing the properties of the container to be retrieved.database: The ID (name), dict representing the properties or DatabaseProxy instance of the database to read.cosmos_db_credentials: Credentials to use for authentication with Azure.**kwargs: Additional keyword arguments to pass.
- Dict representing the item to be retrieved.
cosmos_db_create_item
body: A dict-like object representing the item to create.container: The ID (name) of the container, a ContainerProxy instance, or a dict representing the properties of the container to be retrieved.database: The ID (name), dict representing the properties or DatabaseProxy instance of the database to read.cosmos_db_credentials: Credentials to use for authentication with Azure.**kwargs: Additional keyword arguments to pass.
- A dict representing the new item.