Reference

Endpoint Get All Documents for a Table


Name

get_documents

Description

Gets all documents for a Table. [API reference]

Related Tables

[Dynamic Table]

Parameters

Parameter Required Options
Name: Table

Label: Table Name (Case-Sensitive)

YES
Name: Database

Label: Database Name (keep blank to use default) Case-Sensitive

Leave blank to use default DB set on connection screen
Name: MaxItemCount

Label: Max Rows Per Page (Adjust for Speed)

An integer indicating the maximum number of items to be returned per page.

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.
If the column you are looking for is missing, consider customizing Cosmos DB Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use Cosmos DB Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

This Endpoint belongs to the [Dynamic Table] table, therefore it is better to use it, instead of accessing the endpoint directly:

API Source - Cosmos DB
Read and write Azure Cosmos DB data effortlessly. Query, integrate, and manage databases, containers, documents, and users — almost no coding required.
Cosmos DB
[Dynamic Table]
Required Parameters
Table Name (Case-Sensitive) Fill-in the parameter...
Optional Parameters
Database Name (keep blank to use default) Case-Sensitive
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the [Dynamic Table] table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get all documents for a table:

API Destination - Cosmos DB
Read and write Azure Cosmos DB data effortlessly. Query, integrate, and manage databases, containers, documents, and users — almost no coding required.
Cosmos DB
[Dynamic Table]
Select
Required Parameters
Table Name (Case-Sensitive) Fill-in the parameter...
Optional Parameters
Database Name (keep blank to use default) Case-Sensitive
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

List all documents in a container

<p>Returns all documents in the specified container (table). Use the container name as the table in the <code>FROM</code> clause; the default database and container from the connection are used unless you override with <code>WITH</code>. Use for small containers or when you need a full dump; for large data sets consider a query with a filter.</p>

SELECT * FROM TestContainer

get_documents endpoint belongs to [Dynamic Table] table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

List all documents in a container

<p>Returns all documents in the specified container (table). Use the container name as the table in the <code>FROM</code> clause; the default database and container from the connection are used unless you override with <code>WITH</code>. Use for small containers or when you need a full dump; for large data sets consider a query with a filter.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM TestContainer';

EXEC (@MyQuery) AT [LS_TO_COSMOS_DB_IN_GATEWAY];

get_documents endpoint belongs to [Dynamic Table] table(s), and can therefore be used via those table(s).