Skip to main content
Solved

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

  • October 31, 2024
  • 1 reply
  • 31 views

ecx
Contributor
Forum|alt.badge.img+4

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);

 

View original
Did this help you find an answer to your question?

ecx
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 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);

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings