Datalore Help

SQL cells

Use SQL cells to query attached databases and retrieve data as dataframes.

Query a database in an SQL cell

  1. Create an SQL cell:

    • Go to Tools | Attached data and click New SQL cell for the attached database that you want to use.

      Opening an SQL cell from Attached data
    • Hover over the bottom border of a cell and select More cell types | SQL cell. You will be prompted to select the required database if you you have more than one database attached.

      Selecting a database for querying
  2. Enter an SQL statement.

  3. Run the query (Run icon or Ctrl + Enter shortcut). The result set will be shown in the output and saved to a dataframe.

  4. (Optional) To rename the dataframe, click the dataframe name next to RESULT SAVED TO on the SQL toolbar.

SQL cells: example

Below is an example of two SQL cells used to work with a Snowflake database.

Quering a Snowflake database
Last modified: 28 November 2021