Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

Dynamic ETL with SSIS Expand / Collapse
Author
Message
Posted Thursday, November 11, 2010 1:40 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, November 18, 2010 3:54 PM
Points: 16, Visits: 50
can you tell me how to create bulk like that
Post #1019578
Posted Thursday, November 11, 2010 1:46 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, November 18, 2010 3:54 PM
Points: 16, Visits: 50
i am new with this

can you explain me if

i have dynamic file like 123.txt ,456.csv and like that and want to load them in to sql server

How can i achive that.??
Post #1019582
Posted Thursday, November 11, 2010 4:27 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 3:05 PM
Points: 31,284, Visits: 15,750
If you have a question about something not in the article, please start your own thread in the SSIS forum.






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1019635
Posted Friday, November 12, 2010 10:13 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, October 16, 2014 4:39 PM
Points: 150, Visits: 161
While testing I see a couple of items missing:

Msg 208, Level 16, State 1, Line 1
Invalid object name 'RN_UPD'. (RN_UPD Table is Missing)

Msg 208, Level 16, State 1, Line 2
Invalid object name 'dbo.Load_RN'. (Load_RN Table is Missing)

Msg 208, Level 16, State 1, Line 2
Invalid object name 'dbo.GetNextWednesdaysDate'. (GetNextWednesdaysDate SP is Missing)


Can you please add it? thanks!
Post #1020078
Posted Friday, November 12, 2010 10:44 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 4:43 PM
Points: 11, Visits: 77
The Load_RN table is referenced in a previous post comment.

The function is purposely missing as mentioned in the article because you may want to calculate your own date.

The RN_Upd table doesn't exist because this really needs to be formatted to the data dictionary of your file.

Hope that helps.
Post #1020089
Posted Friday, November 12, 2010 10:51 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, October 16, 2014 4:39 PM
Points: 150, Visits: 161
I see Load_RNFile in previous comments not Load_RN.
Post #1020093
Posted Friday, November 12, 2010 11:27 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 4:43 PM
Points: 11, Visits: 77
yes, these are the same. The Load_* tables are supposed to have the Id, EverythingElse fields but the naming can be arbitrary because you would want one for each file. Also you would want one table for the parsed output per file. Sorry for the misnomer in the example, hope that helps you.
Post #1020114
Posted Friday, May 3, 2013 3:50 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 8:05 AM
Points: 1,729, Visits: 491
Excellent article. This is similar to something i have previously developed whilst working for a company which processes 10 - 1000's of data files daily.

having the information in the database made it so much easier to process and create new imports.

the one thing we didn't have was detailed info from our suppliers, we had to work this out and make loads of assumptions too.

we also had the added problem of managing excel files along with text format files.



Post #1449104
Posted Friday, May 3, 2013 8:03 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:21 AM
Points: 7,135, Visits: 12,749
Thanks for sharing your success story. I like that in the end you got a working solution that serves your users and your company well. That's what we do.

While I appreciate the result, I would have gone about it differently. From my perspective many of the efforts duplicated what SSIS does for us for free, namely the file parsing. Also worth noting, once you move file parsing into the database you gave up the option for doing data cleansing, validation, multi-system data enrichment, lots of things, in the SSIS space. I realize that sometimes we go with what we know, but SSIS was built to do this kind of work, and dynamically too. I think a lot of folks consider using tools other than T-SQL when the task seems to stretch the limits of what T-SQL should be doing, but when it gets to a point where they just need to get something done they revert to T-SQL because that is what is comfortable to them. Crutches like xp_cmdshell (as one poster mentioned, not your article) make it easier to do that as well and point to that type of thought process. I applaud your use of SSIS to at least avoid accessing the cmd prompt and file system from within T-SQL, something I never condone.

Here is a technical paper from Microsoft explaining how to do everything in SSIS:

http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/Build%20a%20Metadata-Driven%20ETL%20Platform%20by%20Extending%20Microsoft%20SQL%20Server%20Integration%20Services.docx

I know not everyone will sign up for a pure SSIS solution but something along these lines is how I would have solved this problem. Granted, i have .NET development skills which are required for putting together the solution described in the paper and not a lot of DBAs do, nor is the technology a good choice in all shops because of that same fact. Someone has to support the code too, so that has to be considered as well.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1449217
Posted Friday, May 3, 2013 8:29 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 10:56 AM
Points: 440, Visits: 600
Thanks Sarah, your article is very intersting and gave me some ideas. I can't wait to play around with this. Most of my business data comes from vendor flat files, mostly fixed width, with anywhere from 50-400 fields. Data dictionaries or layout guides are usually available, although the vendors don't usually notify me when making format changes. Fun!

You are right, it is much simpler to use the database for transformations and logic. Thanks for explaining how to store and use the data definition and import criteria there. SSIS is generally slow and frustrating for testing and troubleshooting my wide files. Your solution is also one I can afford on my shoestring IT budget!

I use the field name and width with the concatenate function in Excel to quickly make the fields section of a script for a raw import table, then paste that into my SSMS script. A quick way to make fields in SSIS is to use BIDS Helper (free, available on CodePlex). I copy the field name and width and paste it into the BIDS Helper "Create Fixed Width Columns" window. These two things have saved me days of work during testing of a new vendor format.

Post #1449235
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse