Automatically convert Alteryx workflows (.yxmd / .yxmc) into deployable Databricks Asset Bundles (DAB) using an LLM-driven code generation pipeline, wired end-to-end through GitHub Actions.
- Overview
- Features
- Architecture Overview
- Repository Structure
- Prerequisites
- Installation
- Configuration
- Usage
- How It Works
- Example Workflow
- Supported Inputs
- Generated Outputs
- Extending the Parser
- Technologies Used
- Error Handling & Logging
- Roadmap
- FAQ
- License
- Contact
This project migrates legacy Alteryx ETL workflows to Databricks. You commit an Alteryx workflow file to the repository, and a GitHub Actions pipeline takes over: it parses the workflow's XML into a structured JSON representation, sends that JSON to an LLM (Gemini) to generate equivalent PySpark code and Databricks Asset Bundle configuration, validates the result, and deploys it directly to your Databricks workspace.
The goal is to remove the manual, tool-by-tool rewrite work typically required when retiring an Alteryx workflow, while keeping a human-reviewable JSON representation and validation log at every step.
- Automated parsing of Alteryx
.yxmdworkflow XML into a normalized JSON intermediate representation - LLM-assisted code generation — converts the parsed workflow into PySpark code and a Databricks Asset Bundle
- One-push CI/CD — pushing a workflow file triggers parsing, generation, validation, and deployment automatically
- Validation gate — generated bundles are checked against the expected structure before deployment
- Extensible tool mapping — new Alteryx tools can be added to the parser without rewriting the core engine
- Macro-aware — supports
.yxmcmacro files alongside the parent workflow (see Supported Inputs for current limits) - Reporting-tool aware skipping — intentionally ignores presentation/reporting tools that fall outside the ETL migration scope
At a high level:
- A user exports an Alteryx workflow (
.yxmd) — and any macros (.yxmc) it depends on — from Alteryx Designer. - The workflow (and macro files) are added to the repository's
workflows/directory. - Databricks and LLM credentials are configured as GitHub Secrets.
- A
git pushtriggers thealteryx-migration.ymlGitHub Actions workflow. - The pipeline parses, generates, validates, and deploys — landing the final Databricks Asset Bundle in your workspace.
CI process:
- Trigger on push and read the uploaded
.yxmdfile(s) parser.pyconverts the XML intoworkflow.json(a compact JSON format chosen to minimize LLM token usage)workflow.jsonis sent to the LLM, which returns Databricks Asset Bundle (DAB) code and PySpark (workflow.py)validate.logrecords validation of both the generated Spark code and the DAB before anything is pushed further
CD process:
- Databricks CLI is configured using the
DATABRICKS_HOST/DATABRICKS_TOKENsecrets - The generated DAB is validated against the expected
jobs.ymlstructure and cross-checked against the generated Spark code - The workspace path is resolved and the DAB + Spark code are deployed
- A final check confirms both artifacts exist at the expected Databricks workspace path
A live, editable version of the full workflow diagram is available on Excalidraw: https://excalidraw.com/helleo#json=G5IFdsWDGkR5Ombka2nW8,ZqlzCqkoqu86Si1oh3f0-A
for_alteryx/
├── .github/
│ └── workflows/
│ └── alteryx-migration.yml # GitHub Actions pipeline definition
├── workflows/
│ ├── Sample_Workflow1.yxmd # Sample / user-supplied Alteryx workflow
│ ├── Macro1.yxmc # (optional) Alteryx macro files
│ └── Macro2.yxmc
├── parser/
│ └── parser.py # Reads Alteryx XML, extracts tools/dependencies/logic
├── generator.py # Converts workflow.json into Databricks artifacts
├── generated/ # Auto-generated — do not edit by hand
│ ├── workflow.json # Intermediate JSON representation
│ ├── llm_output.txt # Raw LLM response
│ ├── validate.log # Validation results for the generated DAB
│ ├── databricks.yml # Main Databricks Asset Bundle config
│ ├── .databricks/ # Databricks bundle metadata (deployment state, IDs)
│ ├── resources/
│ │ └── jobs.yml # Databricks Jobs definition
│ ├── src/
│ │ └── workflow.py # Generated PySpark code
│ └── workflows/
│ └── migration.yml # Migration workflow steps (parse → transform → deploy)
├── requirements.txt # Python dependencies
└── README.md
- A Databricks workspace (Azure Databricks recommended)
- A GitHub repository you can push to and configure secrets on
- A Gemini API key (Google AI Studio) — the free tier is sufficient to start; larger or more complex workflows may need a higher tier
- Python 3.x (for local development/testing of the parser and generator)
Clone the repository (or fork it first if you plan to contribute back):
git clone https://github.com/Mourya-s/for_alteryx.git
cd for_alteryx
pip install -r requirements.txtBefore pushing a workflow, configure the following GitHub Actions secrets:
Navigate to: Repository → Settings → Secrets and variables → Actions → New repository secret
| Secret | Description |
|---|---|
DATABRICKS_HOST |
URL of your Databricks workspace, e.g. https://adb-xxxxxxxxxxxx.xx.azuredatabricks.net (Azure Databricks recommended) |
DATABRICKS_TOKEN |
A Databricks Personal Access Token. Generate it via Profile Icon → Settings → Developer → Access Tokens → Manage → Generate New Token. Choose "All APIs" for the token scope for the best compatibility. |
GEMINI_API_KEY |
Your Gemini API key. The free tier works for getting started; use a higher tier for larger/more complex workflows. |
To test the project with the sample workflow: simply push the repository as-is — workflows/Sample_Workflow1.yxmd is already included.
To migrate your own workflow:
- Export your workflow from Alteryx Designer as
.yxmd. - Place it (and any
.yxmcmacros it depends on) insideworkflows/:workflows/ ├── Sample_Workflow1.yxmd ├── Macro1.yxmc └── Macro2.yxmcIt's recommended to keep the same file name(s) used in Alteryx when uploading.
- Commit and push:
git add . git commit -m "Added Alteryx workflow" git push origin main
- Monitor the pipeline under the repository's Actions tab.
- Once complete, find the generated assets in your Databricks workspace at:
Workspace → Users → <your-user-id> → alteryx_migration → dev → files
Alteryx Workflow (.yxmd / .yxmc)
│
▼
GitHub Actions
│
▼
Parser Engine ──────► workflow.json
│
▼
Databricks Generator (LLM)
│
▼
Databricks Asset Bundle
│
▼
Databricks Workspace
A successful run walks through the following GitHub Actions job steps:
`Set up job → Checkout → Setup Python → Install Dependencies → Install Databricks CLI → Check Databricks CLI → Parse Workflow → Generate DAB → Debug Generated Files → Configure Databricks → Debug Databricks Auth → Validate Bundle → Deploy Bundle → Debug Generated Files → Post Setup Python → Post Checkout → Complete job`
.yxmd— standard Alteryx workflow files.yxmc— Alteryx macro files, when uploaded alongside the parent workflow that references them
Current limitations:
- Macros: the parser currently cannot inspect the internal logic of a macro from within the parent workflow file alone — upload the macro's own
.yxmcfile in addition to the workflow. - Reporting / analytical tools are intentionally skipped by design, since this project targets SDP/DAB (ETL) generation rather than reporting output. Skipped tool categories include: Render, Layout, Text Box, Reporting Table, Report Map, Document Builder, PowerPoint Output, Report Header/Footer, and most other Reporting-category tools.
- Unknown/new tools: the parser is designed to skip gracefully rather than crash on tools it doesn't recognize yet — see Extending the Parser to add support.
- Generated code quality scales with the capability of the underlying LLM, particularly for complex workflows.
Each pipeline run produces the following, under generated/:
| File | Description |
|---|---|
workflow.json |
Parsed, normalized intermediate representation of the Alteryx workflow |
llm_output.txt |
Raw output returned by the LLM |
validate.log |
Validation results for the generated Databricks Asset Bundle |
databricks.yml |
Databricks Asset Bundle root configuration |
resources/jobs.yml |
Databricks Job definitions |
src/workflow.py |
Generated PySpark implementation of the workflow |
workflows/migration.yml |
Migration steps (parse → transform → deploy) |
.databricks/ |
Bundle deployment metadata/state |
The parser is built to be extended rather than rewritten. Example: adding support for a new tool (CrossTab):
Step 1 — Add the tool mapping in parser/parser.py:
PLUGIN_TOOL_MAP = {
...
"CrossTab": "CrossTab",
}Step 2 — Add a configuration extractor:
def _extract_crosstab_config(self, node):
config = {}
cfg_root = self._get_config_root(node)
if cfg_root is None:
return config
group_by = self._text(cfg_root.find(".//GroupByField"))
header = self._text(cfg_root.find(".//HeaderField"))
value = self._text(cfg_root.find(".//ValueField"))
if group_by:
config["group_by"] = group_by
if header:
config["header_field"] = header
if value:
config["value_field"] = value
return configStep 3 — Register the extractor in _extract_configuration():
handlers = {
...
"CrossTab": self._extract_crosstab_config,
}Step 4 — Confirm the parsed output. For an Input → CrossTab → Output workflow, the parser will emit something like:
{
"tool_id": "5",
"tool_type": "CrossTab",
"configuration": {
"group_by": "Customer",
"header_field": "Month",
"value_field": "Sales"
}
}Step 5 — Add generator support in generator.py:
if tool["tool_type"] == "CrossTab":
generate_crosstab(tool)Which produces the Spark equivalent:
df.groupBy("Customer") \
.pivot("Month") \
.sum("Sales")Rule of thumb: the better the underlying LLM, the better the generated Spark/DAB code — this relationship is especially noticeable for complex workflows.
- Alteryx (
.yxmd/.yxmc) — source workflow format - Python — parser and generator implementation
- Google Gemini API — LLM-driven code generation
- Databricks Asset Bundles (DAB) — deployment packaging
- PySpark — generated transformation code
- GitHub Actions — CI/CD orchestration
- Databricks CLI — bundle validation and deployment
validate.logcaptures validation results for both the generated Spark code (SDP) and the Databricks Asset Bundle before deployment proceeds.llm_output.txtpreserves the raw LLM response for each run, useful for debugging unexpected generation results.- The parser is designed to skip unknown/unsupported tools rather than fail the whole run — see Supported Inputs.
- CI job steps include explicit debug steps ("Debug Generated Files", "Debug Databricks Auth") to surface configuration or authentication issues before deployment is attempted.
- Extend
parser.pyto support all Alteryx tools, including reporting-category tools - Add a testing framework to compare native Alteryx workflow output against the generated SDP/Databricks output
- Broaden parsing coverage across the full range of
.yxmdand.yxmcfiles
Q: Can I migrate a workflow that uses Alteryx macros?
A: Yes — upload both the parent .yxmd workflow and every .yxmc macro file it depends on into workflows/. The parser currently cannot see inside a macro's logic from the parent workflow alone.
Q: Why isn't my Reporting tool showing up in the generated output? A: Reporting/analytical tools (Render, Layout, Text Box, Reporting Table, Report Map, Document Builder, PowerPoint Output, Report Header/Footer, etc.) are intentionally skipped — this project targets ETL (SDP/DAB) generation, not report generation.
Q: The parser hit a tool it doesn't recognize — will the pipeline fail? A: No, it's designed to skip unrecognized tools rather than break. If you need that tool supported, see Extending the Parser.
Q: Which Gemini tier do I need? A: The free tier is enough to get started. Larger or more complex Alteryx workflows may need a higher usage tier for reliable generation.
This project is licensed under the MIT License — see the LICENSE file for details.
- **Maintainer:: Mourya S
- **Email:: mourya04reddy@gmail.com
- Issues: [GitHub Issues](https://github.com/eryx_migration/issues
- Contributing: [Contribution Guide](https://github.com/Mourya-sn/blob/main/CONTRIBUTING.md