Skip to main content
Solved

How can I use the values from two fields to match against another dataset?

  • October 31, 2024
  • 1 reply
  • 57 views

ecx
Supporter
Forum|alt.badge.img+6

Hello,

How can I use the values from two fields to match against another dataset?
 

image 1, filtered port

I have a test filter, which filters out all items that contain ‘FeatureWriter’ in the transformer_parameter_value field, 

I now want to take the items from the unfiltered port,

Image 2, Unfiltered port.

and match these against the initiator_workspaceId AND transfomer_id items from the filtered port (image 1). 

I do not want to do a row by row comparison, I want to match all items that exist in the filtered output (image 1) against all items in the unfiltered port (image 2). If they have a matching combination of both the initiator_workspaceId AND transfomer_id.


I attempted to use a featureJoiner to achieve this:
 

image 3. failed attempt

 

but as can be seen, there should be 3 items with transformer_id 81, but unfortunately some of the items were merged, which I do not want. I want all items from the filtered list and unfiltered list to be in the output, without any sort of merging. 


 

How can this be done?


Thanks for the help. 

Best answer by ecx

My solution:

Using InlinQuerier, 
 

WITH FilteredFeatureWriters AS (
SELECT
transformer_id,
initiator_workspaceID
FROM
output
WHERE
LOWER(transformer_parameter_value) LIKE '%featurewriter%'
)

SELECT *
FROM
output
WHERE
(transformer_id, initiator_workspaceID) IN (SELECT transformer_id, initiator_workspaceID FROM FilteredFeatureWriters);

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

ecx
Supporter
Forum|alt.badge.img+6
  • Author
  • Supporter
  • Best Answer
  • November 1, 2024

My solution:

Using InlinQuerier, 
 

WITH FilteredFeatureWriters AS (
SELECT
transformer_id,
initiator_workspaceID
FROM
output
WHERE
LOWER(transformer_parameter_value) LIKE '%featurewriter%'
)

SELECT *
FROM
output
WHERE
(transformer_id, initiator_workspaceID) IN (SELECT transformer_id, initiator_workspaceID FROM FilteredFeatureWriters);