Skip to content

Commit 78db133

Browse files
committed
Merge branch 'vertica_driver' of github.com:KnowItAllAus/cube.js-korowa into KnowItAllAus-vertica_driver
# Conflicts: # .github/workflows/push.yml # packages/cubejs-docker/package.json # packages/cubejs-server-core/src/core/server.ts
2 parents ee826e1 + e1aa6e9 commit 78db133

File tree

34 files changed

+11547
-20
lines changed

34 files changed

+11547
-20
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
# Debug log for test containers
5+
export DEBUG=testcontainers
6+
7+
export TEST_VERTICA_VERSION=11.1.1-0
8+
9+
echo "::group::Vertica ${TEST_VERTICA_VERSION}"
10+
docker pull vertica/vertica-ce:${TEST_VERTICA_VERSION}
11+
yarn lerna run --concurrency 1 --stream --no-prefix integration:vertica
12+
echo "::endgroup::"

.github/actions/smoke.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ echo "::group::MongoBI"
5757
yarn lerna run --concurrency 1 --stream --no-prefix smoke:mongobi
5858
echo "::endgroup::"
5959

60+
echo "::group::Vertica"
61+
yarn lerna run --concurrency 1 --stream --no-prefix smoke:vertica
62+
echo "::endgroup::"
63+
6064
echo "::group::RBAC"
6165
yarn lerna run --concurrency 1 --stream --no-prefix smoke:rbac
6266
echo "::endgroup::"

.github/workflows/drivers-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
- 'packages/cubejs-mysql-driver/**'
2525
- 'packages/cubejs-postgres-driver/**'
2626
- 'packages/cubejs-snowflake-driver/**'
27+
- 'packages/cubejs-vertica-driver/**'
2728

2829
# To test SQL API Push down
2930
- 'packages/cubejs-backend-native/**'
@@ -49,7 +50,8 @@ on:
4950
- 'packages/cubejs-mysql-driver/**'
5051
- 'packages/cubejs-postgres-driver/**'
5152
- 'packages/cubejs-snowflake-driver/**'
52-
53+
- 'packages/cubejs-vertica-driver/**'
54+
5355
# To test SQL API Push down
5456
- 'packages/cubejs-backend-native/**'
5557
- 'rust/cubesql/**'
@@ -203,6 +205,7 @@ jobs:
203205
snowflake-export-bucket-azure
204206
snowflake-export-bucket-azure-via-storage-integration
205207
snowflake-export-bucket-gcs
208+
vertica
206209
# As per docs:
207210
# Secrets cannot be directly referenced in if: conditionals. Instead, consider setting
208211
# secrets as job-level environment variables, then referencing the environment variables

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ jobs:
336336
node-version: [20.x]
337337
db: [
338338
'clickhouse', 'druid', 'elasticsearch', 'mssql', 'mysql', 'postgres', 'prestodb',
339-
'mysql-aurora-serverless', 'crate', 'mongobi', 'firebolt', 'dremio'
339+
'mysql-aurora-serverless', 'crate', 'mongobi', 'firebolt', 'dremio', 'vertica'
340340
]
341341
fail-fast: false
342342

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

docs/pages/product/configuration/data-sources.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ sources][ref-config-multi-data-src] out of the box.
5959
imageUrl="https://static.cube.dev/icons/firebolt.svg"
6060
title="Firebolt"
6161
/>
62+
<GridItem
63+
url="data-sources/vertica"
64+
imageUrl="https://static.cube.dev/icons/vertica.svg"
65+
title="Vertica"
66+
/>
6267
</Grid>
6368

