none
C# Script component to extract sharepoint data RRS feed

  • Question

  • Hi I am pulling data from a sharepoint website. I am not much into C# coding. I am using SSIS 2012 to extract data from sharepoint. But I created one script task in SSIS which is able to extract data from list. 

    Sharepoint--> List --> Items. 

    The current C# code is able to get items in the list. But my requirement is to get all the records of individual items. 

                                                      

    #region Namespaces
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using System.Linq;
    using SC_025ce81e84c44770af091fa10266a48b.ServiceReference1;
    using Microsoft.SharePoint;
    using System.IO;

    #endregion

     public override void CreateNewOutputRows()
        {
            CovePointLNGExportTerminalDataContext dc =
                new CovePointLNGExportTerminalDataContext(
                    new Uri("https://1kiewitprojects.kiewit.com/sites/bw20004001/_vti_bin/ListData.svc"));

            dc.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

            var projects = from project in dc.Turnovers

                           select new
                           {

                               Phase = project.Id,
                               ProjectName = project.SubsystemFileList
                           };

            foreach (var project in projects)
            {
                Output0Buffer.AddRow();
                Output0Buffer.ID = project.Phase;
                Output0Buffer.FileName = project.ProjectName;
            }
        }

    Any help is appreciated 


    • Moved by ArthurZ Thursday, February 9, 2017 11:22 PM Not exactly SSIS related
    • Edited by Vijay1988Mohan Friday, February 10, 2017 3:56 PM
    Thursday, February 9, 2017 10:27 PM

All replies