Using Hex + Snowflake with Git
By: Tyler White and Chase Romano
When sharing a project in Hex isn’t enough, you can synchronize your Snowflake workflows using Hex and GitHub or GitLab.
In this article, we’ll discuss what Hex is, how it integrates with Snowflake, and why you should consider integrating it with Git, with an example to keep our code consistent and updated.
What’s Hex?
Hex facilitates collaboration among data teams by enabling them to work seamlessly in Python, SQL, and no-code, enhancing their data capabilities. Hex provides images to choose from, simplifying the process of configuring and managing different Python versions, packages, connection configurations, and more.
Setting up the Python environment can be difficult, especially for beginners. That’s why having assistance is so helpful.
Hex + Snowflake
Hex became a Snowflake partner in September 2021, so the two platforms integrate well. It’s easy to get started with Hex through Snowflake’s Partner Connect.
Hex + VCS (Git sync)
While Hex has a version control engine built-in, they also allow synchronizing to a third-party managed version control system.
Only Hex Admins have the authority to set up Git sync repositories. The repository access also requires approval from a repository admin. If these conditions are met, follow these steps:
- Go to the Settings → Integrations tab under the “Workspace” header.
- Click “Connect” for either GitHub or GitLab and complete the OAuth flow.
- Add a sync repository using the “+ Repository” button.
- Select a “publish” branch that will display the published version of your app.
- Decide whether Pull Requests are mandatory for publishing an app.
- Choose the Hex group authorized to write to the repository.
Each version of your project you save is a commit to your configured VCS. You can input text in the “What’s new?” field, becoming your commit message.
The code used in the Hex project is saved in a YAML file. With Git sync, organizations can ensure that PR approvals are enforced to maintain quality control, codebase stability, and reliable metadata. This centralized metadata doesn’t have to be restricted to Hex alone.
Conclusion
Now that we’ve persisted the Hex project in Git, we’ll explore scheduling capabilities in a future article.