| SET client_min_messages TO 'warning'; |
| CREATE READABLE EXTERNAL TABLE s3write_special_characters_read (date text, time text, status bool, sample1 float, sample2 float, |
| volume int) LOCATION('s3://s3-us-west-2.amazonaws.com/@write_prefix@/?:&=+/ config=@config_file@') FORMAT 'csv'; |
| |
| CREATE WRITABLE EXTERNAL TABLE s3write_special_characters_write (date text, time text, status bool, sample1 float, sample2 float, |
| volume int) LOCATION('s3://s3-us-west-2.amazonaws.com/@write_prefix@/?:&=+/ config=@config_file@') FORMAT 'csv'; |
| |
| INSERT INTO s3write_special_characters_write (date, time, status, sample1, sample2, volume) |
| SELECT current_date, localtime, (random() > 0.5)::bool, trunc(random()::numeric, 8), trunc(random()::numeric, 8), v |
| FROM generate_series(1, 10000) as v; |
| |
| DROP EXTERNAL TABLE IF EXISTS s3write_special_characters_read_new; |
| DROP EXTERNAL TABLE IF EXISTS s3write_special_characters_write_new; |
| |
| CREATE READABLE EXTERNAL TABLE s3write_special_characters_read_new (date text, time text, status bool, sample1 float, sample2 float, |
| volume int) LOCATION('s3://s3-us-west-2.amazonaws.com/@write_prefix@/?:&=+_00:00:00/ config=@config_file@') FORMAT 'csv'; |
| |
| CREATE WRITABLE EXTERNAL TABLE s3write_special_characters_write_new (date text, time text, status bool, sample1 float, sample2 float, |
| volume int) LOCATION('s3://s3-us-west-2.amazonaws.com/@write_prefix@/?:&=+_00:00:00/ config=@config_file@') FORMAT 'csv'; |
| |
| INSERT INTO s3write_special_characters_write_new SELECT * FROM s3write_special_characters_read; |
| SELECT min(volume), max(volume), count(*) FROM s3write_special_characters_read_new; |
| |
| DROP EXTERNAL TABLE IF EXISTS s3write_special_characters_read; |
| DROP EXTERNAL TABLE IF EXISTS s3write_special_characters_write; |
| DROP EXTERNAL TABLE IF EXISTS s3write_special_characters_read_new; |
| DROP EXTERNAL TABLE IF EXISTS s3write_special_characters_write_new; |
| RESET client_min_messages; |