|
|
|
Grasshopper
      
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
|
|
|
|
|
Grasshopper
      
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.??
|
|
|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: 2 days ago @ 1:47 PM
Points: 31,406,
Visits: 13,722
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:33 PM
Points: 150,
Visits: 125
|
|
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!
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, September 08, 2012 12:48 PM
Points: 11,
Visits: 68
|
|
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.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:33 PM
Points: 150,
Visits: 125
|
|
| I see Load_RNFile in previous comments not Load_RN.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, September 08, 2012 12:48 PM
Points: 11,
Visits: 68
|
|
| 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.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, May 03, 2013 3:50 AM
Points: 1,710,
Visits: 427
|
|
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.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 7:33 AM
Points: 6,696,
Visits: 11,713
|
|
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
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 9:40 AM
Points: 401,
Visits: 484
|
|
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.
|
|
|
|