Jae Wilson @DataCrew
Domo

Domo - Extract CodeEngine Functions to upload to GitHub part 2

April 4, 2024

Domo's CodeEngine is a black box — unless you crack it open yourself. If you've ever needed to audit what API calls your CodeEngine functions actually make, or wanted to extract and version-control that logic in GitHub, regex is your crowbar.

Why It Matters

Without a systematic extraction process, understanding what a CodeEngine function does means manually opening each one. That doesn't scale when you have dozens of packages and hundreds of functions across versions. This approach lets you programmatically inspect every function's structure, determine whether it's making an outbound API request, and extract the actual URL pattern — turning an opaque runtime into something you can diff, document, and reason about.

What You'll Learn

  • Understand the shape of a Domo version object: package ID, language, and embedded function definitions
  • Use string matching and regex to detect whether a CodeEngine function issues an API request
  • Extract URL patterns from JavaScript function bodies using regex (and when to lean on Copilot to write the hard parts)
  • Distinguish between "interesting" functions (those hitting external APIs) and pure data transformation logic
  • Structure your extraction pipeline to produce output worth committing to GitHub