Skip to content

Commit 8d80488

Browse files
committed
feat: add MySQL to Snowflake replication test with BIT columns and update test suite
1 parent 14c138f commit 8d80488

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
source: mysql
2+
target: snowflake
3+
4+
# Hooks to set up test data
5+
hooks:
6+
start:
7+
- description: "Create test table with BIT columns in MySQL"
8+
type: query
9+
connection: mysql
10+
query: |
11+
USE mysql;
12+
13+
DROP TABLE IF EXISTS bit_table;
14+
15+
CREATE TABLE bit_table (
16+
id INT PRIMARY KEY AUTO_INCREMENT,
17+
bit1_col BIT(1) DEFAULT b'0',
18+
bit8_col BIT(8) DEFAULT b'11110000',
19+
bit16_col BIT(16) DEFAULT b'1010101010101010',
20+
bit32_col BIT(32) DEFAULT b'11111111000000001111111100000000',
21+
bit64_col BIT(64) DEFAULT b'1010101010101010101010101010101010101010101010101010101010101010',
22+
name VARCHAR(50),
23+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
24+
);
25+
26+
INSERT INTO bit_table (bit1_col, bit8_col, bit16_col, bit32_col, bit64_col, name) VALUES
27+
(b'0', b'00000000', b'0000000000000000', b'00000000000000000000000000000000', b'0000000000000000000000000000000000000000000000000000000000000000', 'all_zeros'),
28+
(b'1', b'11111111', b'1111111111111111', b'11111111111111111111111111111111', b'1111111111111111111111111111111111111111111111111111111111111111', 'all_ones'),
29+
(b'1', b'10101010', b'1010101010101010', b'10101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', 'alternating'),
30+
(b'0', b'01010101', b'0101010101010101', b'01010101010101010101010101010101', b'0101010101010101010101010101010101010101010101010101010101010101', 'inverse_alternating'),
31+
(b'1', b'11110000', b'1111000011110000', b'11110000111100001111000011110000', b'1111000011110000111100001111000011110000111100001111000011110000', 'pattern_test');
32+
33+
streams:
34+
mysql.bit_table:
35+
object: public.bit_table
36+
mode: full-refresh

cmd/sling/tests/suite.cli.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,4 @@ n test_name rows bytes streams fails output_contains command
7171
70 Run sling chunking 10 """update_dt"" >= '2018-11-21|""id"" >= 601 and ""id"" <= 800|TEST1K_SQLSERVER_PG_003|TEST1K_SNOWFLAKE_PG_004" sling run -r cmd/sling/tests/replications/r.20.yaml -d
7272
71 Run sling pipeline 02 sftp//tmp/test1k_mysql_pg.csv|aws_s3/sling_test/files/test1k_s3.csv sling run -p cmd/sling/tests/pipelines/p.02.yaml
7373
72 Run sling to test column casing 1 test1k_clickhouse_pg_first_name sling run -d -r cmd/sling/tests/replications/r.21.yaml
74+
73 Run sling mysql bit 1 execution succeeded sling run -d -r cmd/sling/tests/replications/r.22.yaml

0 commit comments

Comments
 (0)