locked
Create Data Factory using C# RRS feed

  • Question

  • Hi,

    I am creating Azure Data Factory using C# code (Pipeline will move data from on premise file to SQL DW). Have few queries on the same.

    1. How to create on premise linked service using c#. I am using "OnPremisesFileServerLinkedService" method, but not able to pass userid, password. Any sample code on this method

    2. How to create Data Management Gateway using c# code. Any sample code.

    Not able to find any code sample in MSDN.

    If any sample code, please share with us.

    Thanks,

    Peer.

    Monday, November 7, 2016 10:49 AM

All replies

  • Hi,

    I am creating Azure Data Factory using C# code (Pipeline will move data from on premise file to SQL DW). Have few queries on the same.

    1. How to create on premise linked service using c#. I am using "OnPremisesFileServerLinkedService" method, but not able to pass userid, password. Any sample code on this method

    2. How to create Data Management Gateway using c# code. Any sample code.

    Not able to find any code sample in MSDN.

    If any sample code, please share with us.

    Thanks,

    Peer.

    • Merged by Md Shihab Monday, January 23, 2017 9:56 AM Same question
    Monday, November 7, 2016 12:03 PM
  • In general, the MSDN .NET API reference is your friend.
      • You can create an OnPremisesFileServerLinkedServer with such properties as UserId and Password by directly setting their property values on an instance of the object. For instance:


      var fileServerLinkedService = new OnPremisesFileServerLinkedService(host, gatewayName)
          {
              UserId = myUserId,
              Password = myPassword 
          };

      As additional background, we use this pattern wherein only values for required properties are included in the constructor signature. Any optional properties (such as UserId) must be set as shown above.

    1. Gateways can be created with the GatewayOperations.CreateOrUpdate() method, and the same pattern exists for all of our resource types.

    Monday, November 14, 2016 5:19 PM
  • MSDN Test

    MSDN test

    Monday, November 27, 2017 4:37 AM
    Administrator
  • Test reply1

    Poorna

    Monday, November 27, 2017 4:38 AM