sql-testing-library 0.22.1__tar.gz → 0.23.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/CHANGELOG.md +12 -0
  2. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/PKG-INFO +58 -40
  3. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/README.md +52 -33
  4. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/pyproject.toml +16 -12
  5. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/__init__.py +1 -1
  6. sql_testing_library-0.23.0/src/sql_testing_library/_adapters/clickhouse.py +337 -0
  7. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_core.py +47 -10
  8. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_mock_table.py +10 -12
  9. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_pytest_plugin.py +21 -0
  10. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_sql_utils.py +108 -6
  11. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/LICENSE +0 -0
  12. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/__init__.py +0 -0
  13. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/athena.py +0 -0
  14. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/base.py +0 -0
  15. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/bigquery.py +0 -0
  16. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/duckdb.py +0 -0
  17. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/presto.py +0 -0
  18. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/redshift.py +0 -0
  19. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/snowflake.py +0 -0
  20. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_adapters/trino.py +0 -0
  21. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_exceptions.py +0 -0
  22. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_sql_logger.py +0 -0
  23. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/_types.py +0 -0
  24. {sql_testing_library-0.22.1 → sql_testing_library-0.23.0}/src/sql_testing_library/py.typed +0 -0
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.23.0 (2026-07-26)
9
+
10
+ ### Feat
11
+
12
+ - add ClickHouse adapter (#114) (#157)
13
+
14
+ ### Fix
15
+
16
+ - grant contents:read to workflows that call reusable workflows
17
+ - resolve all code scanning security alerts (#147)
18
+ - preserve None values in to_dataframe for pandas 3.x StringDtype compatibility
19
+
8
20
  ## 0.22.1 (2026-03-02)
9
21
 
10
22
  ### Fix
@@ -1,15 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-testing-library
3
- Version: 0.22.1
4
- Summary: SQL Testing Framework for Python: Unit test SQL queries with mock data injection for BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB. Simplify data engineering ETL testing and analytics validation.
3
+ Version: 0.23.0
4
+ Summary: SQL Testing Framework for Python: Unit test SQL queries with mock data injection for BigQuery, Snowflake, Redshift, Athena, Trino, DuckDB, and ClickHouse. Simplify data engineering ETL testing and analytics validation.
5
5
  License: MIT
6
6
  License-File: LICENSE
7
- Keywords: sql,testing,unit-testing,mock-data,database-testing,bigquery,snowflake,redshift,athena,trino,duckdb,data-engineering,etl-testing,sql-validation,query-testing,pytest,data-quality,analytics-testing,sql-unit-test,database-mocking,sql-mock,data-warehouse-testing,cloud-database,aws-athena,google-bigquery,amazon-redshift,snowflake-testing,ci-cd-testing,test-automation
7
+ Keywords: sql,testing,unit-testing,mock-data,database-testing,bigquery,snowflake,redshift,athena,trino,duckdb,data-engineering,etl-testing,sql-validation,query-testing,pytest,data-quality,analytics-testing,sql-unit-test,database-mocking,sql-mock,data-warehouse-testing,cloud-database,aws-athena,google-bigquery,amazon-redshift,snowflake-testing,clickhouse,clickhouse-testing,ci-cd-testing,test-automation
8
8
  Author: Gurmeet Saran
9
9
  Author-email: gurmeetx@gmail.com
10
10
  Maintainer: Gurmeet Saran
11
11
  Maintainer-email: gurmeetx@gmail.com
12
- Requires-Python: >=3.9
12
+ Requires-Python: >=3.10
13
13
  Classifier: Development Status :: 4 - Beta
14
14
  Classifier: Environment :: Console
15
15
  Classifier: Framework :: Pytest
@@ -20,7 +20,6 @@ Classifier: License :: OSI Approved :: MIT License
20
20
  Classifier: Natural Language :: English
21
21
  Classifier: Operating System :: OS Independent
22
22
  Classifier: Programming Language :: Python :: 3
23
- Classifier: Programming Language :: Python :: 3.9
24
23
  Classifier: Programming Language :: Python :: 3.10
25
24
  Classifier: Programming Language :: Python :: 3.11
26
25
  Classifier: Programming Language :: Python :: 3.12
@@ -37,16 +36,16 @@ Classifier: Typing :: Typed
37
36
  Provides-Extra: all
38
37
  Provides-Extra: athena
39
38
  Provides-Extra: bigquery
39
+ Provides-Extra: clickhouse
40
40
  Provides-Extra: duckdb
41
41
  Provides-Extra: redshift
42
42
  Provides-Extra: snowflake
43
43
  Provides-Extra: trino
44
44
  Requires-Dist: db-dtypes (>=1.4.3,<2.0.0)
45
- Requires-Dist: docutils (>=0.21.2,<0.23.0)
45
+ Requires-Dist: docutils (>=0.21.2,<0.24.0)
46
46
  Requires-Dist: pandas (>=1.0.0)
47
47
  Requires-Dist: pydantic (>=2.0.0)
48
48
  Requires-Dist: sqlglot (>=26.0.0)
49
- Requires-Dist: typing-extensions (>=4.5.0) ; python_version < "3.10"
50
49
  Project-URL: Bug Tracker, https://github.com/gurmeetsaran/sqltesting/issues
51
50
  Project-URL: Changelog, https://github.com/gurmeetsaran/sqltesting/blob/master/CHANGELOG.md
52
51
  Project-URL: Contributing, https://github.com/gurmeetsaran/sqltesting/blob/master/CONTRIBUTING.md
@@ -62,7 +61,7 @@ Description-Content-Type: text/markdown
62
61
 
63
62
  > **A powerful Python framework for unit testing SQL queries with mock data injection**
64
63
  >
65
- > Test SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB with type-safe mock data, pytest integration, and automatic table resolution. Perfect for data engineering, ETL pipeline testing, and analytics validation.
64
+ > Test SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, DuckDB, and ClickHouse with type-safe mock data, pytest integration, and automatic table resolution. Perfect for data engineering, ETL pipeline testing, and analytics validation.
66
65
 
67
66
  **Quick Links:** [Installation](#installation) | [Quick Start](#quick-start) | [Documentation](https://gurmeetsaran.github.io/sqltesting/) | [Examples](https://gurmeetsaran.github.io/sqltesting/examples.html) | [PyPI Package](https://pypi.org/project/sql-testing-library/)
68
67
 
@@ -73,6 +72,7 @@ Description-Content-Type: text/markdown
73
72
  [![Trino Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/trino-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/trino-integration.yml)
74
73
  [![Snowflake Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/snowflake-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/snowflake-integration.yml)
75
74
  [![DuckDB Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/duckdb-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/duckdb-integration.yml)
75
+ [![ClickHouse Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/clickhouse-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/clickhouse-integration.yml)
76
76
  [![GitHub license](https://img.shields.io/github/license/gurmeetsaran/sqltesting)](https://github.com/gurmeetsaran/sqltesting/blob/master/LICENSE)
77
77
  [![Pepy Total Downloads](https://img.shields.io/pepy/dt/sql-testing-library?label=PyPI%20Downloads)](https://pepy.tech/projects/sql-testing-library)
78
78
  [![codecov](https://codecov.io/gh/gurmeetsaran/sqltesting/branch/master/graph/badge.svg?token=CN3G5X5ZA5)](https://codecov.io/gh/gurmeetsaran/sqltesting)
@@ -112,7 +112,7 @@ For more details on our journey and the engineering challenges we solved, read t
112
112
 
113
113
  ## Features
114
114
 
115
- - **Multi-Database Support**: Test SQL across BigQuery, Athena, Redshift, Trino, Snowflake, and DuckDB
115
+ - **Multi-Database Support**: Test SQL across BigQuery, Athena, Redshift, Trino, Snowflake, DuckDB, and ClickHouse
116
116
  - **Mock Data Injection**: Use Python dataclasses for type-safe test data
117
117
  - **CTE or Physical Tables**: Automatic fallback for query size limits
118
118
  - **Type-Safe Results**: Deserialize results to Pydantic models
@@ -125,31 +125,31 @@ The library supports different data types across database engines. All checkmark
125
125
 
126
126
  ### Primitive Types
127
127
 
128
- | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB |
129
- |-----------|-------------|----------|--------|----------|-------|-----------|--------|
130
- | **String** | `str` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
131
- | **Integer** | `int` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
132
- | **Float** | `float` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
133
- | **Boolean** | `bool` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
134
- | **Date** | `date` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
135
- | **Datetime** | `datetime` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
136
- | **Decimal** | `Decimal` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
137
- | **Optional** | `Optional[T]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
128
+ | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB | ClickHouse |
129
+ |-----------|-------------|----------|--------|----------|-------|-----------|--------|------------|
130
+ | **String** | `str` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
131
+ | **Integer** | `int` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
132
+ | **Float** | `float` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
133
+ | **Boolean** | `bool` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
134
+ | **Date** | `date` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
135
+ | **Datetime** | `datetime` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
136
+ | **Decimal** | `Decimal` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
137
+ | **Optional** | `Optional[T]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
138
138
 
139
139
  ### Complex Types
140
140
 
141
- | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB |
142
- |-----------|-------------|----------|--------|----------|-------|-----------|--------|
143
- | **String Array** | `List[str]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
144
- | **Integer Array** | `List[int]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
145
- | **Decimal Array** | `List[Decimal]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
146
- | **Optional Array** | `Optional[List[T]]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
147
- | **Map/Dict** | `Dict[K, V]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
148
- | **Struct/Record** | `dataclass` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
149
- | **Nested Arrays** | `List[List[T]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
150
- | **Arrays of Structs** | `List[dataclass]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
151
- | **3D Arrays** | `List[List[List[T]]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
152
- | **Arrays of Arrays of Structs** | `List[List[dataclass]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
141
+ | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB | ClickHouse |
142
+ |-----------|-------------|----------|--------|----------|-------|-----------|--------|------------|
143
+ | **String Array** | `List[str]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
144
+ | **Integer Array** | `List[int]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
145
+ | **Decimal Array** | `List[Decimal]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
146
+ | **Optional Array** | `Optional[List[T]]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
147
+ | **Map/Dict** | `Dict[K, V]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
148
+ | **Struct/Record** | `dataclass` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
149
+ | **Nested Arrays** | `List[List[T]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
150
+ | **Arrays of Structs** | `List[dataclass]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
151
+ | **3D Arrays** | `List[List[List[T]]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
152
+ | **Arrays of Arrays of Structs** | `List[List[dataclass]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
153
153
 
154
154
  ### Database-Specific Notes
155
155
 
@@ -159,15 +159,16 @@ The library supports different data types across database engines. All checkmark
159
159
  - **Trino**: Memory catalog for testing; excellent decimal precision; supports arrays, maps, and struct types using `ROW` with named fields (dataclasses and Pydantic models); **full support for deeply nested types** including nested arrays, arrays of structs, and 3D arrays
160
160
  - **Snowflake**: Column names normalized to lowercase; 1MB query size limit; dict/map types implemented via VARIANT type (JSON parsing); **full support for deeply nested types** including struct types using OBJECT + PARSE_JSON, nested arrays (2D, 3D+), arrays of structs, and arrays of arrays of structs
161
161
  - **DuckDB**: Fast embedded analytics database; excellent SQL standards compliance; supports arrays, maps, and struct types using `STRUCT` syntax with named fields (dataclasses and Pydantic models); **full support for deeply nested types** including nested arrays (2D, 3D+), arrays of structs, and arrays of arrays of structs
162
+ - **ClickHouse**: Column-oriented analytics database; uses HTTP client (`clickhouse-connect`) against `Memory`-engine tables for physical mode; supports `Array(T)`, `Map(K, V)`, and named `Tuple(field T, ...)` for struct types (dataclasses and Pydantic models); scalar columns are declared `Nullable(...)` so NULLs round-trip cleanly; **full support for deeply nested types** including nested arrays, arrays of tuples, and arrays of arrays of tuples
162
163
 
163
164
  ## Execution Modes Support
164
165
 
165
166
  The library supports two execution modes for mock data injection. **CTE Mode is the default** and is automatically used unless Physical Tables mode is explicitly requested or required due to query size limits.
166
167
 
167
- | Execution Mode | Description | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB |
168
- |----------------|-------------|----------|--------|----------|-------|-----------|--------|
169
- | **CTE Mode** | Mock data injected as Common Table Expressions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
170
- | **Physical Tables** | Mock data created as temporary tables | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
168
+ | Execution Mode | Description | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB | ClickHouse |
169
+ |----------------|-------------|----------|--------|----------|-------|-----------|--------|------------|
170
+ | **CTE Mode** | Mock data injected as Common Table Expressions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
171
+ | **Physical Tables** | Mock data created as temporary tables | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
171
172
 
172
173
  ### Execution Mode Details
173
174
 
@@ -192,15 +193,17 @@ The library supports two execution modes for mock data injection. **CTE Mode is
192
193
  | **Trino** | Memory tables | `memory.default` schema | Library executes `DROP TABLE` | After each test |
193
194
  | **Snowflake** | Temporary tables | Session-specific temp schema | Database automatic | Session end |
194
195
  | **DuckDB** | Temporary tables | Database-specific temp schema | Library executes `DROP TABLE` | After each test |
196
+ | **ClickHouse** | `Memory`-engine tables | Configured database | Library executes `DROP TABLE` | After each test |
195
197
 
196
198
  #### **Cleanup Behavior Explained**
197
199
 
198
- **Library-Managed Cleanup (BigQuery, Athena, Trino, DuckDB):**
200
+ **Library-Managed Cleanup (BigQuery, Athena, Trino, DuckDB, ClickHouse):**
199
201
  - The SQL Testing Library explicitly calls cleanup methods after each test
200
202
  - **BigQuery**: Creates standard tables in your dataset, then deletes them via `client.delete_table()`
201
203
  - **Athena**: Creates external tables backed by S3 data, then drops table metadata via `DROP TABLE IF EXISTS` (⚠️ **S3 data files remain and require separate cleanup**)
202
204
  - **Trino**: Creates tables in memory catalog, then drops them via `DROP TABLE IF EXISTS`
203
205
  - **DuckDB**: Creates temporary tables in the database, then drops them via `DROP TABLE IF EXISTS`
206
+ - **ClickHouse**: Creates tables with the `Memory` engine, then drops them via `DROP TABLE IF EXISTS`
204
207
 
205
208
  **Database-Managed Cleanup (Redshift, Snowflake):**
206
209
  - These databases have built-in temporary table mechanisms
@@ -225,7 +228,7 @@ A: Trino's memory catalog doesn't automatically clean up tables when sessions en
225
228
  A: BigQuery tables created by the library are **standard tables without TTL** - they persist until explicitly deleted. The library immediately calls `client.delete_table()` after each test. If you want to set TTL as a safety net, you can configure it at the dataset level (e.g., 24 hours) to auto-delete any orphaned tables.
226
229
 
227
230
  **Q: Which databases leave artifacts if tests crash?**
228
- - **BigQuery, Athena, Trino, DuckDB**: May leave tables if library crashes before cleanup
231
+ - **BigQuery, Athena, Trino, DuckDB, ClickHouse**: May leave tables if library crashes before cleanup
229
232
  - **Redshift, Snowflake**: No artifacts - temporary tables auto-cleanup on session end
230
233
 
231
234
  **Q: How to manually clean up orphaned tables?**
@@ -296,6 +299,7 @@ aws s3api list-objects-v2 --bucket your-athena-results-bucket --prefix "temp_" \
296
299
  | **Trino** | 16MB (estimated) | Large dataset or complex CTEs |
297
300
  | **Snowflake** | 1MB | Automatically switches at 1MB |
298
301
  | **DuckDB** | 32MB (estimated) | Large dataset or complex CTEs |
302
+ | **ClickHouse** | No hard limit | Manually via `use_physical_tables=True` |
299
303
 
300
304
  ### How to Control Execution Mode
301
305
 
@@ -421,6 +425,9 @@ pip install sql-testing-library[snowflake]
421
425
  # Install with DuckDB support
422
426
  pip install sql-testing-library[duckdb]
423
427
 
428
+ # Install with ClickHouse support
429
+ pip install sql-testing-library[clickhouse]
430
+
424
431
  # Or install with all database adapters
425
432
  pip install sql-testing-library[all]
426
433
  ```
@@ -437,9 +444,10 @@ poetry install --with redshift
437
444
  poetry install --with trino
438
445
  poetry install --with snowflake
439
446
  poetry install --with duckdb
447
+ poetry install --with clickhouse
440
448
 
441
449
  # Install with all database adapters and dev tools
442
- poetry install --with bigquery,athena,redshift,trino,snowflake,duckdb,dev
450
+ poetry install --with bigquery,athena,redshift,trino,snowflake,duckdb,clickhouse,dev
443
451
  ```
444
452
 
445
453
  ## Quick Start
@@ -448,7 +456,7 @@ poetry install --with bigquery,athena,redshift,trino,snowflake,duckdb,dev
448
456
 
449
457
  ```ini
450
458
  [sql_testing]
451
- adapter = bigquery # Use 'bigquery', 'athena', 'redshift', 'trino', 'snowflake', or 'duckdb'
459
+ adapter = bigquery # Use 'bigquery', 'athena', 'redshift', 'trino', 'snowflake', 'duckdb', or 'clickhouse'
452
460
 
453
461
  # BigQuery configuration
454
462
  [sql_testing.bigquery]
@@ -510,6 +518,15 @@ credentials_path = <path to credentials json>
510
518
  # DuckDB configuration
511
519
  # [sql_testing.duckdb]
512
520
  # database = <path/to/database.duckdb> # Optional: defaults to in-memory database
521
+
522
+ # ClickHouse configuration
523
+ # [sql_testing.clickhouse]
524
+ # host = <clickhouse-host.example.com>
525
+ # port = 8123 # Optional: default HTTP port (use 9440 for HTTPS)
526
+ # username = default # Optional: default is 'default'
527
+ # password = <clickhouse_password> # Optional: default is empty
528
+ # database = default # Optional: default is 'default'
529
+ # secure = false # Optional: true for HTTPS
513
530
  ```
514
531
 
515
532
  ### Database Context Understanding
@@ -524,6 +541,7 @@ Each database adapter uses a different concept for organizing tables and queries
524
541
  | **Snowflake** | `{database}.{schema}` | database + schema | `"test_db.public"` | `SELECT * FROM test_db.public.products` |
525
542
  | **Trino** | `{catalog}.{schema}` | catalog + schema | `"memory.default"` | `SELECT * FROM memory.default.inventory` |
526
543
  | **DuckDB** | `{database}` | database only | `"test_db"` | `SELECT * FROM test_db.analytics` |
544
+ | **ClickHouse** | `{database}` | database only | `"default"` | `SELECT * FROM default.events` |
527
545
 
528
546
  #### Key Points:
529
547
 
@@ -1045,7 +1063,7 @@ def test_duckdb_query():
1045
1063
  )
1046
1064
  ```
1047
1065
 
1048
- The adapter_type parameter will use the configuration from the corresponding section in pytest.ini, such as `[sql_testing.bigquery]`, `[sql_testing.athena]`, `[sql_testing.redshift]`, `[sql_testing.trino]`, `[sql_testing.snowflake]`, or `[sql_testing.duckdb]`.
1066
+ The adapter_type parameter will use the configuration from the corresponding section in pytest.ini, such as `[sql_testing.bigquery]`, `[sql_testing.athena]`, `[sql_testing.redshift]`, `[sql_testing.trino]`, `[sql_testing.snowflake]`, `[sql_testing.duckdb]`, or `[sql_testing.clickhouse]`.
1049
1067
 
1050
1068
  **Default Adapter Behavior:**
1051
1069
  - If `adapter_type` is not specified in the test, the library uses the adapter from `[sql_testing]` section's `adapter` setting
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **A powerful Python framework for unit testing SQL queries with mock data injection**
4
4
  >
5
- > Test SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB with type-safe mock data, pytest integration, and automatic table resolution. Perfect for data engineering, ETL pipeline testing, and analytics validation.
5
+ > Test SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, DuckDB, and ClickHouse with type-safe mock data, pytest integration, and automatic table resolution. Perfect for data engineering, ETL pipeline testing, and analytics validation.
6
6
 
7
7
  **Quick Links:** [Installation](#installation) | [Quick Start](#quick-start) | [Documentation](https://gurmeetsaran.github.io/sqltesting/) | [Examples](https://gurmeetsaran.github.io/sqltesting/examples.html) | [PyPI Package](https://pypi.org/project/sql-testing-library/)
8
8
 
@@ -13,6 +13,7 @@
13
13
  [![Trino Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/trino-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/trino-integration.yml)
14
14
  [![Snowflake Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/snowflake-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/snowflake-integration.yml)
15
15
  [![DuckDB Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/duckdb-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/duckdb-integration.yml)
16
+ [![ClickHouse Integration](https://github.com/gurmeetsaran/sqltesting/actions/workflows/clickhouse-integration.yml/badge.svg)](https://github.com/gurmeetsaran/sqltesting/actions/workflows/clickhouse-integration.yml)
16
17
  [![GitHub license](https://img.shields.io/github/license/gurmeetsaran/sqltesting)](https://github.com/gurmeetsaran/sqltesting/blob/master/LICENSE)
17
18
  [![Pepy Total Downloads](https://img.shields.io/pepy/dt/sql-testing-library?label=PyPI%20Downloads)](https://pepy.tech/projects/sql-testing-library)
18
19
  [![codecov](https://codecov.io/gh/gurmeetsaran/sqltesting/branch/master/graph/badge.svg?token=CN3G5X5ZA5)](https://codecov.io/gh/gurmeetsaran/sqltesting)
@@ -52,7 +53,7 @@ For more details on our journey and the engineering challenges we solved, read t
52
53
 
53
54
  ## Features
54
55
 
55
- - **Multi-Database Support**: Test SQL across BigQuery, Athena, Redshift, Trino, Snowflake, and DuckDB
56
+ - **Multi-Database Support**: Test SQL across BigQuery, Athena, Redshift, Trino, Snowflake, DuckDB, and ClickHouse
56
57
  - **Mock Data Injection**: Use Python dataclasses for type-safe test data
57
58
  - **CTE or Physical Tables**: Automatic fallback for query size limits
58
59
  - **Type-Safe Results**: Deserialize results to Pydantic models
@@ -65,31 +66,31 @@ The library supports different data types across database engines. All checkmark
65
66
 
66
67
  ### Primitive Types
67
68
 
68
- | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB |
69
- |-----------|-------------|----------|--------|----------|-------|-----------|--------|
70
- | **String** | `str` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
71
- | **Integer** | `int` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
72
- | **Float** | `float` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
73
- | **Boolean** | `bool` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
74
- | **Date** | `date` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
75
- | **Datetime** | `datetime` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
76
- | **Decimal** | `Decimal` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
77
- | **Optional** | `Optional[T]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
69
+ | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB | ClickHouse |
70
+ |-----------|-------------|----------|--------|----------|-------|-----------|--------|------------|
71
+ | **String** | `str` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
72
+ | **Integer** | `int` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
73
+ | **Float** | `float` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
74
+ | **Boolean** | `bool` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
75
+ | **Date** | `date` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
76
+ | **Datetime** | `datetime` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
77
+ | **Decimal** | `Decimal` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
78
+ | **Optional** | `Optional[T]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
78
79
 
79
80
  ### Complex Types
80
81
 
81
- | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB |
82
- |-----------|-------------|----------|--------|----------|-------|-----------|--------|
83
- | **String Array** | `List[str]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
84
- | **Integer Array** | `List[int]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
85
- | **Decimal Array** | `List[Decimal]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
86
- | **Optional Array** | `Optional[List[T]]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
87
- | **Map/Dict** | `Dict[K, V]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
88
- | **Struct/Record** | `dataclass` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
89
- | **Nested Arrays** | `List[List[T]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
90
- | **Arrays of Structs** | `List[dataclass]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
91
- | **3D Arrays** | `List[List[List[T]]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
92
- | **Arrays of Arrays of Structs** | `List[List[dataclass]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
82
+ | Data Type | Python Type | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB | ClickHouse |
83
+ |-----------|-------------|----------|--------|----------|-------|-----------|--------|------------|
84
+ | **String Array** | `List[str]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
85
+ | **Integer Array** | `List[int]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
86
+ | **Decimal Array** | `List[Decimal]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
87
+ | **Optional Array** | `Optional[List[T]]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
88
+ | **Map/Dict** | `Dict[K, V]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
89
+ | **Struct/Record** | `dataclass` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
90
+ | **Nested Arrays** | `List[List[T]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
91
+ | **Arrays of Structs** | `List[dataclass]` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
92
+ | **3D Arrays** | `List[List[List[T]]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
93
+ | **Arrays of Arrays of Structs** | `List[List[dataclass]]` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
93
94
 
94
95
  ### Database-Specific Notes
95
96
 
@@ -99,15 +100,16 @@ The library supports different data types across database engines. All checkmark
99
100
  - **Trino**: Memory catalog for testing; excellent decimal precision; supports arrays, maps, and struct types using `ROW` with named fields (dataclasses and Pydantic models); **full support for deeply nested types** including nested arrays, arrays of structs, and 3D arrays
100
101
  - **Snowflake**: Column names normalized to lowercase; 1MB query size limit; dict/map types implemented via VARIANT type (JSON parsing); **full support for deeply nested types** including struct types using OBJECT + PARSE_JSON, nested arrays (2D, 3D+), arrays of structs, and arrays of arrays of structs
101
102
  - **DuckDB**: Fast embedded analytics database; excellent SQL standards compliance; supports arrays, maps, and struct types using `STRUCT` syntax with named fields (dataclasses and Pydantic models); **full support for deeply nested types** including nested arrays (2D, 3D+), arrays of structs, and arrays of arrays of structs
103
+ - **ClickHouse**: Column-oriented analytics database; uses HTTP client (`clickhouse-connect`) against `Memory`-engine tables for physical mode; supports `Array(T)`, `Map(K, V)`, and named `Tuple(field T, ...)` for struct types (dataclasses and Pydantic models); scalar columns are declared `Nullable(...)` so NULLs round-trip cleanly; **full support for deeply nested types** including nested arrays, arrays of tuples, and arrays of arrays of tuples
102
104
 
103
105
  ## Execution Modes Support
104
106
 
105
107
  The library supports two execution modes for mock data injection. **CTE Mode is the default** and is automatically used unless Physical Tables mode is explicitly requested or required due to query size limits.
106
108
 
107
- | Execution Mode | Description | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB |
108
- |----------------|-------------|----------|--------|----------|-------|-----------|--------|
109
- | **CTE Mode** | Mock data injected as Common Table Expressions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
110
- | **Physical Tables** | Mock data created as temporary tables | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
109
+ | Execution Mode | Description | BigQuery | Athena | Redshift | Trino | Snowflake | DuckDB | ClickHouse |
110
+ |----------------|-------------|----------|--------|----------|-------|-----------|--------|------------|
111
+ | **CTE Mode** | Mock data injected as Common Table Expressions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
112
+ | **Physical Tables** | Mock data created as temporary tables | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
111
113
 
112
114
  ### Execution Mode Details
113
115
 
@@ -132,15 +134,17 @@ The library supports two execution modes for mock data injection. **CTE Mode is
132
134
  | **Trino** | Memory tables | `memory.default` schema | Library executes `DROP TABLE` | After each test |
133
135
  | **Snowflake** | Temporary tables | Session-specific temp schema | Database automatic | Session end |
134
136
  | **DuckDB** | Temporary tables | Database-specific temp schema | Library executes `DROP TABLE` | After each test |
137
+ | **ClickHouse** | `Memory`-engine tables | Configured database | Library executes `DROP TABLE` | After each test |
135
138
 
136
139
  #### **Cleanup Behavior Explained**
137
140
 
138
- **Library-Managed Cleanup (BigQuery, Athena, Trino, DuckDB):**
141
+ **Library-Managed Cleanup (BigQuery, Athena, Trino, DuckDB, ClickHouse):**
139
142
  - The SQL Testing Library explicitly calls cleanup methods after each test
140
143
  - **BigQuery**: Creates standard tables in your dataset, then deletes them via `client.delete_table()`
141
144
  - **Athena**: Creates external tables backed by S3 data, then drops table metadata via `DROP TABLE IF EXISTS` (⚠️ **S3 data files remain and require separate cleanup**)
142
145
  - **Trino**: Creates tables in memory catalog, then drops them via `DROP TABLE IF EXISTS`
143
146
  - **DuckDB**: Creates temporary tables in the database, then drops them via `DROP TABLE IF EXISTS`
147
+ - **ClickHouse**: Creates tables with the `Memory` engine, then drops them via `DROP TABLE IF EXISTS`
144
148
 
145
149
  **Database-Managed Cleanup (Redshift, Snowflake):**
146
150
  - These databases have built-in temporary table mechanisms
@@ -165,7 +169,7 @@ A: Trino's memory catalog doesn't automatically clean up tables when sessions en
165
169
  A: BigQuery tables created by the library are **standard tables without TTL** - they persist until explicitly deleted. The library immediately calls `client.delete_table()` after each test. If you want to set TTL as a safety net, you can configure it at the dataset level (e.g., 24 hours) to auto-delete any orphaned tables.
166
170
 
167
171
  **Q: Which databases leave artifacts if tests crash?**
168
- - **BigQuery, Athena, Trino, DuckDB**: May leave tables if library crashes before cleanup
172
+ - **BigQuery, Athena, Trino, DuckDB, ClickHouse**: May leave tables if library crashes before cleanup
169
173
  - **Redshift, Snowflake**: No artifacts - temporary tables auto-cleanup on session end
170
174
 
171
175
  **Q: How to manually clean up orphaned tables?**
@@ -236,6 +240,7 @@ aws s3api list-objects-v2 --bucket your-athena-results-bucket --prefix "temp_" \
236
240
  | **Trino** | 16MB (estimated) | Large dataset or complex CTEs |
237
241
  | **Snowflake** | 1MB | Automatically switches at 1MB |
238
242
  | **DuckDB** | 32MB (estimated) | Large dataset or complex CTEs |
243
+ | **ClickHouse** | No hard limit | Manually via `use_physical_tables=True` |
239
244
 
240
245
  ### How to Control Execution Mode
241
246
 
@@ -361,6 +366,9 @@ pip install sql-testing-library[snowflake]
361
366
  # Install with DuckDB support
362
367
  pip install sql-testing-library[duckdb]
363
368
 
369
+ # Install with ClickHouse support
370
+ pip install sql-testing-library[clickhouse]
371
+
364
372
  # Or install with all database adapters
365
373
  pip install sql-testing-library[all]
366
374
  ```
@@ -377,9 +385,10 @@ poetry install --with redshift
377
385
  poetry install --with trino
378
386
  poetry install --with snowflake
379
387
  poetry install --with duckdb
388
+ poetry install --with clickhouse
380
389
 
381
390
  # Install with all database adapters and dev tools
382
- poetry install --with bigquery,athena,redshift,trino,snowflake,duckdb,dev
391
+ poetry install --with bigquery,athena,redshift,trino,snowflake,duckdb,clickhouse,dev
383
392
  ```
384
393
 
385
394
  ## Quick Start
@@ -388,7 +397,7 @@ poetry install --with bigquery,athena,redshift,trino,snowflake,duckdb,dev
388
397
 
389
398
  ```ini
390
399
  [sql_testing]
391
- adapter = bigquery # Use 'bigquery', 'athena', 'redshift', 'trino', 'snowflake', or 'duckdb'
400
+ adapter = bigquery # Use 'bigquery', 'athena', 'redshift', 'trino', 'snowflake', 'duckdb', or 'clickhouse'
392
401
 
393
402
  # BigQuery configuration
394
403
  [sql_testing.bigquery]
@@ -450,6 +459,15 @@ credentials_path = <path to credentials json>
450
459
  # DuckDB configuration
451
460
  # [sql_testing.duckdb]
452
461
  # database = <path/to/database.duckdb> # Optional: defaults to in-memory database
462
+
463
+ # ClickHouse configuration
464
+ # [sql_testing.clickhouse]
465
+ # host = <clickhouse-host.example.com>
466
+ # port = 8123 # Optional: default HTTP port (use 9440 for HTTPS)
467
+ # username = default # Optional: default is 'default'
468
+ # password = <clickhouse_password> # Optional: default is empty
469
+ # database = default # Optional: default is 'default'
470
+ # secure = false # Optional: true for HTTPS
453
471
  ```
454
472
 
455
473
  ### Database Context Understanding
@@ -464,6 +482,7 @@ Each database adapter uses a different concept for organizing tables and queries
464
482
  | **Snowflake** | `{database}.{schema}` | database + schema | `"test_db.public"` | `SELECT * FROM test_db.public.products` |
465
483
  | **Trino** | `{catalog}.{schema}` | catalog + schema | `"memory.default"` | `SELECT * FROM memory.default.inventory` |
466
484
  | **DuckDB** | `{database}` | database only | `"test_db"` | `SELECT * FROM test_db.analytics` |
485
+ | **ClickHouse** | `{database}` | database only | `"default"` | `SELECT * FROM default.events` |
467
486
 
468
487
  #### Key Points:
469
488
 
@@ -985,7 +1004,7 @@ def test_duckdb_query():
985
1004
  )
986
1005
  ```
987
1006
 
988
- The adapter_type parameter will use the configuration from the corresponding section in pytest.ini, such as `[sql_testing.bigquery]`, `[sql_testing.athena]`, `[sql_testing.redshift]`, `[sql_testing.trino]`, `[sql_testing.snowflake]`, or `[sql_testing.duckdb]`.
1007
+ The adapter_type parameter will use the configuration from the corresponding section in pytest.ini, such as `[sql_testing.bigquery]`, `[sql_testing.athena]`, `[sql_testing.redshift]`, `[sql_testing.trino]`, `[sql_testing.snowflake]`, `[sql_testing.duckdb]`, or `[sql_testing.clickhouse]`.
989
1008
 
990
1009
  **Default Adapter Behavior:**
991
1010
  - If `adapter_type` is not specified in the test, the library uses the adapter from `[sql_testing]` section's `adapter` setting
@@ -4,8 +4,8 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "sql-testing-library"
7
- version = "0.22.1"
8
- description = "SQL Testing Framework for Python: Unit test SQL queries with mock data injection for BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB. Simplify data engineering ETL testing and analytics validation."
7
+ version = "0.23.0"
8
+ description = "SQL Testing Framework for Python: Unit test SQL queries with mock data injection for BigQuery, Snowflake, Redshift, Athena, Trino, DuckDB, and ClickHouse. Simplify data engineering ETL testing and analytics validation."
9
9
  authors = ["Gurmeet Saran <gurmeetx@gmail.com>", "Kushal Thakkar <kushal.thakkar@gmail.com>"]
10
10
  maintainers = ["Gurmeet Saran <gurmeetx@gmail.com>", "Kushal Thakkar <kushal.thakkar@gmail.com>"]
11
11
  license = "MIT"
@@ -41,6 +41,8 @@ keywords = [
41
41
  "google-bigquery",
42
42
  "amazon-redshift",
43
43
  "snowflake-testing",
44
+ "clickhouse",
45
+ "clickhouse-testing",
44
46
  "ci-cd-testing",
45
47
  "test-automation"
46
48
  ]
@@ -57,7 +59,6 @@ classifiers = [
57
59
  "Topic :: Scientific/Engineering :: Information Analysis",
58
60
  "License :: OSI Approved :: MIT License",
59
61
  "Programming Language :: Python :: 3",
60
- "Programming Language :: Python :: 3.9",
61
62
  "Programming Language :: Python :: 3.10",
62
63
  "Programming Language :: Python :: 3.11",
63
64
  "Programming Language :: Python :: 3.12",
@@ -83,19 +84,18 @@ include = ["LICENSE", "README.md", "CHANGELOG.md", "py.typed", "src/sql_testing_
83
84
  "Contributing" = "https://github.com/gurmeetsaran/sqltesting/blob/master/CONTRIBUTING.md"
84
85
 
85
86
  [tool.poetry.dependencies]
86
- python = ">=3.9"
87
+ python = ">=3.10"
87
88
  sqlglot = ">=26.0.0"
88
89
  pydantic = ">=2.0.0"
89
90
  pandas = ">=1.0.0"
90
- typing-extensions = {version = ">=4.5.0", python = "<3.10"}
91
- docutils = ">=0.21.2,<0.23.0"
91
+ docutils = ">=0.21.2,<0.24.0"
92
92
  db-dtypes = "^1.4.3"
93
93
 
94
94
  [tool.poetry.group.bigquery.dependencies]
95
95
  google-cloud-bigquery = ">=3.0.0"
96
96
 
97
97
  [tool.poetry.group.athena.dependencies]
98
- boto3 = ">=1.26.0"
98
+ boto3 = ">=1.35.0"
99
99
 
100
100
  [tool.poetry.group.redshift.dependencies]
101
101
  psycopg2-binary = ">=2.9.0"
@@ -104,28 +104,32 @@ psycopg2-binary = ">=2.9.0"
104
104
  trino = ">=0.322.0"
105
105
 
106
106
  [tool.poetry.group.snowflake.dependencies]
107
- snowflake-connector-python = ">=3.13.1"
107
+ snowflake-connector-python = ">=4.6.0"
108
108
 
109
109
  [tool.poetry.group.duckdb.dependencies]
110
110
  duckdb = ">=0.8.0"
111
111
 
112
+ [tool.poetry.group.clickhouse.dependencies]
113
+ clickhouse-connect = { version = ">=0.7.0", python = "<3.15" }
114
+
112
115
  [tool.poetry.extras]
113
- all = ["google-cloud-bigquery", "boto3", "psycopg2-binary", "trino", "snowflake-connector-python", "duckdb"]
116
+ all = ["google-cloud-bigquery", "boto3", "psycopg2-binary", "trino", "snowflake-connector-python", "duckdb", "clickhouse-connect"]
114
117
  bigquery = ["google-cloud-bigquery"]
115
118
  athena = ["boto3"]
116
119
  redshift = ["psycopg2-binary"]
117
120
  trino = ["trino"]
118
121
  snowflake = ["snowflake-connector-python"]
119
122
  duckdb = ["duckdb"]
123
+ clickhouse = ["clickhouse-connect"]
120
124
 
121
125
  [tool.poetry.group.dev.dependencies]
122
- pytest = ">=7.0.0"
126
+ pytest = ">=9.0.3"
123
127
  pytest-asyncio = ">=0.21.0"
124
128
  pytest-mock = ">=3.10.0"
125
129
  pytest-cov = ">=4.1.0"
126
130
  pytest-xdist = ">=3.0.0"
127
131
  pytest-rerunfailures = ">=12.0.0"
128
- black = ">=22.0.0"
132
+ black = ">=26.3.1"
129
133
  flake8 = ">=4.0.0"
130
134
  pyright = ">=1.1.350"
131
135
  tox = ">=4.0.0"
@@ -141,7 +145,7 @@ mocksmith = ">=6.0.1"
141
145
  sql_testing = "sql_testing_library._pytest_plugin"
142
146
 
143
147
  [tool.pyright]
144
- pythonVersion = "3.9"
148
+ pythonVersion = "3.10"
145
149
  include = ["src"]
146
150
  exclude = ["tests", "scripts"]
147
151
  reportMissingImports = true
@@ -27,7 +27,7 @@ try:
27
27
  except ImportError:
28
28
  __all__ = []
29
29
 
30
- __version__ = "0.22.1"
30
+ __version__ = "0.23.0"
31
31
  __all__.extend(
32
32
  [
33
33
  "SQLTestFramework",