Flat file

  • hi

    please help me with the solution for the following question:

    1.How would you upload data from flat file source if there are multiple flat file sources and you want to perform uploading in one package?

    2.If you have already uploaded data from 5 flat file sources and if there is new source coming as 6th flat file source how would you add this one in your existing package?

    3.You are loading data from flat files regularly for 3 months and after that all of a sudden any error or bug arrived in your package how would you fix this error or bug?

    4.5.How would you load data to production destination?

    thanks

  • shah.simmy (2/20/2012)


    hi

    please help me with the solution for the following question:

    These sound like "interview" questions and I don't normally answer such things. However, my answers for these types of questions are pretty far from the norm and you need to be advised than an interviewer will absolutely grill you (I always have fun with that!) about these answers so you need to really do your homework if you decide to use them for future interviews.

    1.How would you upload data from flat file source if there are multiple flat file sources and you want to perform uploading in one package?

    Being the data-troll that I am, I wouldn't do this with SSIS packages (although there's nothing wrong with using SSIS for such a thing). I typically do it all in a stored procedure with BULK INSERT and a loop over a table of file names that I build using xp_DirTree or some other method (and there are a few).

    2.If you have already uploaded data from 5 flat file sources and if there is new source coming as 6th flat file source how would you add this one in your existing package?

    Whether you're using an SSIS package or a T-SQL stored procedure and if the "new source" has the same format as the other 5, you shouldn't have to do a thing. The system should be programmed to automatically pick up on any and all files present and load them with no awareness required by humans. If the file is a different format or totally different data altogether, it is possible to program the system to read the file header and decide which import method to use and what the target tables should be.

    3.You are loading data from flat files regularly for 3 months and after that all of a sudden any error or bug arrived in your package how would you fix this error or bug?

    Not enough information to give you a more solid answer but the most important thing would be to identify the "bug". If such an "import" system is written correctly and correctly validates the files in staging tables, it should be able to tell you most of what is wrong in the form of error messages and captured bad rows.

    4.5.How would you load data to production destination?

    I never ever load data directly to a production destination no matter which method I'm using. The data is always loaded to a staging table and validated before the data is allowed anywhere near production. (There! I said it! NEVER and ALWAYS! ;-))

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

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