Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inititalization script & release 0.5.0 #15

Merged
merged 2 commits into from
Sep 21, 2024
Merged

Add inititalization script & release 0.5.0 #15

merged 2 commits into from
Sep 21, 2024

Conversation

alexmalins
Copy link
Owner

What does this PR implement/fix?

Add support for initialization scripts. By default harlequin-databricks will attempt to run an initialization script of SQL commands against Databricks from ~/.databricksrc or from the file specified via the --init-path CLI option. This means you can e.g. set a default catalog (USE CATALOG ...), timezone, or set of user-defined variables for the session. It is possible to disable initialization via the --no-init CLI flag, having no ~/.databricksrc file, or feeding
a non-existent file path to --init-path.

Fixes Issue

#14

Other comments?

Implementation follows that of the DuckDB and SQLite adapters. It does not implement running dot commands, as I don't think such a thing exists for Databricks.

As per duckdb and sqlite adapters

This adapter does not allow dot commands in the initialization
script, as I don't think such a think exists for Databricks
@alexmalins alexmalins merged commit e0815ff into main Sep 21, 2024
9 checks passed
@alexmalins alexmalins deleted the init-script branch September 21, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant