-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,175 additions
and
96 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,75 @@ | ||
DROP SCHEMA IF EXISTS EXASOL CASCADE; | ||
CREATE SCHEMA EXASOL; | ||
|
||
CREATE OR REPLACE TABLE EXASOL.diamonds | ||
( | ||
"carat" DOUBLE, | ||
"cut" VARCHAR(256), | ||
"color" VARCHAR(256), | ||
"clarity" VARCHAR(256), | ||
"depth" DOUBLE, | ||
"table" DOUBLE, | ||
"price" BIGINT, | ||
"x" DOUBLE, | ||
"y" DOUBLE, | ||
"z" DOUBLE | ||
); | ||
|
||
CREATE OR REPLACE TABLE EXASOL.batting | ||
( | ||
"playerID" VARCHAR(256), | ||
"yearID" BIGINT, | ||
"stint" BIGINT, | ||
"teamID" VARCHAR(256), | ||
"logID" VARCHAR(256), | ||
"G" BIGINT, | ||
"AB" BIGINT, | ||
"R" BIGINT, | ||
"H" BIGINT, | ||
"X2B" BIGINT, | ||
"X3B" BIGINT, | ||
"HR" BIGINT, | ||
"RBI" BIGINT, | ||
"SB" BIGINT, | ||
"CS" BIGINT, | ||
"BB" BIGINT, | ||
"SO" BIGINT, | ||
"IBB" BIGINT, | ||
"HBP" BIGINT, | ||
"SH" BIGINT, | ||
"SF" BIGINT, | ||
"GIDP" BIGINT | ||
); | ||
|
||
CREATE OR REPLACE TABLE EXASOL.awards_players | ||
( | ||
"playerId" VARCHAR(256), | ||
"awardID" VARCHAR(256), | ||
"yearID" VARCHAR(256), | ||
"logID" VARCHAR(256), | ||
"tie" VARCHAR(256), | ||
"notest" VARCHAR(256) | ||
); | ||
|
||
CREATE OR REPLACE TABLE EXASOL.functional_alltypes | ||
( | ||
"id" INTEGER, | ||
"bool_col" BOOLEAN, | ||
"tinyint_col" SHORTINT, | ||
"small_int" SMALLINT, | ||
"int_col" INTEGER, | ||
"bigint_col" BIGINT, | ||
"float_col" FLOAT, | ||
"double_col" DOUBLE PRECISION, | ||
"date_string_col" VARCHAR(256), | ||
"string_col" VARCHAR(256), | ||
"timestamp_col" TIMESTAMP, | ||
"year" INTEGER, | ||
"month" INTEGER | ||
); | ||
|
||
|
||
IMPORT INTO EXASOL.diamonds FROM LOCAL CSV FILE '/data/diamonds.csv' COLUMN SEPARATOR = ',' SKIP = 1; | ||
IMPORT INTO EXASOL.batting FROM LOCAL CSV FILE '/data/batting.csv' COLUMN SEPARATOR = ',' SKIP = 1; | ||
IMPORT INTO EXASOL.awards_players FROM LOCAL CSV FILE '/data/awards_players.csv' COLUMN SEPARATOR = ',' SKIP = 1; | ||
IMPORT INTO EXASOL.functional_alltypes FROM LOCAL CSV FILE '/data/functional_alltypes.csv' COLUMN SEPARATOR = ',' SKIP = 1; |
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,96 @@ | ||
# Exasol | ||
|
||
[https://www.exasol.com](https://www.exasol.com) | ||
|
||
## Install | ||
|
||
Install Ibis and dependencies for the Exasol backend: | ||
|
||
::: {.panel-tabset} | ||
|
||
## `pip` | ||
|
||
Install with the `exasol` extra: | ||
|
||
```{.bash} | ||
pip install 'ibis-framework[exasol]' | ||
``` | ||
|
||
And connect: | ||
|
||
```{.python} | ||
import ibis | ||
con = ibis.exasol.connect(...) # <1> | ||
``` | ||
|
||
1. Adjust connection parameters as needed. | ||
|
||
## `conda` | ||
|
||
Install for Exasol: | ||
|
||
```{.bash} | ||
conda install -c conda-forge ibis-exasol | ||
``` | ||
|
||
And connect: | ||
|
||
```{.python} | ||
import ibis | ||
con = ibis.exasol.connect(...) # <1> | ||
``` | ||
|
||
1. Adjust connection parameters as needed. | ||
|
||
## `mamba` | ||
|
||
Install for Exasol: | ||
|
||
```{.bash} | ||
mamba install -c conda-forge ibis-exasol | ||
``` | ||
|
||
And connect: | ||
|
||
```{.python} | ||
import ibis | ||
con = ibis.exasol.connect(...) # <1> | ||
``` | ||
|
||
1. Adjust connection parameters as needed. | ||
|
||
::: | ||
|
||
## Connect | ||
|
||
### `ibis.exasol.connect` | ||
|
||
```python | ||
con = ibis.exasol.connect( | ||
user = "username", | ||
password = "password", | ||
host = "localhost", | ||
port = 8563, | ||
schema = None, | ||
encryption = True, | ||
certificate_validation = True, | ||
encoding = "en_US.UTF-8" | ||
) | ||
``` | ||
|
||
::: {.callout-note} | ||
`ibis.exasol.connect` is a thin wrapper around [`ibis.backends.exasol.Backend.do_connect`](#ibis.backends.exasol.Backend.do_connect). | ||
::: | ||
|
||
### Connection Parameters | ||
|
||
```{python} | ||
#| echo: false | ||
#| output: asis | ||
from _utils import render_do_connect | ||
render_do_connect("exasol") | ||
``` |
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
Oops, something went wrong.