Docs

User guides

Filter, sort, and join tables with AI

By using AI, Dataland lets you filter, sort, compute new columns, and even join together tables in your Dataland workspace.

The below example shows how a user is able to ask the AI to filter the table so that ORDER_STATUS column is Shipped. Then, the user asks to sort that filtered data by order date. Finally, the user creates a new view, so that other teammates can use the same filters without having to recreate them.

How to use Dataland AI

  1. Go to a table and press Ctrl + I (or Cmd + I) depending on your operating system to toggle AI mode. You can also click on the AI tab in the details sidebar.

    using AI

  2. Ask Dataland AI to reshape your data to how you want it. Here are some examples:

    • column_1 is greater than X and column_2 is Y, sort by column_3
    • only show these specific columns
    • column_4 contains the word 'apple'
  3. Dataland AI will then process your ask, and show you an updated table.

  4. You can further ask the AI to do more filtering, sorting, etc. on the updated table.

  5. Finally, you can create a view, so that your other teammates.

Advanced usage

Performing joins

For more complex queries, users can click on the Enable joins toggle to use a more powerful LLM + feed in context from the other base tables in the Dataland workspace, and then ask Dataland AI normally.

You must add every table to Dataland in order for joins to occur. For example, you want to join a customers table to an orders table, you'll need to add both tables to Dataland first. Dataland will not discover tables that haven't been added to the workspace.

Many to one joins

The below example shows a many-to-one join -- joining from the users table to pull in the team name, based on team_id.

One to many joins

The below example shows a one-to-many join between teams and users that preserves granularity of the teams table.

Writing SQL

Technical users can edit the SQL returned by the AI.

The below example shows how a technical user is able to edit the WHERE clause in SQL and update the table.

At a system level, this SQL is entirely sandboxed from your data source, so users can safely write arbitrary SQL. Dataland runs these SQL queries against an isolated DuckDB database. We also only allow SELECT statements in the DuckDB instance as well.