Getting Started with Heroku Data Labs
Last updated May 11, 2023
Table of Contents
Heroku Data add-ons have experimental features that are under consideration for inclusion in the Heroku platform. By using the data:labs
command, you can enable and disable experimental features on your Heroku Data add-on. Heroku Data Labs features are only available on production Heroku Postgres plans (Standard, Premium, Private, and Shield).
Features added through Heroku Data Labs are experimental and subject to change.
Install or Update the Heroku Data CLI Plugin
To use the data:labs command
, you must have the latest version of the Heroku Data CLI plugin.
Installing the Heroku Data CLI Plugin
To install the data plugin, use the following CLI command:
$ heroku plugins:install @heroku-cli/plugin-data
Updating the Heroku Data CLI Plugin
The Heroku CLI keeps itself up-to-date automatically. However, if you installed the Debian/Ubuntu package, or used npm install
, you must update the CLI manually. To update the data
plugin, use the update CLI command:
$ heroku update
List Available Experimental Features
To get a list of experimental features available for your Heroku add-on, use the heroku data:labs:list
command:
$ heroku data:labs:list ADDON_NAME
=== Experimental Features Available for ADDON_NAME:
The list command also displays the statuses of available features on your Heroku add-on. For example, if WAL compression is enabled on your Heroku Postgres add-on:
$ heroku data:labs:list postgresql-example-1234
=== Experimental Features Available for postgresql-example-1234:
[+] wal-compression Write-ahead log compression on Heroku Postgres addons
Enable an Experimental Feature
To enable an experimental feature on your Heroku add-on, use the heroku data:labs:enable
command. You must include the --addon
flag. You can optionally specify the -a
, --app
flag for extra detail:
$ heroku data:labs:enable FEATURE --addon=ADDON_NAME -a example-app
Enabling FEATURE on ADDON_NAME... done
Depending on the feature, enabling can take 15 minutes or more. You can check the status by using the heroku data:labs:list command.
Disable an Experimental Feature
Disabling an experimental feature on your Heroku add-on is similar to enabling. Use the heroku data:labs:disable command. The --addon
flag is required:
$ heroku data:labs:disable FEATURE --addon=ADDON_NAME -a example-app
Disabling FEATURE on ADDON_NAME... done