none
CSV file matadata validation RRS feed

  • Question

  • Hi All,

    I have a requirement of validating CSV file before loading into staged-folder, and later have to load into sql table.
    I need to validate metadata (the structure of the file must be same as target sql table)
    No. of columns should be equal to the target sql table
    order of columns should be same as target sql table
    Data types of columns (no text values should exist in numeric field of csv file)
    looking for some easy and efficient way achieve this.
    Thanks for help
    Saturday, January 25, 2020 10:18 PM

All replies

  • Hi RoshN,

    There is no such thing as *.csv file validation.

    *.csv files always have host of problems where column delimiters, column separators, invisible characters like null terminators \0, and line breaks are in the middle of the actual data.

    The most reliable format for data feeds is XML.

    SSIS XML Task, operation Validation does exactly what you are looking for.

    Check it out here: Validate XML with the XML Task

    Sunday, January 26, 2020 5:28 AM
  • Hi RoshN,

    Please open and check the CSV file and try to create new target sql table.

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, January 27, 2020 9:31 AM