Skip to content

Commit 659c24c

Browse files
QuantamHDpaveltiunov
authored andcommitted
feat: Added SparkSQL and Hive support to the JDBC driver. (#127)
This will allow cubejs to connect directly to SparkSQL and Hive datastores running big data queries.
1 parent 53fb951 commit 659c24c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

packages/cubejs-jdbc-driver/driver/JDBCDriver.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,34 @@ const DbTypes = {
5656
PWD: process.env.CUBEJS_AWS_SECRET,
5757
S3OutputLocation: process.env.CUBEJS_AWS_S3_OUTPUT_LOCATION
5858
}
59+
},
60+
sparksql: {
61+
driverClass: "org.apache.hive.jdbc.HiveDriver",
62+
prepareConnectionQueries: [],
63+
mavenDependency: {
64+
"groupId": "org.apache.hive",
65+
"artifactId": "hive-jdbc",
66+
"version": "2.3.5"
67+
},
68+
jdbcUrl: () => `jdbc:hive2://${process.env.CUBEJS_DB_HOST}:${process.env.CUBEJS_DB_PORT || "10000"}/${process.env.CUBEJS_DB_NAME}`,
69+
properties: {
70+
user: process.env.CUBEJS_DB_USER,
71+
password: process.env.CUBEJS_DB_PASS,
72+
}
73+
},
74+
hive: {
75+
driverClass: "org.apache.hive.jdbc.HiveDriver",
76+
prepareConnectionQueries: [],
77+
mavenDependency: {
78+
"groupId": "org.apache.hive",
79+
"artifactId": "hive-jdbc",
80+
"version": "2.3.5"
81+
},
82+
jdbcUrl: () => `jdbc:hive2://${process.env.CUBEJS_DB_HOST}:${process.env.CUBEJS_DB_PORT || "10000"}/${process.env.CUBEJS_DB_NAME}`,
83+
properties: {
84+
user: process.env.CUBEJS_DB_USER,
85+
password: process.env.CUBEJS_DB_PASS,
86+
}
5987
}
6088
};
6189

0 commit comments

Comments
 (0)