Besides the usual bug fixes, we're shipping a major new feature this week: data apps.
You can now add inputs and select fields to your documents, and allow viewers to provide input to your Python code or SQL queries.
Please notice data apps are only available for users in the professional tier.
You should use data apps features whenever you want viewers to be able to provide input to your reports, models, or analyses.
In a nutshell, data apps are interactive documents that allow viewers provide input to the code you've written.
Typical examples include:
To create a data app, you must first add an input or select field to your document by using the /input
or /select
commands.
For each of those blocks, you can specify a label. The variable name is the one you see on the top right corner of the block in a green box.
Then, you can reference the variable name in your Python code in the same way you would reference a variable you created yourself.
To interpolate the value of the input or select field in SQL blocks, use the {{variable_name}}
syntax.
Please notice that you can now interpolate any variables in your SQL blocks, not only the ones created by input or select fields.
Finally, use the "Make it a data app" toggle on the top right corner of your document, under the share menu, to enable the data app mode.
Toggling the data app mode allows viewers to provide input to your document, but they still can't edit the document's content.