Azure DocumentDB Linked Service

 

Important

This topic provides the JSON format that is supported by the older versions of Azure PowerShell. If you are using the July 2015 Release version of Azure PowerShell or later, see Azure DocumentDB Linked Service for the latest JSON format. You can convert the JSON from old format to new format by using the tool: JSON Upgrade Tool

Azure DocumentDB is a NoSQL document database service designed for modern mobile and web applications. DocumentDB delivers consistently fast reads and writes, schema flexibility, the ability to easily scale up and down on demand, and rich query capabilities using a SQL-like syntax. For more information, see Azure DocumentDB documentation.

You create an Azure DocumentDB linked service to link an Azure DocumentDB database to an Azure data factory. This topic describes syntax for defining an Azure DocumentDB linked service in a JSON file. When you use the Data Factory Editor in Azure Portal, the editor provides you a JSON template for defining a linked service that you can modify and deploy to create a linked service. To use the New-AzureDataFactoryLinkedService cmdlet to create a linked service, you will need to create a JSON file and use it with the cmdlet. This topic provides the latest JSON format that you can use to define an Azure DocumentDB linked service.

When creating a dataset based on this linked service, you set the location type in the dataset JSON to: Azure DocumentDB. When creating a pipeline, you set the source type to DocumentDbCollectionSource properties if you are using an Azure DocumentDB collection as a source in a copy operation. You set the sink type to DocumentDbCollectionSink properties if you are using an Azure DocumentDB collection as a sink in the copy operation.

Properties

Property

Description

type

The type property should be set to DocumentDbLinkedService.

connectionString

Specify information needed to connect to Azure DocumentDB database.

Example

{
    "name": "MyDocDbLinkedService",
    "properties": {
        "type": "DocumentDbLinkedService",
        "connectionString": "AccountEndpoint=<EndpointUrl>;AccountKey=<AccessKey>;Database=<Database>"
    }
}

You can get the endpoint URL (https://<docdb account name>.documents.azure.com:443/) and access key from Keys blade in the Azure Portal.

Getting DocumentDB database URI and key