Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Locopy | 98 | 7 days ago | 15 | April 19, 2022 | 3 | apache-2.0 | Python | |||
locopy: Loading/Unloading to Redshift and Snowflake using Python. | ||||||||||
Activerecord4 Redshift Adapter | 73 | 19 | 4 | 2 years ago | 3 | October 21, 2015 | 17 | other | Ruby | |
ActiveRecord 4 DB adapter for Amazon Redshift | ||||||||||
Redshift Fake Driver | 51 | 3 months ago | 16 | July 14, 2022 | 23 | apache-2.0 | Scala | |||
A jdbc driver emulates redshift specific commands. | ||||||||||
Amazon Redshift Jdbc Driver | 47 | 1 | 13 days ago | 12 | May 05, 2022 | 11 | apache-2.0 | Java | ||
Redshift JDBC Driver. It supports JDBC 4.2 specification. | ||||||||||
Activerecord5 Redshift Adapter | 42 | 3 | 2 | 2 years ago | 3 | May 29, 2018 | 8 | other | Ruby | |
Redshift Jdbc Caching Driver | 8 | 3 years ago | mit | Java | ||||||
A JDBC driver wrapper that adds Redis caching support to the Amazon RedShift JDBC driver. | ||||||||||
Maiev | 2 | 5 years ago | Scala | |||||||
The world of warcraft heroine, a part of the Watchers | ||||||||||
Multidb Jdbc Driver | 2 | 4 years ago | mit | Java | ||||||
Helps connect to multiple databases and also supports query routing. | ||||||||||
Awr.redshift | 2 | 6 years ago | 1 | R | ||||||
R Wrapper to Redshift JDBC driver |
redshift-fake-driver is a JDBC driver accepting Redshift specific commands (e.g. COPY, UNLOAD), which is useful for local testing.
The driver uses AWS SDK for Java
to connect to S3, so you can use mocking libraries to emulate S3. (e.g. fake-s3)
Some options are currently not supported.
Contributions are welcome !
aws-java-sdk-s3
, aws-java-sdk-sts
>= 1.10.8postgresql
or h2
JDBC driverpom.xml
<dependency>
<groupId>jp.ne.opt</groupId>
<artifactId>redshift-fake-driver_2.11</artifactId>
<version>1.0.15</version>
</dependency>
pom.xml
.build.sbt
"jp.ne.opt" %% "redshift-fake-driver" % "1.0.15"
build.sbt
.Class.forName("jp.ne.opt.redshiftfake.postgres.FakePostgresqlDriver")
val endpoint = "http://localhost:9444/" // in production, scheme will be "s3://"
val url = "jdbc:postgresqlredshift://localhost:5432/foo"
val prop = new Properties()
prop.setProperty("driver", "jp.ne.opt.redshiftfake.postgres.FakePostgresqlDriver")
prop.setProperty("user", "sa")
val conn = DriverManager.getConnection(url, prop)
val stmt = conn.createStatement()
val unloadSql =
s"""unload ('select * from foo') to '${endpoint}foo/unloaded_'
|credentials 'aws_access_key_id=AKIAXXXXXXXXXXXXXXX;aws_secret_access_key=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY'
|manifest""".stripMargin
stmt.execute(unloadSql)
val copySql =
s"""copy bar from '${endpoint}foo/unloaded_manifest'
|credentials 'aws_access_key_id=AKIAXXXXXXXXXXXXXXX;aws_secret_access_key=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY'
|manifest""".stripMargin
val copySqlWithTemporaryToken =
s"""COPY bar FROM '${endpoint}foo/unloaded_manifest'
|ACCESS_KEY_ID 'some_access_key_id'
|SECRET_ACCESS_KEY 'some_secret_access_key'
|SESSION_TOKEN 'some_session_token';""".stripMargin
stmt.execute(copySql)
fake.awsRegion
system property.
ap-northeast-1
by defaultfake.awsS3Endpoint
system property.
fake-s3
server on http://localhost:9444/
, specify -Dfake.awsS3Endpoint="http://localhost:9444/"
. (trailing slash is required)Apache 2.0