how to generate records automatically from csv to sqlserver table using ssis etl

  • Hi All,

    i have one requirement in ssis. I have one csv file (source) having one column called UOM (Unit of Measure) contains 3 values (like cc,vv,lb). My Target is sqlserver table. name of the table is dimglobalkeys having empty data. columns in my target table is (1)globalkeyid (2)UOM (3)recordtype.. I want to load my target table. how means..source having one column with 3 values. each value will generate 20 records in my target table. how...?? that is my requirement. kindly let me know how to solve my requirement....

    Regards,

    MSBI_Ram

  • Can you give example data showing the CSV data, and how that should go into the SQL Server table?

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • I'am having one csv file (dimglobalkeys.csv) contains only one column (unitofmeasure) having 68 records. my destination is table called dimglobalkeys having no data. i have insert scripts to insert the data in destination.but this script has to read from csv file having unitofmeasure column and insert into the target table.

    am attaching the source csv file.

    Target table name also contains the column unitofmeasure. This column has to read the data coming from csv file and load it into destination. CSV file having only one column unitofmeasure.

  • I still don't know the structure of the dimglobalkeys Table, so I still can't help much. You should always post as much information as you can in the body of your post. We need to know:

    1. The structure of your SQL Server table

    2. Is this a one to one import of the CSV rows into an equal number of rows in the matching table?

    If 1-to-1, SQL Server can import it for you. In SSMS, right-click on the database name, select Tasks... and on the Tasks popup menu select Import... A wizard will appear.

    Your data source is Flat File Source. Enter the file name and path of the XL file. After enter the instance and database name and you'll see a list of destination tables in your database. Check the box of the one you want to load the CSV to. From then on, you can just keep accepting the defaults and let it run. If you don't get the results you want at first, you can just truncate the SQL table and run the import again.

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply