Environment Views

Recently added: Variable Explorer!

From the left side bar you can navigate to several environment views: Outline, Files, Data Connections, Packages, & Variables (including Secrets and Environment Variables)

File Upload

Upload files for use in a given project. Use this feature to load in source data, figures, images, etc.

Variables

Secrets

Keep your sensitive values, like API tokens or passwords, secret by adding them as... Secrets. We store all Secrets in a highly-encrypted vault, which is only visible to other project Editors or Owners. All Secrets are fully redacted, making it impossible to accidentally leak them.

Add Secrets to your Project Environment easily and securely.

To access your Secrets call them directly in place of where you would hard code your credentials. In the example below, we're setting up a Snowflake connection and passing database details as Secrets.

Environment Variables

You can configure environment variables to be injected into the kernel at startup. Environment variables aren't kept in the vault, nor are they redacted. This is primarily useful for things like connecting to Spark clusters, but opens the door to other customization of run environments as well. There are performance costs associated with using environment variables, so only use these if your project requries variables injected at kernel startup.

We also some built-in variables:

Variable

Value

Description

$hex_scheduled

False/True

If a project has been set to run on a schedule, this variable is set True.

$hex_run_context

"logic", "app", or "scheduled"

Helpful if you want to restrict certain logic to only run while in App, Logic, or Scheduled run modes. As an example, use this if you have some debug logic that you don't want to run while a user is interacting with an app.

Variable Explorer

The Variable Explorer allows you to browse the objects generated in your code. For each object, we show you its name, type, and value.