Rhino ETLWriting to files
Just finished writing the tests for reading and writing files. You can check the script below. With the exception of making the connection syntax consistent with the rest of it, I am going to consider this feature complete, the next things to is to work on deployment (basically, a tool that allows to run the script :-) ).
[DelimitedRecord("\t")]
class Customers:
public OrderID as int
public CustomerID as string
public EmployeeID as intconnection(
"Database",
ConnectionType: SqlConnection,
ConnectionString: "Data Source=localhost;Initial Catalog=ETL_Test; Integrated Security=SSPI;"
)
source OrdersFromDatabase, Connection="Database":
Command: "SELECT OrderID, CustomerID, EmployeeID FROM Orders"destination OrdersFile:
initialize:
Parameters.File = Write(Customers).To("output.txt")
onRow:
cust = Customers(
OrderID: Row.OrderID,
CustomerID: Row.CustomerID,
EmployeeID: Row.EmployeeID
)
Parameters.File.Write(cust)
cleanUp:
Parameters.File.Dispose()pipeline OutputOrders:
OrdersFromDatabase >> OrdersFile
target default:
Execute("OutputOrders")
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
Comments
Comment preview