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.