Import data from FLat file to sql server table

  • I had a package that will import a data from flat file to one of sql server desintanation table, while executing the package I am getting following error

    "[Flat File Source [1]] Warning: There is a partial row at the end of the file. "

    Does anyone have an idea to get rid of this error.

    thanks

    Abhisek

  • I am still waiting for input from anyone, please this one is kiling me.

  • abhisek karki (12/17/2009)


    I had a package that will import a data from flat file to one of sql server desintanation table, while executing the package I am getting following error

    "[Flat File Source [1]] Warning: There is a partial row at the end of the file. "

    Does anyone have an idea to get rid of this error.

    thanks

    Abhisek

    [font="Comic Sans MS"]

    This is a pretty self explanatory error message. Try to open it in a good text editor (np++,textpad etc) and see if there is any special character - extra newline feed etc present - no one can tell you what exactly the problem is without having a look at the file ...

    remove that last errornous line and you are good to go ...

    [/font]

    [font="Comic Sans MS"]--
    Sabya[/font]

  • As stated above check the file.

    Also it is a warning, not an error so it should not stop your package from executing

  • I'm not in front of BIDS, but I can remember that in the DataFlow task, select the OLE DB source, Right click and choose edit choose error output and there you have few choices to do decide if there is any error in the rows. May be ignore error or so start with it.

    When I get a chance, I may try to be clear in the steps / options.


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • thanks for your response guys, I have attached my file here, the thing is i get this file every day on ftp server so its hectic for me to change my error manually everyday. the error is pretty much clear, on the last row of the flat file it has incomplete row.

    thanks

    Abhisek

  • I know doing it manually is not possible every day. Try the suggestion given earlier, does that help?


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • [font="Comic Sans MS"]

    Yes - exactly. You wound need to decide if you wish to raise a failure or ignore the row and process the partial file. You can have a look at here for more detailed steps to configure : http://goo.gl/i9FU

    [/font]

    [font="Comic Sans MS"]--
    Sabya[/font]

  • but where do i need to raise ignore error option, i went flatfile soruce and edit and went to error ouput option and set all columns to ignore failure option but still its not working.

    thanks

  • Bru Medishetty

    ya I apply your method also, but didnt work

  • Well, that is the problem here, I can't give a straight solution unless, I know how you are looking at the problem is. It would be a good point to explore through similar situation over forums and also look at what was their suggestions and strategies.

    Have you had time doing that?


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • ya i explore a lot, and on the below site it have mentioned about adding script component to add a dummy row on the last record using .net code, but i am not familier with .net so couldnt manupulate on my package.

    http://forums.whirlpool.net.au/forum-replies-archive.cfm/1031824.html

  • it worked for me now, weird I just change connection provider from sql native client to Microsoft oledb provider for Sql server and everything is fine now.

    thanks for your help

  • Which method worked, the one given in the link you mentioned earlier or Ignore error suggested by me?


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Have you thought of doing a script task to check the last row and delete it if it is not complete

    Marvin Dillard
    Senior Consultant
    Claraview Inc

Viewing 15 posts - 1 through 14 (of 14 total)

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