I agree that it would be optimal to support both. I'm happy to accept a
pull request if you have an update that would modify how this works.

Nathan Palmer

On Sun, Jul 22, 2012 at 12:06 PM, Simone Busoli <[email protected]>wrote:

> The point is basically that what the DSL is doing in that case is
> replacing the body of the Execute method of an AbstractOperation with the
> instantiation of the input operation, which therefore will not be executed
> when the process is run.
> It's a limitation of the DSL I would say, and the workaround it either to
> write the input operation inline or do something like this:
>
> operation import_from_db:
>     op = ConventionInputCommandOperation("test")
>     op.Command = "SELECT FirstName, LastName, LoyaltyNumber FROM
> LoyaltyTable"
>     for row in op.Execute(null):
>       yield row
>
> On Sun, Jul 22, 2012 at 4:28 PM, Nathan Palmer <[email protected]>wrote:
>
>> 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 
>> <[email protected]>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 <[email protected]>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 [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> 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 [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> 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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to