-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Annoyingly you can't shade the default artifact if it has a classifier. (https://stackoverflow.com/a/47775031) Changed the *thin* to just be the default artifact classifier & *shaded* to be ... the shaded artifact. Augmented the README also as per Julian's suggestion.
- Loading branch information
Showing
2 changed files
with
39 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,38 @@ | |
|
||
![Maven Central](https://img.shields.io/maven-central/v/com.github.jonathanswenson/bqjdbc) | ||
|
||
A fat (shaded) jar is provided at the following coordinates: | ||
This is a [JDBC Driver](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) for [BigQuery](https://cloud.google.com/bigquery) | ||
forked from https://code.google.com/p/starschema-bigquery-jdbc/ | ||
|
||
You can create a JDBC connection easily for a variety of authentication types. | ||
For instance for a _service account_ in a properties file: | ||
|
||
```ini | ||
projectid=disco-parsec-659 | ||
type=service | ||
user[email protected] | ||
password=bigquery_credentials.p12 | ||
``` | ||
|
||
```java | ||
import net.starschema.clouddb.jdbc.*; | ||
import java.sql.*; | ||
|
||
public static class Example { | ||
public static void main(String[] args) { | ||
// load the class so that it registers itself | ||
Class.forName("net.starschema.clouddb.jdbc.BQDriver"); | ||
final String jdbcUrl = BQSupportFuncts.constructUrlFromPropertiesFile( | ||
BQSupportFuncts.readFromPropFile( | ||
getClass().getResource("/serviceaccount.properties").getFile() | ||
)); | ||
final Connection con = DriverManager.getConnection(jdbcUrl); | ||
// perform SQL against BigQuery now! | ||
} | ||
} | ||
``` | ||
|
||
The dependency is provided at the following coordinates: | ||
```xml | ||
<dependency> | ||
<groupId>com.github.jonathanswenson</groupId> | ||
|
@@ -11,18 +42,19 @@ A fat (shaded) jar is provided at the following coordinates: | |
</dependency> | ||
``` | ||
|
||
If you would like a thin jar you can use _thin_ classifier. | ||
|
||
A fat (shaded) jar is provided at the following coordinates. | ||
```xml | ||
<dependency> | ||
<groupId>com.github.jonathanswenson</groupId> | ||
<artifactId>bqjdbc</artifactId> | ||
<version>...</version> | ||
<classifier>thin</classifier> | ||
<classifier>shaded</classifier> | ||
</dependency> | ||
``` | ||
|
||
## Releases | ||
## Development | ||
|
||
### Releases | ||
|
||
Releases are handled through GitHub actions, and kicked off when a release is created. | ||
|
||
|
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