Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Filtering one data stream based on a list of values from another data stream

Gandalf_NotGrey
8 - Asteroid

Hello,

I have a data stream like below

ABCDEF
48745549663731524
341165211268714418
15410924534581653
455145526181142280
726656636446658528
642108231254450418
20945368847522196
425434623700287557
21216928025598175
54748354948198684
90234406156319469
84675568565275120
424392297203612285
70131111951768635
375748358246348268
111377188718409501
397507538349657372
849074622249177
305677654597187202
214581499351626205
4717865463466741
134263167256235325
169693151298594227
301143458117403212
38660138319351289
581127741660502736
75756575667432422

 

And my objective is to check that if Column A has data from below -

A
9233
23508
21866
44822
33960
8850
53704
30354
56113
51911
26011
39785
4794
50594
14088
29377
43663
87175
3911
14706
70885
68398
85126
11729
52157
83220
22291

 

So, data stream 1 has those 6 fields and data stream 2 has just one field A. My objective is to check if any cell in Column A of Stream 1 has any of the values that Column A has in Stream 2. Also, Data Stream 2 is static and I can hard code it using a Text Input tool in the workflow. And Data Stream 1 is coming from a SQL Query.

I tried doing this using Append/Union/Join but could not do.

Any guidance will be much appreciated.

Thanks so much. 

6 REPLIES 6
Hub119
9 - Comet
9 - Comet

A join tool within Alteryx should accomplish what you are looking to do here... in your sample dataset provided at least, nothing matches between the two sources which perhaps is the source of the issue you are encountering?

aatalai
14 - Magnetar

@Gandalf_NotGrey would something like this help

 

stream filter.PNG

Hub119
9 - Comet
9 - Comet

...this of course assumes you are looking to do an exact match on your two data streams.  If instead you were looking to see if the data just contained something from data stream 2 (say for instance you were looking to see if a name or an ID string showed up as part of a larger string of data) then you could use an append fields tool first, to append the full stream 2 dataset to all incoming stream 1 records, and then follow that with a filter tool to filter down to only records where stream 1 column A contained the string within the stream 2 column A using a contextual formula like this: "Contains([A], [Right_A])" ....fyi needs to be string type data for that to work.

Mathias_Nielsen
8 - Asteroid

Hi @Gandalf_NotGrey ,

 

Here is two different solutions to what you are looking to do. One is looking for an exact match, the alternative will look for any value containing a value in data stream 2

Mathias_Nielsen
8 - Asteroid

The alternative solution is similar to what @Hub119  is describing

Gandalf_NotGrey
8 - Asteroid

Thanks so much @Mathias_Nielsen @Hub119 @aatalai for your suggestions. Join tool is working well for my case. 

Yes, to do the Contains part, what is happening is my Append was leading a lot more records since both Target and source had many records.

So I modified my data in such a way that a Join can work. But yes, Appending the data and doing Contains was my first thought as well.  

Labels