-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IO: Add the
if-exists
query parameter by updating to influxio 0.4.0
Co-authored-by: Niklas Schmidtmer <[email protected]>
- Loading branch information
1 parent
783313a
commit 4797dda
Showing
3 changed files
with
24 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ working with InfluxDB. | |
pip install --upgrade 'cratedb-toolkit[influxdb]' | ||
``` | ||
|
||
## Examples | ||
## Usage | ||
|
||
### Workstation | ||
|
||
|
@@ -66,5 +66,26 @@ ctk load table \ | |
--cratedb-sqlalchemy-url="crate://admin:[email protected]:4200/testdrive/demo?ssl=true" | ||
``` | ||
|
||
## Parameters | ||
|
||
### `if-exists` | ||
|
||
The target table will be created automatically, if it does not exist. If it | ||
does exist, the `if-exists` URL query parameter can be used to configure this | ||
behavior. The default value is `fail`, the possible values are: | ||
|
||
* `fail`: Raise a ValueError. | ||
* `replace`: Drop the table before inserting new values. | ||
* `append`: Insert new values to the existing table. | ||
|
||
:::{rubric} Example usage | ||
::: | ||
In order to always replace the target table, i.e. to drop and re-create it | ||
prior to inserting data, use `?if-exists=replace`. | ||
```shell | ||
export CRATEDB_SQLALCHEMY_URL="crate://crate@localhost:4200/testdrive/demo?if-exists=replace" | ||
ctk load table influxdb2://example:token@localhost:8086/testdrive/demo | ||
``` | ||
|
||
|
||
[influxio]: inv:influxio:*:label#index |
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