Endpoint Get List of Tables
Name
get_tables
Description
Gets a list of the tables in the database. (Tables are also called 'containers' or 'collections') [API reference]
Related Tables
Parameters
Parameter | Required | Options |
---|---|---|
Name:
Label: Database Name (keep blank to use default) Case-Sensitive Leave blank to use default DB set on connection screen |
||
Name:
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 |
---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(255)
|
255 | The unique name that identifies the collection. |
ResourceId |
DT_WSTR
|
nvarchar(2000)
|
2000 | System generated property. The resource ID is a unique identifier that is also hierarchical per the resource stack on the resource model. It is used internally for placement and navigation of the permission resource. |
LastUpdated |
DT_I4
|
int
|
System generated property. Specifies the last updated timestamp of the resource. | |
ETag |
DT_WSTR
|
nvarchar(4000)
|
4000 | System generated property representing the resource etag required for optimistic concurrency control. |
UniqueKeys |
DT_WSTR
|
nvarchar(4000)
|
4000 | Unique keys for the container. |
IndexingPolicyIndexingMode |
DT_WSTR
|
nvarchar(12)
|
12 | By default, the indexing mode is Consistent. This means that indexing occurs synchronously during insertion, replacement, or deletion of documents. To have indexing occur asynchronously, set the indexing mode to lazy. |
IndexingPolicyAutomatic |
DT_BOOL
|
bit
|
Indicates whether automatic indexing is on or off. The default value is True, thus all documents are indexed. Setting the value to False would allow manual configuration of indexing paths. | |
IndexingPolicyIncludedPaths |
DT_WSTR
|
nvarchar(4000)
|
4000 | The array containing document paths to be indexed. By default, two paths are included: the / path which specifies that all document paths be indexed, and the _ts path, which indexes for a timestamp range comparison. |
IndexingPolicyExcludedPaths |
DT_WSTR
|
nvarchar(4000)
|
4000 | The array containing document paths to be excluded from being indexed. |
ConflictResolutionMode |
DT_WSTR
|
nvarchar(20)
|
20 | Policy-driven mechanism to resolve write conflicts. You can select from two conflict resolution policies on an Azure Cosmos DB container. (LastWriterWins and Custom) |
ConflictResolutionPath |
DT_WSTR
|
nvarchar(4000)
|
4000 | Policy-driven mechanism to resolve write conflicts. This is the conflict resolution path. |
ConflictResolutionProcedure |
DT_WSTR
|
nvarchar(4000)
|
4000 | Policy-driven mechanism to resolve write conflicts. This is the conflict resolution procedure. |
GeospatialConfigType |
DT_WSTR
|
nvarchar(100)
|
100 | The type of geospatial data describing the position and shape of objects in space. |
PartitionKeyPaths |
DT_WSTR
|
nvarchar(4000)
|
4000 | An array of paths using which data within the collection can be partitioned. Paths must not contain a wildcard or a trailing slash. For example, the JSON property 'AccountNumber' is specified as '/AccountNumber'. The array must contain only a single value. |
PartitionKeyKind |
DT_WSTR
|
nvarchar(4000)
|
4000 | The algorithm used for partitioning. Only Hash is supported. |
PartitionKeyVersion |
DT_I4
|
int
|
The partition key version. | |
Documents |
DT_WSTR
|
nvarchar(2048)
|
2048 | System generated property that specifies the addressable path of the documents resource. |
StoredProcedures |
DT_WSTR
|
nvarchar(2048)
|
2048 | System generated property that specifies the addressable path of the stored procedures (sprocs) resource. |
Triggers |
DT_WSTR
|
nvarchar(2048)
|
2048 | System generated property that specifies the addressable path of the triggers resource. |
UserDefinedFunctions |
DT_WSTR
|
nvarchar(2048)
|
2048 | System generated property that specifies the addressable path of the user-defined functions (udfs) resource. |
Conflicts |
DT_WSTR
|
nvarchar(2048)
|
2048 | System generated property that specifies the addressable path of the conflicts resource. During an operation on a resource within a collection, if a conflict occurs, users can inspect the conflicting resources by performing a GET on the conflicts URI path. |
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 SysTables table, therefore it is better to use it, instead of accessing the endpoint directly:
Optional Parameters | |
---|---|
Database Name (keep blank to use default) Case-Sensitive |

API Destination
This Endpoint belongs to the SysTables table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get list of tables:
Optional Parameters | |
---|---|
Database Name (keep blank to use default) Case-Sensitive |

ODBC application
Use these SQL queries in your ODBC application data source:
List Tables (i.e. Containers)
Lists all containers from the default database specified (Specified for the connection settings)
SELECT * FROM SysTables
List Tables (i.e. Containers) for a specific database
Lists all containers from the specified Database
SELECT * FROM SysTables WITH (Database='MyCosmos DB')
get_tables
endpoint belongs to
SysTables
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 Tables (i.e. Containers)
Lists all containers from the default database specified (Specified for the connection settings)
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM SysTables';
EXEC (@MyQuery) AT [LS_TO_COSMOS_DB_IN_GATEWAY];
List Tables (i.e. Containers) for a specific database
Lists all containers from the specified Database
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM SysTables WITH (Database=''MyCosmos DB'')';
EXEC (@MyQuery) AT [LS_TO_COSMOS_DB_IN_GATEWAY];
get_tables
endpoint belongs to
SysTables
table(s), and can therefore be used via those table(s).