Rhino ETLWeb Services Source
Well, after some thinking, I figured out that I actually had only two types of sources, database and other. Since other is going to always be code, I decided to start with web services source, since that is arguably the easiest (nothing much to do there). It turned out to be more complicated than I assumed, mainly because the .Net 2.0 web service stack has no easy way to do duck typing of web services. It requires compiled web services. I got around that by doing runtime compilation, but still,that is hardly elegant.
Anyway, what I have now is this:
source WebServiceGenerator: execute: empSrv= WebService(WsdlUrl: "http://localhost:9090/GetEmployees.asmx?wsdl" ) results = empSrv.GetEmployees("Northwind") for result in results: SendRow( Row( Id: result.Id, Name: result.Name ))
As you can see, the only thing that I really need to do is to specify the WSDL url for the web services, and everything from there is fairly natural. The execute block is used to distinguish between database sources (which has command, parameter, etc) and the "other" sources, such as the one above.
Note: Due to the way Rhino ETL works, the order of the sent rows and the order of their processing may differ. This means that if the web service send you Emp #1, Emp #2, Emp #3, they may be processed in Emp #1, Emp #3, Emp #2. (Actually, the issue would tend to come up with larger amount of rows, since the problem is different processing of the batches.
Next step, supporting Web Service output, which may require some complexity if the web service expect complex types (and since I know that I need to handle those, I have to support that with dynamic compilation, that is going to make my life interesting :-)
After that, I intend to start integrating File Helpers as a source / destination for files. I will post separately on this, but so far I am impressed with both the ease of the API and the quality of the documentation.
More posts in "Rhino ETL" series:
- (16 Oct 2007) Importing Data into MS CRM
- (13 Aug 2007) Writing to files
- (05 Aug 2007) Web Services Source
- (05 Aug 2007) Transactions
- (04 Aug 2007) Targets
- (04 Aug 2007) Aggregates
- (26 Jul 2007) Thinking about Joins & Merges
- (24 Jul 2007) First Code Drop
Thanks a lot for your comments about the FileHelpers library =)
I answer your mail, did you get the response ? I ask because I can be in the spam box :P
Have you thought about allowing .xls/.xlsx files as a data source?
Yes, that is certainly a goal.
FileHelpers supports this in two ways, one using interop, which is not a good solution if you are running on a server, the other using OleDB.
I think that it would be easiest to handle this with OleDB.