On-Premises File System 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 On-Premises File Server 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

This topic describes the JSON properties for a linked service of type: File System (Windows/Linux network share or local disk).

When creating a dataset based on this linked service, you set the location type in the dataset JSON to: On-premises File System. When creating a pipeline, you set the source type to FileSystemSource if you are using an on-premises file system as a source in a copy operation. Using an on-premises file system as a sink in a copy operation is not supported yet.

Supported file formats

When you use a linked service of type OnPremisesFileSystemLinkedService with the Copy Activity, the activity can copy a file of any format (CSV/TSV/AVRO/JSON/XML, etc…) as it-is from the source to the destination.

Supported Gateway and PowerShell version

The File System linked service requires you to install and configure Data Management Gateway on an on-premises Windows server. For details about the Data Management Gateway, see Enable your pipelines to access on-premises data. The supported gateway version is: 1.4.5492.1 or higher.

You must use the Azure PowerShell of version 0.8.14 or higher to use cmdlets such as New-AzureDataFactoryEncryptValue with type parameter set to OnPremisesFileSystemLinkedService..

Linux file share configuration

Perform the following two steps to use a Linux file share with the File System Linked Service:

  • Install Samba on your Linux Server.

  • Install and configure Data Management Gateway on a Windows server. Installing gateway on a Linux server is not supported.

Properties

Property

Description

Required

type

The type property should be set to OnPremisesFileSystemLinkedService.

Yes

host

Host name of the server. Use ‘ \ ’ as the escape character as in the following example: if your share is: \\servername, specify \\\\servername.

If the file system is local to the gateway machine, use Local or localhost. If the file system is on a server different from the gateway machine, use \\\\servername.

Yes

userid

Specify the ID of the user who has access to the server.

No (if you choose encryptedcredential).

password

Specify the password for the user (userid).

No (if you choose encryptedcredential.

encryptedcredential

Specify the encrypted credentials that you can get by running the New-AzureDataFactoryEncryptValue cmdlet.

No (if you choose to specify userid and password in plain text)

gatewayname

Name of the gateway that the Data Factory service should use to connect to the on-premises file system.

Important

You must use the gateway of version 1.4.5492.1 or higher.

Yes

Example 1 (using username and password in plain text)

{
    "Name": "MyFilesystemLinkedService",
    "Properties":
    {
        "type": "OnPremisesFileSystemLinkedService",
        "host": "\\\\Contosogame-Asia", 
        "userid": "Admin", 
        "password": "123456", 
        "gatewayName": "mygateway"
    }
}

Example 2 (using encryptedcredential)

{
    "Name": "MyFilesystemLinkedService",
    "Properties":
    {
        "type": "OnPremisesFileSystemLinkedService",
        "host": "localhost", 
        "encryptedcredential": " TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz",
        "gatewayName": "mygateway"
    }
}