Hi It doesn't support what you are trying to do. Two options:
Conventioninputcommandoperation has a method createrowfromreader. You could use this to run a new query in c# for each row in the first query, and enumerate the output of this second query for consumption in the pipeline. Otherwise you need to create your own version of inputcommandoperation that uses the enumerable given to it in the execute method to create a command for each item. It would not be difficult. Then the operations would chain together as you expect. Miles On Thursday, 28 November 2013, Brian Ogletree wrote: > Apologize for cross posting. But didn't realize StackOverflow may not > have been the best place to originally post this question. > > I've just recently started using > Rhino-Etl<http://ayende.com/blog/3102/rhino-etl-2-0>for very simple ETL > processes and have had great success with it. I have a > slightly more complicated scenario to address now and I didn't find the > ConventionInputCommandOperation behaving the way I expected. > > I've done up a very simplified example of what I'm trying to do. Basically > I have two systems involved and I don't know what I want to get from system > 2 until I first query system 1. I thought registering an InputOperation > immediately after another InputOperation would behave like a loop. So that > each row in operation 1 would be fed to operation 2. The below code fails > with "Failed to execute operation DetailReader: Must declare the scalar > variable @PlanetAbbrv." So my question is how are you meant to handle > situations where the input operation is dependent a previous input > operation? > > Thanks, Brian > > using System; > using Rhino.Etl.Core; > using Rhino.Etl.Core.ConventionOperations; > > namespace ETLTest > { > class Program > { > static void Main() > { > new MainProcess().Execute(); > Console.ReadLine(); > } > } > > public class MainProcess : EtlProcess > { > protected override void Initialize() > { > Register(new MainReader()); > Register(new DetailReader()); > } > > protected override void PostProcessing() > { > foreach (var exception in GetAllErrors()) > { > throw exception; > } > } > } > > public class MainReader : ConventionInputCommandOperation > { > public MainReader() : base("Galactic1") > { > Command = @"select * from Planet"; > } > } > > public class DetailReader : ConventionInputCommandOperation > { > public DetailReader() : base("Galactic2") > { > Command = @"select * from Delivery where DeliveryPlanetAbbrv = > @PlanetAbbrv"; > } > } > } > > -- > You received this message because you are subscribed to the Google Groups > "Rhino Tools Dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:_e({}, > 'cvml', 'rhino-tools-dev%[email protected]');>. > To post to this group, send email to > [email protected]<javascript:_e({}, 'cvml', > '[email protected]');> > . > Visit this group at http://groups.google.com/group/rhino-tools-dev. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rhino-tools-dev. For more options, visit https://groups.google.com/groups/opt_out.
