URL format | jdbc:redshift://host:port/database |
---|---|
Ships with MigrateDB Command-line | No |
Download | Follow the instructions at docs.aws.amazon.com |
Supported versions | 1.2.10.1009 and later |
2.0.0.5 and later are partially supported (see below) |
|
Default Java class | com.amazon.redshift.jdbc42.Driver |
pg_dump -s
./* Single line comment */
CREATE TABLE test_data (
test_id INT IDENTITY NOT NULL PRIMARY KEY,
value VARCHAR(25) NOT NULL
);
/*
Multi-line
comment
*/
INSERT INTO test_data (value) VALUES ('Hello');
CREATE VIEW value_only AS SELECT value FROM test_data;
CREATE TABLE another_table AS SELECT 'some-data' as name;
CREATE FUNCTION add(integer, integer) RETURNS integer
IMMUTABLE
AS $$
select $1 + $2;
$$ LANGUAGE sql;
-- Placeholder
INSERT INTO ${tableName} (value) VALUES ('Mr. T');
Due to Redshift limitations ALTER TABLE
and DROP TABLE
for external tables cannot run within a transaction, yet
MigrateDB doesn’t
autodetect this. You can work around this limitation and successfully execute such a statement by including a VACUUM
statement in the same SQL file as this will force MigrateDB to run the entire migration without a transaction.
The v2 driver is only supported from v2.0.0.5, and only then by MigrateDB setting the connection
property enableFetchRingBuffer=false
.
We recommend using the latest v1 driver for the time being.
See here for more details.