Michael,

Did you get your problem resolved? Your code is almost 100% the same as the
example here except for Simone's suggestion of inlining the first process.

http://hibernatingrhinos.com/open-source/rhino-etl/introduction

Take a look and let us know if you have questions.

Nathan

On Fri, Jul 20, 2012 at 8:54 PM, Simone Busoli <simone.bus...@gmail.com>wrote:

> I'm not overly familiar with the DSL but I think that inlining the first
> operation inside the process itself instead of declaring it as a standalone
> operation should work.
>
> Simone
>
> On Sat, Jul 21, 2012 at 1:31 AM, Michael Gates <miketga...@gmail.com>wrote:
>
>> I'm very new to this library and am trying to understand the Boo DSL.
>> When I run the following code, I get "Null enumerator detected, are you
>> trying to read from the first operation in the process?"
>> code:
>>
>> import FileHelpers
>>
>> [DelimitedRecord("|")]
>> public class LoyaltyRow:
>>     public Name as string
>>     public Loyalty as string
>>
>> operation import_from_db:
>>     input "SourceDatabase", Command = """
>>       SELECT
>>         FirstName, LastName, LoyaltyNumber
>>       FROM LoyaltyTable
>>     """
>>
>> operation transform_names:
>>     for row in rows:
>>       row.Name = row.FirstName + " " + row.LastName
>>       row.Loyalty = row.LoyaltyNumber.ToString()
>>       yield row
>>
>> operation export_file:
>>     engine = Rhino.Etl.Core.Files.FluentFile.For[of LoyaltyRow]()
>>     file = engine.To("DatabaseExport.txt")
>>     for row in rows:
>>       record = row.ToObject[of LoyaltyRow]()
>>       file.Write(record)
>>       yield row
>>     file.Dispose()
>>
>> process Test:
>>     import_from_db()
>>     transform_names()
>>     export_file()
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Rhino Tools Dev" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/rhino-tools-dev/-/D_cZ6Jq53b0J.
>> To post to this group, send email to rhino-tools-dev@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rhino-tools-dev+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/rhino-tools-dev?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Rhino Tools Dev" group.
> To post to this group, send email to rhino-tools-dev@googlegroups.com.
> To unsubscribe from this group, send email to
> rhino-tools-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rhino-tools-dev?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to rhino-tools-dev@googlegroups.com.
To unsubscribe from this group, send email to 
rhino-tools-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to