Jae Wilson @DataCrew
Domo

Domo - Extract CodeEngine Functions to upload to GitHub

April 4, 2024

Hook (1-2 sentences): Domo CodeEngine stores your functions inside the platform — which means no diffs, no pull requests, and no history unless you pull them out yourself. Here's how to extract every CodeEngine package and function into version-controllable text files using domolibrary.

Why It Matters

CodeEngine is powerful, but platform-native storage creates a blind spot: you can't review changes, collaborate via GitHub workflows, or audit what's actually running in production. Pulling functions out programmatically means you can treat CodeEngine the same way you treat any other codebase — with commits, code review, and a paper trail. It also gives you a readable snapshot of Domo's own internal packages, which turns out to be useful for understanding which APIs they're actually calling under the hood.

What You'll Learn

  • Authenticate against the Domo API using a token-based Auth object from domolibrary
  • Query CodeEngine packages with DomoDataCenter.search_code_engine() to retrieve the latest version of each package
  • Parse and filter versions to only include packages where functions can be extracted
  • Export packages by ID and by name using a handle_get_package export handler
  • Inspect Domo's own internal API usage (V1, V2, V3 data source endpoints) from the exported function code