Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 866 Bytes

File metadata and controls

27 lines (24 loc) · 866 Bytes

Hypertable

CREATE TABLE data(time TIMESTAMP WITHOUT TIME ZONE NOT NULL, value bigint) WITH (timescaledb.hypertable, timescaledb.partition_column = 'time');
CREATE INDEX data_idx ON data(value, time desc);

INSERT INTO data(time, value) SELECT now() + i * INTERVAL '1 day', i FROM generate_series(1, 10000) i;
PG2P_DB_PASSWORD=postgres PG2P_DB_USER=postgres PG2P_S3_ACCESS_KEY=admin PG2P_S3_SECRET_ACCESS_KEY=password ./postgres2parquet-go snapshot hypertable \
  --schema public \
  --table range_partition_table \
  --partition-column value \
  --parallelism 10 \
  --bucket warehouse \
  --fetch-size 10000 \
  --file-path /schema/table/ \
  --file-size-threshold 52428800 \
  --db-host localhost \
  --db-port 5432 \
  --db-name postgres \
  --db-pool-size 10 \
  --s3-endpoint localhost:9000 \
  --s3-region none \
  --s3-secure false