Remco,

You can do multiple result-sets by using the join operators. Here is an
example using the DSL.

https://github.com/hibernating-rhinos/rhino-etl/blob/master/Rhino.Etl.Tests/Dsl/InnerJoin.boo

However if you need multiple streams into the same result-set it can still
be done but with a custom operation. You'd want to selected from the first
table and emit all of the rows.. then select from the second and emit all
of those. At the end of the operation you'd get the combination of all of
the tables. This is of course assuming all tables have the same columns.

Let me know if this makes sense or not. I might have an example of this
somewhere if I dig through some code.

Nathan Palmer

On Fri, Jul 20, 2012 at 10:34 AM, Remco Ros <[email protected]> wrote:

> Hi,
>
> I want to use Rhino ETL do normalize relational data to documents.
>
> We need to fetch all products based on some heavy query.
> then fetch all related data about these products (around 6 tables).
>
> Because of performance I figured I don't want to join all these tables to
> products, because of the duplicate data.
>
> So we use something like this now:
>
> (all in one query):
>
> ---
> CREATE TABLE #productids
> (
> productId uniqueidentifier
> )
>
> INSERT INTO #productids
> SELECT p.ProductId
> FROM
> tblProduct p
> // snip... some heavy query to determine all products we want.
>
> SELECT * FROM tblProduct WHERE productId IN (SELECT productId FROM
> @productids)
> SELECT * FROM tblProductCategories WHERE productId IN (SELECT productId
> FROM @productids)
> SELECT * FROM tblProductMaterialls WHERE productId IN (SELECT productId
> FROM @productids)
> SELECT * FROM tblProductTypes WHERE productId IN (SELECT productId FROM
> @productids)
> // etc....
> ---
>
> currently I read all this data using SqlDataReader into a 'Product' class.
> then convert this list of products to a dictionary (for fast access)
> then rdr.NextResult()
> then loop trough the datareader and fill the extra product data
> then rdr.NextResult()
> then loop trough the datareader and fill the extra product data
> etc.
>
>
> How can this process be expressed as an ETL process? Because, As far as I
> studied Rhino ETL. It works only of one set of rows, and has no support for
> multiple result sets.
>
> Any ideas?
>
> --
> 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/-/_tQtqa4iCvkJ.
> 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