Sign inGet started

Input blocks

Adding input blocks

Input blocks are a great way to add different user inputs to be used as variables within your code and SQL blocks.

You can easily add an input block to your notebook by clicking on the + (add block) button. From there, scroll down to the Inputs section to choose from 4 different types of input blocks: text, select, slider or date input.

add input block.png
Alternatively, you can also add input blocks by clicking on the Input button at the end of your notebook.
add input block (from footer).png

Once you've added an input block, you can click on its name to adjust various settings.

  • Customize your variable name.
  • Explore more options for the given input type. For instance, for slider input, you can set minimum and maximum values.
  • Delete the input block.
input variable names
Screenshot 2022-09-20 at 11.29.11.png

Using input variables

You can use these inputs as variables within part of your code. For example, you can use text input variables within print statements, as seen in the image below.

text input variables

You can also pass on input variables as parameters in your SQL blocks.

input in SQL blocks.png

Dynamic input variables

In some cases, you may want to dynamically generate the list of available values in select inputs instead of using pre-defined values. You can do so by clicking on input settings and select the 'From variable' option at the Values section. In the dropdown you will need to pick one of your existing variables (supported python types that can be used are: list, ndarray, DataFrame, and Series).

Once you select the variable, the values in the list will be then made available as user inputs in the select input dropdown.

Limits for using dynamic input variables:

  1. Only variables with 1,000 elements or fewer are supported.
  2. Total characters of all elements cannot exceed 10,000.