importing data

  • This is probably the wrong board for it, but I'm having a battle royale with importing some data in to my sql 2014 express instance.

    The basics are that I have a csv with about 26 million rows that I need to be in a something to be worked with. Excel really doesn't like it (hardly surprising) so I figured chucking it in a SQL db was a solid option.

    This is the import report after it has handily stopped at about 156k rows:

    Messages

    Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "VPNClient" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

    (SQL Server Import and Export Wizard)

    Error 0xc020902a: Data Flow Task 1: The "Source - mycsv_csv.Outputs[Flat File Source Output].Columns[VPNClient]" failed because truncation occurred, and the truncation row disposition on "Source - mycsv_csv.Outputs[Flat File Source Output].Columns[VPNClient]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

    (SQL Server Import and Export Wizard)

    Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "C:\Users\Stephen\Desktop\mycsv.csv" on data row 181581.

    (SQL Server Import and Export Wizard)

    Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - mycsv_csv returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

    (SQL Server Import and Export Wizard)

    If anyone has an idea how to sort it, that would be amazing

  • Either you are trying to put unicode data into a non-unicode column (or vice versa) or one of your columns isn't wide enough.

    Check the mappings in the wizard to find out.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Cool.

    I've had more of a hunt around where it was going wrong, and it is looking like the cell it is having trouble filling would contain what is basically a User Agent string - are the characters in one of those what is causing issues? i.e. / ( ) . ?

  • killbob75 (10/22/2014)


    Cool.

    I've had more of a hunt around where it was going wrong, and it is looking like the cell it is having trouble filling would contain what is basically a User Agent string - are the characters in one of those what is causing issues? i.e. / ( ) . ?

    Normally not, unless one of those is your text file delimiter.

    Take a look at the truncation issue. It might be that some data is too wide to fit in one of the columns.

    By default, the flat file connection manager assigns lengths of 50 to text columns.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I tried going in to the mappings and changing that to 500, or at one point 4000 for the column that was having problems, but it wasn't liking that either.

    Fixed it in the end by just changing those particular pieces of data to be much shorter and making a reference doc - there were only about 5 of them in the end.

    Thanks!

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

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