Tuesday, April 10, 2012

T-SQL Tuesday #029 –SQL Server 2012 useful feature!

http://www.nigelpsammy.com/2012/04/t-sql-tuesday-029-lets-have-sql-server.html
Well, this is my first time to participate in the T-SQL Tuesday, and I'm honored to talk about a new SQL server 2012 feature, and I hope I can do it more often.  SQL 2012 is really a major release and rich full of features, but as an ETL developer I'll pick SSIS as my candidate to demo and share my happiness about one new feature.

It really saved me headache and made me say 'Thanks Microsoft' when I heard that it's finally here!  it might sounds simple but it was really a big deal in SSIS.

The feature is the new and improved Flat File Source, it now can support ragged uneven number of columns!! yes! finally they thought about it.....

Before if you had a flat file that has uneven column numbers, you're out of luck!! you need to use a script task, or read it as one line and do some monkey work or even use bulk insert with the annoying format file to skip a column!! Or use a community task such the "Delimited File Source" oh my god! I remember a immunization file that we get from the depart of health, that has patients vaccination records that could span up to 600 columns and I had to do it in a script task, create each output column with it's data type manually!!!

So if you had a file like this.....



You would end up with that in 2008!


But with 2012 you get that :)



Now we're talking! it looks like my data file!!
Thanks again Microsoft for fixing and improving the Flat File Source....