Briefer
All posts

Changelog #8: Publishing, writebacks, date inputs, and dynamic dropdowns

5 minsAug 5, 2024authorLucas da Costa

This month is packed with new features and improvements. We've been working hard to make Briefer more powerful and easier to use, and we're excited to show you what we've been up to.


Publishing notebooks

Now, whenever you open a notebook, it'll be shown in "view" mode. This means you can't edit the notebook until you click the "Edit" button on the top right corner of the screen. If a notebook has never been published, opening it will automatically put you in "edit" mode.

Whenever you edit a notebook, you must click the "Publish" button to "push" your changes for viewing. This way, you can be sure that your changes are saved and that you won't accidentally modify a notebook while others are viewing it or when a schedule is about to run.

The same applies to the dashboard view. You can't edit a dashboard until you click the "Edit" button on the top right corner of the screen. If a dashboard has never been published, opening it will automatically put you in "edit" mode.

Please notice that now the schedule button will run the latest published version of the notebook, not the one you're currently editing. This is to prevent accidental changes to the notebook while the schedule is running.


Hiding and showing blocks from the published version

Another cool feature that comes with publishing is the ability to hide and show blocks from the published version of the notebook.

This is great for hiding blocks that are only useful for debugging or development purposes.

To hide a block, click the eye icon on the left side of the block. To show it again, click the same icon. If you want to hide all tabs at once, you can click the "Hide all" option within the drag-handle menu on the left.


Dynamic dropdowns

You can now use a dataframe's column to populate a dropdown in your notebook. This is great for when your filters depend on a query's result instead of hard-coded values.

To make a dropdown dynamic, you need to select the Dynamic option at the bottom of the dropdown configuration. Then, you can select the dataframe and column you want to use to populate the dropdown.

To hide the dropdown's configurations, click the gear icon next to its variable name.


Date-time Inputs

If you want to use date-time inputs in your notebooks, you can now do so by clicking Inputs > Date when adding a new block.

Every date input has a two pieces of configuration:

  1. Whether the input is a date or a date-time field.
  2. The timezone that the input should be displayed in.

After you've configured the input, you can use it in your code by referencing the variable name you've given it, just like the other inputs.

When referencing the input in your Python code, it will be a datetime object, which you can use to filter dataframes, create new columns, or perform any other operation you'd like.

In SQL, you can interpolate the input using the {{var_name}} syntax, which will be replaced by the input's value when the query is executed.


Writebacks

Before writebacks, our users had to write Python code to push data back to their databases. This was cumbersome and error-prone, so we decided to make it easier.

Writebacks are a low-code way to write data back to your database. You can use them to update tables, create new ones, or even delete data.

We recommend using writebacks in conjunction with the scheduling feature to create data pipelines that run automatically. These writeback blocks are also great for testing and experimenting with data before committing to a final solution.

To use writebacks, you need to select the Writeback block from the block list. Then, you can select which dataframe you want to write back to your database, and configure the writeback settings, like whether you want to append or replace the data, and what to do when there are conflicts.

Please notice that writeback blocks will only appear for users with a Postgres or BigQuery database connected to their workspace. Writing to other databases is not supported at the moment.


Math typesetting (LaTeX)

You can now use LaTeX to write math formulas in your notebooks. This is great for writing scientific papers, creating educational content, or just showing off your math skills.

To use LaTeX, you need to wrap your math formulas in $ symbols. For example, $\int_0^\infty e^{-x^2} dx$.


Performance Improvements

I don't want to dwell too much on this, but we've made several performance improvements to the platform to accommodate the huge number of sign ups we've had in the past few weeks.

Those performance improvements include better client and server-side caching, as well as optimizations to the way our CRDT libraries write data.

We also fixed leaks which would cause long-running tabs to consume more memory than necessary.


General Improvements and Bug Fixes

  • We've improved the way data sources pings are handled, which should make the platform more reliable.
  • Whenever data source pings fail, we now show a warning message in the UI.
  • We fixed a bug in the data source creation which would cause it to create multiple data sources with the same name.
  • We've added 13GiB of example data to a demo database that gets attached to every workspace. That should help new users get started with Briefer.
  • PDF exports now won't have page breaks. That prevents visualizations from being split across pages.
  • Fixed a bug where SQL blocks would not show data sources added after the block was created.
  • Fixed plenty of visual bugs in the dashboards.
  • Minor aesthetic improvements to dashboard graph displays.