-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document Databricks adapter initialization script (#99)
- Loading branch information
1 parent
66af2fd
commit a66c866
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Initialization Scripts | ||
menuOrder: 121 | ||
--- | ||
|
||
Each time you start Harlequin, it will execute SQL commands from a Databricks initialization script. | ||
For example: | ||
|
||
```sql | ||
USE CATALOG my_catalog; | ||
SET TIME ZONE 'Asia/Tokyo'; | ||
DECLARE yesterday DATE DEFAULT CURRENT_DATE - INTERVAL '1' DAY; | ||
``` | ||
|
||
Multi-line SQL is allowed, but must be terminated by a semicolon. | ||
|
||
## Configuring the Script Location | ||
|
||
By default, Harlequin will execute the script found at `~/.databricksrc`. However, you can provide | ||
a different path using the `--init-path` option (aliased to `-i` or `-init`): | ||
|
||
```bash | ||
harlequin -a databricks --init-path /path/to/my/script.sql | ||
``` | ||
|
||
## Disabling Initialization | ||
|
||
If you would like to open Harlequin without running the script you have at `~/.databricksrc`, you | ||
can either pass a nonexistent path (or `/dev/null`) to the option above, or start Harlequin with | ||
the `--no-init` option: | ||
|
||
```bash | ||
harlequin -a databricks --no-init | ||
``` |