Amazon Redshift Publishing
Commands use Linux syntax. See Examples & Recipes for the Windows equivalents and the arguments every sync needs.
The credentials entries used below, and the Amazon Redshift setup they rely on, are described in Amazon Redshift Publishing.
Internal Tables
./LakeXpress config create \
-a credentials.json \
--lxdb_auth_id lxdb_postgres \
--source_db_auth_id source_postgres \
--source_db_name MY_DB \
--source_schema_name MY_SCHEMA \
--target_storage_id s3_01 \
--sub_path mydata \
--publish_target redshift_classic \
--publish_method internal \
--publish_schema_pattern "INT_{subpath}_{date}" \
--publish_table_pattern "{schema}_{table}"
External Tables (Spectrum)
./LakeXpress config create \
-a credentials.json \
--lxdb_auth_id lxdb_postgres \
--source_db_auth_id source_postgres \
--source_db_name MY_DB \
--source_schema_name MY_SCHEMA \
--target_storage_id s3_01 \
--sub_path mydata \
--publish_target redshift_classic \
--publish_method external \
--publish_schema_pattern "EXT_{subpath}_{date}" \
--publish_table_pattern "{schema}_{table}"
With Primary Key Constraints
Add --pk_constraints to include primary key definitions in internal table DDL:
./LakeXpress config create \
-a credentials.json \
--lxdb_auth_id lxdb_postgres \
--source_db_auth_id source_postgres \
--source_schema_name MY_SCHEMA \
--target_storage_id s3_01 \
--publish_method internal \
--publish_target redshift_classic \
--pk_constraints