Skip to main content

Relative Date inputs, Cell runtime, and Hexport

Welcome back to another jam-packed edition of Hex Product Updates, featuring loads of improvements to core Hex workflows. We like to pretend we are clever product strategists, but actually every single feature shipped this round is the result of direct feedback from users like you 💜.

So please keep the excellent feedback flowing! We seriously talk about every single piece of user feedback. It makes Hex better for everyone, and it makes our jobs a lot more fun 🙂.

PS: In case you missed it, we raised a Series B the other week! That’s not a product update per se, but you can think of it as a good omen of more product updates to come.

📆 Relative Date input

Last week I painstakingly constructed a “relative date input” using:

  1. A numeric input parameter (n_periods_ago)
  2. A text input parameter (period_grain)
  3. A python cell (to calculate the right start_date)

Today, I replaced it with a brand new relative date input parameter! When configuring a date input, you can allow relative date inputs and users will be able to choose “Today”, “Yesterday”, etc. instead of picking a specific date.

The best part of this is that relative dates will always be up-to-date, so if you write a query filtered on “Today” or “Yesterday”, every time that app runs the output will be accurate 🎉.

⏳ Cell runtime

Hex now tracks and surfaces cell-by-cell runtime. You won’t notice anything until a cell’s runtime reaches 5s, upon which the current runtime will be displayed on the run status indicator.

After a cell has been run, you can always review its most recent run stats by opening the run mode dropdown.

We hope this helps with profiling large projects, where improving performance isn’t as simple as removing time.sleep(10) 😛.

🗄️ Hexport

verb

/heksˈpôrt,ˈhekspôrt/

  1. download a Hex project as a portable .yaml file

"we hexported all of our favorite projects yesterday so we could put them on an SD card and bury them in permafrost for our great grandchildren."

If you’ve ever gone to export a Hex project, you’ll have found yourself with an old fashioned .ipynb that doesn’t elegantly handle magical Hex things like input parameters or SQL cells. It’s also easy to forget that these files include rendered cell output, which can sometimes contain sensitive data and shouldn’t be laying around in ~/Downloads.

So we decided to build a better export (hexport) experience to reflect the souped up state of Hex’s Notebook view. We thought about making Yet Another Markup Language (.hex?!) but ultimately settled on good old .yaml to keep things simple.

The ability to open a raw Hex project in your IDE of choice unlocks a lot of neat power user workflows, like large scale find & replaces across multiple projects.

You can of course import projects back into Hex, both as completely new projects (from the home page) and as new versions of existing projects (from the History & Versions sidebar).

We hope this portability is both useful in your day to day, and symbolic of our aversion to vendor lock-in— you might build your projects in Hex, but they’re your projects, not ours. Watch this space! This is foundational work that will unlock some exciting things coming imminently down the pipe.

🧠 Learn tab

There’s a new tab in the home page sidebar called “Learn” that serves a dual function:

For brand new Hex users, the Learn tab guides them through their first steps in Hex from demo projects to sharing their first app. We hope this makes it feel more frictionless for you to invite teammates to Hex without having to sit them down and walk through it first.

For seasoned Hex veterans, the Learn tab catalogs an ever-growing list of tutorials and educational resources to help you get even better at using Hex. We’re always adding to this list, so check back every now and again!

🗺️ Map support

We’ve improved Hex’s cartographic abilities, adding support for common mapping libraries like Folium, Pydeck, and Plotly+Mapbox. Many more complex or niche mapmaking libraries also depend on these for rendering outputs, so this adds a whole world of geospatial power to Hex!

See an example of a few different ways to make maps in this Hex project.

Other improvements

  • The command pallette (cmd+p) has gotten a little smarter about fuzzy matching, which should spare you some occasional frsturation.
  • Multiselect input parameters have spontaneously evolved the ability to “Select All”, something that previously required some manual list editing and code cell intervention.
  • When creating a new project, you can now hit cmd+enter after adding a title rather than having to click on the Create Project button!

Bugs squashed

  • Sharp eyed users may have noticed that datetime values in table displays were automatically being converted to local time. We’ve fixed this by default, but also added the ability to turn conversion on again from the column format menu!
  • Publish previews for large Hex projects should now load much faster.
  • We’ve improved handling of floats in numeric inputs, so even a decimal-less float (1.) will show as a float, not an int.
  • We’ve resolved some issues with the Duplicate project workflow.