You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- New dialect page with connection config, table references, limitations, functions
- Add Databricks connection parameters to config.malloynb
- Add Databricks to database support page, sidebar, and connections page
Copy file name to clipboardExpand all lines: src/documentation/language/connections.malloynb
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,10 @@ In the official Malloy connection implementations, the behavior is as follows:
25
25
26
26
In BigQuery, the string passed to the `.table()` connection method can be a two- or three-segment path including the (optional) project ID, dataset ID, and table name, e.g. `bigquery.table('project-id.dataset-id.table-name')` or `bigquery.table('dataset-id.table-name')`. If the project ID is left off, the default project ID for the connection will be used, or else the system default if none is set on the connection.
27
27
28
+
### Databricks
29
+
30
+
In Databricks, the string passed to the `.table()` connection method can be a one-, two-, or three-segment path: `table`, `schema.table`, or `catalog.schema.table`. If the catalog or schema is omitted, the configured defaults (or workspace defaults) are used.
31
+
28
32
### DuckDB
29
33
30
34
In DuckDB, the `.table()` method accepts the path (relative to the Malloy file) of CSV, JSON, or Parquet file containing the table data, e.g. `duckdb.table('data/users.csv')` or `duckdb.table('../../users.parquet')`. URLs to such files (or APIs) are also allowed: see [an example here](../patterns/apijson.malloynb).
Databricks uses the [Databricks SQL Connector](https://docs.databricks.com/en/dev-tools/nodejs-sql-driver.html) to connect to Databricks SQL warehouses and clusters.
Authentication is either **personal access token** (`token`) or **OAuth M2M** (`oauthClientId` + `oauthClientSecret`).
35
+
36
+
## Table References
37
+
38
+
The `.table()` method accepts a one-, two-, or three-segment path: `table`, `schema.table`, or `catalog.schema.table`. If the catalog or schema is omitted, the configured defaults (or workspace defaults) are used.
39
+
40
+
```malloy
41
+
source: flights is databricks.table('malloytest.flights')
42
+
source: orders is databricks.table('my_catalog.analytics.orders')
43
+
```
44
+
45
+
## Limitations
46
+
47
+
- **`string_agg` ordering**: Databricks does not support `ORDER BY` inside `COLLECT_LIST`/`COLLECT_SET`, so `string_agg` and `string_agg_distinct` do not support the `order_by` modifier.
48
+
- **`TIMESTAMP_NTZ`**: Databricks' `TIMESTAMP_NTZ` (timestamp without timezone) maps to `sql native` in Malloy. Use explicit casting to `timestamp` when needed.
49
+
50
+
# Functions
51
+
52
+
## Useful Functions not in the database function library
53
+
54
+
string_agg_distinct
55
+
56
+
## Database Functions
57
+
58
+
Malloy code can, in addition to the [Malloy Standard Functions](../functions.malloynb), reference
59
+
any of the listed functions here without needing to use [Raw SQL Functions](../functions.malloynb#raw-sql-functions).
0 commit comments