6469
## Query engines
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Vertica
2+
3+
## Prerequisites
4+
5+
- The hostname for the [Vertica][vertica] database server
6+
- The username/password for the [Vertica][vertica] database server
7+
- The name of the database to use within the [Vertica][vertica] database server
8+
9+
## Setup
10+
11+
### Manual
12+
13+
Add the following to a `.env` file in your Cube project:
14+
15+
```dotenv
16+
CUBEJS_DB_TYPE=vertica
17+
CUBEJS_DB_HOST=my.vertica.host
18+
CUBEJS_DB_USER=vertica_user
19+
CUBEJS_DB_PASS=**********
20+
CUBEJS_DB_SCHEMA=my_vertica_schema
21+
```
22+
23+
## Environment Variables
24+
25+
| Environment Variable | Description | Possible Values | Required |
26+
| -------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------- | :------: |
27+
| `CUBEJS_DB_HOST` | The host URL for a database | A valid database host URL ||
28+
| `CUBEJS_DB_PORT` | The port for the database connection | A valid port number ||
29+
| `CUBEJS_DB_USER` | The username used to connect to the database | A valid database username ||
30+
| `CUBEJS_DB_PASS` | The password used to connect to the database | A valid database password ||
31+
| `CUBEJS_DB_SCHEMA` | The schema within the database to connect to | A valid schema name within a Presto database ||
32+
| `CUBEJS_DB_SSL` | If `true`, enables SSL encryption for database connections from Cube | `true`, `false` ||
33+
| `CUBEJS_CONCURRENCY` | The number of concurrent connections each queue has to the database. Default is `2` | A valid number ||
34+
| `CUBEJS_DB_MAX_POOL` | The maximum number of concurrent database connections to pool. Default is `8` | A valid number ||
35+
36+
37+
## SSL
38+
39+
To enable SSL-encrypted connections between Cube and Verica, set the
40+
`CUBEJS_DB_SSL` environment variable to `true`. For more information on how to
41+
configure custom certificates, please check out [Enable SSL Connections to the
42+
Database][ref-recipe-enable-ssl].
43+
44+
[vertica]: https://www.vertica.com/documentation/vertica/all/
45+
[ref-recipe-enable-ssl]:/guides/recipes/data-sources/using-ssl-connections-to-data-source
46+

packages/cubejs-docker/dev.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ COPY packages/cubejs-sqlite-driver/package.json packages/cubejs-sqlite-driver/pa
7373
COPY packages/cubejs-ksql-driver/package.json packages/cubejs-ksql-driver/package.json
7474
COPY packages/cubejs-dbt-schema-extension/package.json packages/cubejs-dbt-schema-extension/package.json
7575
COPY packages/cubejs-jdbc-driver/package.json packages/cubejs-jdbc-driver/package.json
76+
COPY packages/cubejs-vertica-driver/package.json packages/cubejs-vertica-driver/package.json
7677
# Skip
7778
# COPY packages/cubejs-testing/package.json packages/cubejs-testing/package.json
7879
# COPY packages/cubejs-docker/package.json packages/cubejs-docker/package.json
@@ -150,6 +151,7 @@ COPY packages/cubejs-ksql-driver/ packages/cubejs-ksql-driver/
150151
COPY packages/cubejs-dbt-schema-extension/ packages/cubejs-dbt-schema-extension/
151152
COPY packages/cubejs-jdbc-driver/ packages/cubejs-jdbc-driver/
152153
COPY packages/cubejs-databricks-jdbc-driver/ packages/cubejs-databricks-jdbc-driver/
154+
COPY packages/cubejs-vertica-driver/ packages/cubejs-vertica-driver/
153155
# Skip
154156
# COPY packages/cubejs-testing/ packages/cubejs-testing/
155157
# COPY packages/cubejs-docker/ packages/cubejs-docker/

packages/cubejs-docker/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@cubejs-backend/sqlite-driver": "1.1.10",
3838
"@cubejs-backend/trino-driver": "1.1.11",
3939
"cubejs-cli": "1.1.11",
40+
"@knowitall/vertica-driver": "^0.32.4",
4041
"typescript": "~5.2.2"
4142
},
4243
"resolutions": {

packages/cubejs-server-core/src/core/DriverDependencies.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
ksql: '@cubejs-backend/ksql-driver',
2727
questdb: '@cubejs-backend/questdb-driver',
2828
materialize: '@cubejs-backend/materialize-driver',
29+
vertica: '@knowitall/vertica-driver',
2930
pinot: '@cubejs-backend/pinot-driver',
3031
// List for JDBC drivers
3132
'databricks-jdbc': '@cubejs-backend/databricks-jdbc-driver',

0 commit comments

Comments
 (0)