Using Notebooks
When connecting with a direct live connector, Notebooks enables you to test your data or get preliminary results from an ad-hoc query (SQL, Python or R) before visualizing the data with dashboards. This means that you can enter and execute a query to immediately view the results.
For example, you can run a SQL, Python or R query to find your company's best selling items. You can join results from queries on different tables to find the top selling product with the highest profit margin, and then use Python to make sophisticated profit predictions using advanced code libraries. The result is a table that can then be easily converted to one of several types of graphs. By default, the results are also rendered in a Statistics view as a basic column chart.
When connecting with a shared ElastiCube or Live model, you can run SQL queries to these models and then execute Python or R scripts on top of the SQL output.
SQL Syntax
When your Notebook is connected directly to a Live database, the queries support the data source syntax.
When connecting a Notebook to shared ElastiCubes or Live models, the queries support Sisense SQL syntax.
Schema Browser Refresh
To make writing your queries easier, the Schema Browser shows all of the schemas and tables that exist in your database, and the columns within them.
When you connect directly to a Live data source, new changes are not automatically updated in the Notebooks schema.
To refresh the data, in the Schema Browser, mouse-over the data source and click Refresh.
When you connect to the shared ElastiCubes or Live models, only the schemas and tables included in the model can be queried and will be listed in the Schema Browser. The schema is updated on every page refresh.
Code Limits
- Timeout limits:
- SQL query timeout is 4 minutes by default
- Code execution timeout is 2 minutes by default
- Users can change the runtime limits for a notebook by clicking the timer icon on the top right corner of the Notebook editor.
- Browser memory:
- SQL output preview is capped up to 5MB to keep notebooks running smoothly. The Limit Rows bar of the SQL editor can be used to control the amount of data visualized, while allowing CSV downloads to include full unlimited result sets. To adjust the number of rows visualized, change the number in the limit box in the query editor.
- When a code block for Python is added to a chart, the "Limit Preview" setting for charts still only applies to the SQL Output preview. The "Limit Preview" setting does not affect the number of rows or the size of the dataframe sent to the Python script, allowing the code to run on the full result set within a 500MB limit. If the Python code returns over 5MB of data an error will be surfaced, so in those cases a hard-coded limit or aggregation should be added to the SQL or code blocks, (separate from the "Limit Preview" setting).
- Payload size: The size of the notebook's content, which includes only the content in cells of SQL queries, code, and text without the data preview, has a limit of 50MB.
Limitations
Data Security
Data security rules are not applied when querying shared ElastiCubes and Live models from Notebooks.
Internet Access
For on-premises instances, access to the internet is required to use Notebooks. Access to the internet is required because the query and code outputs are stored in the Sisense Cloud for up to 30 days. After 30 days, the output table expires until the query or code is rerun from the editor.