Divooka Reference

Table Queries

3 nodes

On this page 3

Explain SQL

Function

The plan the engine makes for a SQL SELECT over tables - which filters it pushes down, which side of a join it hashes - as text, to see why a query is slow or what it does.

Signature
ExplainSQL -> Text
    tables: Table Array
    SQL: Text
    names: Text Array
string ExplainSQL(Table[] tables, string sql, string[] names)

Parameters

nametypedefaultdescription
tablesTable Array—The tables to query.
SQLText—The SELECT statement.
namesText Array—What each table is called in the SQL, in the same order.

Returns

PlanText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Table Queries
Package
Data Analytics

Load

Function

The tables loaded under their names: the name given, else the table's own, else Table1, Table2 and so on.

Signature
Load(tables: Table Array, names: Text Array) -> Table Database
TableDatabase Load(Table[] tables, string[] names)

Parameters

nametypedefaultdescription
tablesTable Array—
namesText Array—

Returns

resultTable Database
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Table Queries
Package
Data Analytics

Query With SQL

Function

The answer to a SQL SELECT over tables, as a table: SELECT Region, SUM(Revenue) AS Revenue FROM Sales GROUP BY Region ORDER BY Revenue DESC.

Signature
QueryWithSQL -> Table
    tables: Table Array
    SQL: Text
    names: Text Array
Table QueryWithSQL(Table[] tables, string sql, string[] names)

Parameters

nametypedefaultdescription
tablesTable Array—The tables to query.
SQLText—The SELECT statement.
namesText Array—What each table is called in the SQL, in the same order; each table's own name, or Table1, Table2…, where not given.

Returns

ResultTable
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Table Queries
Package
Data Analytics