Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

FINDER 3.0 - Search all your workflows contents for keywords, tools, inputs, outputs etc

anthony
11 - Bolide

I got around to fixing 2.0 version which had absolute path issues that required linking macros back up. Thanks Wayne at Alteryx for testing.

 

The problem:

I create a lot of workflows (800 and counting) and often need to find workflows that created a specific yxdb or csv file. Or I need to find all workflows that use a specific tool - like the Download Tool(eg xml = download.download), so I can remember how I set it up for a API so I can use in another service.

 

The Need:

Crawl all my directories with yxmd/mc files and then search the filename and file xml for keywords.

 

The Solution:

This workflow takes the path(s) you specify and creates a list(via .bat file - eg windows only) of all your yxmd/mc Files/Paths and then runs through a batch macro to look for the keyword you are searching and returns the file name and path so you can copy and open to get on with your business.

 

There are 3 inputs:

  1. The Path(s) you want to search for all of your yxmd/mc files to create the list. CAUTION: Don't start to shallow like "C:" as this will take a long time to search EVERY directory on your computer - even more of an issue for network drives.
  2. The temp path to save your list of yxm* files absolute paths. This must be a directory associated with the user (eg docs/download and not a system path)
  3. The Search Term - NOTE: this uses the contain function so it is broad match. Best to start wide and narrow down as you become familiar with the results.

Capture.PNG

 

Once enter your information: RUN to see your results by

  1. Keyword in File Name (excluding path)
  2. Keyword in Files broken out by yxmd or yxmc with counts of occurrences for keyword in the file. (side note: I discover my text 'inputs' stored in workflows makes the files large. Just search for <r> and you will see some very large counts if you manage to store data in your workflows.)

Capture.PNG

 

Some notes on searching for a tool in a workflow.

  1. Start with the tool name but if the results are large and finding stuff you don't want or did not expect look up in xml to see real alteryx name
  2. a good example is the download tool - if I search for "download" I get 279 results, but if I search for "download.download" there are only 136 results

 

If I search for "download" - it pickups a path with folder download

<Field name="C:\Users\Anthony\Downloads\FInder Temp Rebuild\AFind_N_YX_Files.yxmc" size="254" source="File: C:\Users\Anthony\Downloads\FInder Temp Rebuild\YXM_listOfPathReport.csv" type="V_String" />

 

This is the actual download tool name

<GuiSettings·Plugin="AlteryxConnectorGui.Download.Download">

 

To look up in xml, either just open your yxmd file in a text editor and try to find what it is, or create a temp workflow with that tool and look at xml in configuration for the workflow (I think you must turn on xml in users settings for it to show up in conf section)

 

Capture.PNG

 

Hopefully you find this useful as it was a pita to setup with relative paths and export into a file for others to use ;)

 

 

APPENDIX

 

I added a bat file output to diagnose issues and if you want to see what is creating the list of files.

 

If you run into issues, you can run each line in a CMD to see which line is causing errors.

Capture.PNG

 

 Random notes on creating this package workbook.

I had all kind of issues getting this to work for various reasons.

  1. The mapped drive had odd issues and required some of the flags you see in that bat file, I don't even remember what they were but you can look up if really interested.
  2. package workbooks with nested macros and paths to files are way messy to make sure they work on someone else machine.
    1. I ended up having to put the 2 macros and CSV into a temp folder and work from there. My local macro folder was causing all kinds of confusion for me and the export.
    2. Once in the temp folder I opened each one and set the relative paths to that folder for all files/references. eg options>advanced options>workflow dependencies
    3. Once the references where setup with the .\ relative paths format, I had to clean up references in the macros to paths/files and also update my control parameters to 'update' the correct part of the path. This took several iterations and was probably the most complicated.
    4. I had hard coded the temp file name into the macro and that was confusing matters so I moved out of macro and add file in the main workflow after the users sets their path. This full temp file path is now passed to the macro.

 

 

16 REPLIES 16
JohnJPS
15 - Aurora

@anthony, just wanted to say that I don't think giving this a mere star is enough: this is really awesome!  Great job!

 

anthony
11 - Bolide

John, thanks - it saves me regularly :)

 

One thing I should have mentioned - if you add the path to the alteryx sample workflows, you can search for tools you might not use, to see how they are used.

 

eg base64 results:

 

Capture.PNG

 

Which gives me an idea - crawl community and download all workflows as an additional library of examples... oh the possibilities.

 

anthony
11 - Bolide

I came across another use case today - finding a workflow that outputs a specific column name.

 

I had created a flat file with summarize tool that had the header: "CountDistinct_Right_OrderID" and I could not remember when or where I created this file. Luckily it was a unique enough name that I could search for the header name - which never really occurred to me since usually they are rarely this unique.

 

I searched with FINDER for "CountDistinct_Right_OrderID" and it found the ONE file that had created.

 

anthony
11 - Bolide

Chad over at https://www.dataprepu.com/ tested on a newer version and the record select is broken in the main macro.

 

Just set the select to 1 and it will work as expected.

 

I am still on 10.6 so never noticed it stopped. I guess I will get to fix a lot of my workflows soon.

 


Capture.PNG

HBarge
8 - Asteroid

Hi @anthony 

this is just Godsend. Cant thank enough.

However, when i run the Workflow, the macro is showing me an error 

Can you please advise me to run this WF?Error at (130) The entry point is invalidError at (130) The entry point is invalid

anthony
11 - Bolide

See the screen grab above - you have to change that '?' to a record select and set to '1'

HBarge
8 - Asteroid

Replaced the Question mark with the Select Records tool and now, I am getting an output.

Thanks.

The output file has the file path of all alteryx workflows in a folder. Thats really great.

However, just a step further, Can i request a workflow to look withing a single file and list out the input files for that workflow/ all workflows within the folder and then the output files for the same?

To go further, I would ideally request a workflow that indexes

1. Filename with filepath of the alteryx workflow./app (single and within a folder)

2. Output filename and filepath of that workflow/app (single or within a folder)

 

My organisation has over 700 workflows and I constantly get requests to look within a workflow and edit it to update the output file. I have a hard time backtracking an output file to its workflow and such.

 

Thanks @anthony! You rock!

jwycoff1
6 - Meteoroid

2018-10-09_12-44-58.pngI can't get it to work, sorry. When I open to do the "fix" below, it doesn't look the same ?

 

My error is :

 

 Individual Tool Counter (55) String fields are limited to 16384 bytes.  Use a V_String field instead.
 Filter (41) 1 records were True and 2 were False
 Append Fields (39) 1 target records generated 1 output records
 Individual Tool Counter (55) Record #1: Tool #130: Cannot find macro "Debug\_externals\1\SelectRecords.yxmc".
 Individual Tool Counter (55) Record #1: Tool #129: The Source must have a valid connection
 Individual Tool Counter (55) 1 iterations were run
 Individual Tool Counter (55) RecordInfo::CreateRecord:  A record was created with no fields.

anthony
11 - Bolide

Right click on orange macro - the tool you need to fix is in there.

Labels