Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

Two inputs in a macro

damiana_spadafora
6 - Meteoroid

Hi everyone! I have created a data checks workflow that I would like to turn into a macro. The first step of this macro is to take two different files and join them, then check the output in the left, inner and right join and display a message in the log window according to what it has found. 

 

I am not entirely sure how to proceed, do I simply use two macro input tools or is there anything else I should be aware of?

 

Thank you,

 

Damiana

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

Damiana,

 

When alteryx joins complete, there is a message in the log window like this:  Info: Join (3): 9343 records were joined with 0 un-joined left records and 83 un-joined right records

You can change the name within the config window (annotate) to:  

Info: Join (CHECK FOR UNJOINED RECORDS): 9343 records were joined with 0 un-joined left records and 83 un-joined right records

 

When I'm looking for UNJOINED records, I use a TEST tool and look for 0 count of records.  This produces a RED message if it fails:

 

Error: Test (5): The test "unjoined right records" failed: ExpectedNumRecords==0, NumRecords(#1)==83

 

I'd recommend something like this for your message.

 

Thanks,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
damiana_spadafora
6 - Meteoroid

Hi Mark,

 

Thank you for making time to answer me. The issue I have is more concerned with the join itself and how I can allow the user to choose which fields to join upon. If I use two macro input tools and link them to a join tool, how do I account for the fact that the user might have different files that join on different column names?

 

Thank you,

 

Damiana

MarqueeCrew
20 - Arcturus
20 - Arcturus

aye, there's the rub!

 

The simple answer is for a single join key.  You would connect the macro input to a drop down interface tool and then update the value.  I've not updated a join tool this way before however.  When you have multiple keys, the answer requires more work.

 

Here is an example macro that allows a user to select the groupby field from a macro input.  It is a modified record ID macro that allows you to assign text/numeric values within a grouping key:

 

https://gallery.alteryx.com/#!app/Record-ID-for-Groups/555c9efd398a71086464c43c

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
NeilR
Alteryx Alumni (Retired)
Labels