-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept :memory: mode for credentials parameter in duckdb factory (#1297)
* Accept :memory: mode for credentials parameter in duckdb factory * Check instance of native_value and add check in test for in-memory mode * Add a separate test for in-memory mode when using duckdb * Fix failing test, bind dataset_name to configuration * Adjust test, take ownership when :memory: has been passed * Revert changes * Adjust documentation of duckdb * Add a new exception for duckdb * Adjust error message * Remove backticks * Fix typo * Update docs * Update duckdb docs, merge examples * Remove the mention of :memory: from docstrings * Adjust the message in exception * Catch :memory: in DuckDbCredentials.on_resolve * Update tests * Rename exception * Update docs * Use Destination.from_reference in code snippet * Add one more test for Destination.from_reference and update docs * Format code and ignore mypy error * Use standard way to initialize destination via factory * Preserve environment * Cleanup duckdb docs code snippets * Adjust memo about :pipeline: connection string * Show tables from in-memory schema * Explicitly mention python script instead of pipeline * Fix typo * Reword the description of :pipeline: value * Update docs/website/docs/dlt-ecosystem/destinations/duckdb.md Co-authored-by: VioletM <[email protected]> * Re-arrange text blocks * Add example on how to use :pipeline: connection string * Fix typo * Adjust warning message --------- Co-authored-by: VioletM <[email protected]>
- Loading branch information
1 parent
e329ab9
commit 30f0416
Showing
5 changed files
with
108 additions
and
10 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,11 @@ | ||
from dlt.common.destination.exceptions import DestinationTerminalException | ||
|
||
|
||
class InvalidInMemoryDuckdbCredentials(DestinationTerminalException): | ||
def __init__(self) -> None: | ||
super().__init__( | ||
"To use in-memory instance of duckdb, " | ||
"please instantiate it first and then pass to destination factory\n" | ||
'\nconn = duckdb.connect(":memory:")\n' | ||
'dlt.pipeline(pipeline_name="...", destination=dlt.destinations.duckdb(conn)' | ||
) |
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
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