I’m struggling to do something like a conditional append using two separate tables. The first contains point values and the second contains intervals. I’d like to append a column to the first table with a value that corresponds to a value in the second table for a specific interval, plus an additional condition that another column must match between both tables.
Where NewCol in Table 1 would be the ‘Lith_Code’ (from Table2) when HoleID = HOLEID AND ‘Depth’ is between ‘From’ and ‘To’ in Table 2.
Basically this is about attributing interval data to point data within those intervals.
One way you could do this is by using the Rule Engine (Dictionary) node, with your Table 1 input to the top port, and your Table 2 transformed into rules and input to the bottom port. Here are a couple of threads with example usage of that node:
Hope this helps you get started, but feel free to ask questions here if you get stuck.
Hi @ScottF and thanks. I actually just ended up extracting all the possible depths using an occurrence table from the Statistics node, cross-joined that with the interval table, and then filtered out all the extra rows where depths were above or below the limits of the interval, using the Rule-based row filter, and then did a Left Outer join to bring that table back to the original point data with the classification now included. Probably a bit computationally expensive but I was struggling with the Rule Engine.
if I got you right you should be able to do this with only two nodes. First do join (Left outer) using Joiner node on HoleID columns which will add FROM and TO columns into first table and after that use Rule-based Row Filter as you already did in your workflow. Or I’m missing something?