As I near the end of my training at The Information Lab, I decided to revisit and upgrade one of my earlier projects - the BibTeX Parser. It started as a simple workflow for parsing bibliographic entries, but I always imagined it as a macro or an app.
First, I cleaned up some of the logic by replacing Text to Columns tools with Regex. More importantly, however, I transformed the workflow into a chained analytic app — a change driven by a specific limitation I encountered when processing large numbers of citations.
Why Chain the App?
BibTeX citations are structured using user-defined fields. While some fields like ‘author’ and ‘title’ are common, others are stranger and less universal. This inconsistency means that when parsing hundreds of citations, you can end up with a dataset containing dozens of mostly-empty columns — one for every unique field across all entries.
One solution I came up with involved allowing users to dynamically select which fields to output. During training, I learned that this use case is fairly common, and has a simple solution. Chained analytic apps allow for the output of one app to inform the input of another.
By splitting the workflow into two apps, I could parse the file and extract field names in the first app, and present those field names as a selectable list in the second app.
Preparing the Workflow for the Gallery
Once the app was functional, I decided I wanted to upload it to the Alteryx public gallery, in case anyone else found it useful. Uploading a standard app is straightforward: just save it as a .yxwz and upload it. But chained apps, or any workflow with external dependencies, require a few extra steps.
1.) Set all filepaths to relative
Make sure all files, including your workflows and any input/output files, are stored in the same folder. Next, head to Options > Advanced Options > Workflow Dependencies, or use the keyboard shortcut Ctrl +Alt+W.
In the Workflow Dependencies window, you can see all tools with dependencies, as well as the dependency itself. Here is my workflow before making any paths relative:
Click the ‘All Relative’ button to update all paths. After this, your window should look like this:
2.) Package everything together
As you might imagine, a chained app cannot be run correctly without having access to the other workflows it is chained to, so we will need to package these workflows together. Additionally, if the chained workflow relies on the output of the initial workflow, we will need to package that output/input as well.
Head to Options > Export Workflow, and select your dependencies. Here is an example of what my configuration looked like.
3.) Submit to the Gallery!
In the community gallery, you will need to navigate to the ‘Submit to Gallery’ page.
Your app will require a title, as well as a description and tags. Fill these out, and then attach your packaged .yxzp file to the post, and hit submit.
Congratulations! You’ve published an analytic app. You can check my app out here.