Commit 66ad06a
feat: add MinIO S3 CSV seeder for Spark integration tests (#950)
* feat: add MinIO S3 CSV seeder for Spark integration tests
- Add MinIO service to docker-compose-spark.yml with bucket setup
- Add hadoop-aws and aws-java-sdk-bundle jars to Spark Dockerfile
- Configure S3A filesystem in spark-defaults.conf for MinIO endpoint
- Implement SparkS3CsvSeeder that uploads CSVs to MinIO and creates
external Spark tables via CREATE TABLE ... USING CSV
- Uses PyHive directly (not AdapterQueryRunner) to avoid corrupting
dbt global state
- NULL values written as empty CSV cells, Spark reads them as SQL NULL
- Bypasses dbt seed entirely, avoiding the _fix_binding NULL bug in
dbt-spark's session adapter
- Add boto3 to requirements.txt for S3 uploads
- Add MinIO health check to CI workflow
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* address CodeRabbit review: connection reuse, error handling, compose deps
- Reuse single PyHive connection per seed operation (context manager)
- Add empty data guard with clear ValueError
- Harden _read_profile_schema with explicit error context
- Validate MinIO setup exit code in CI workflow
- Use completion-based depends_on for minio-setup in docker-compose
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* add missing docstrings to improve coverage (70% -> 80%)
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* address CodeRabbit nitpicks: set -e, env-configurable credentials, shared type inference
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* address CodeRabbit: empty-seed guard in DbtDataSeeder, immutable class maps
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* fix: clean up local CSV after seed to prevent dbt compilation errors
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* fix: move try/finally to cover upload + table creation for CSV cleanup
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* fix: use QUOTE_ALL in CSV writer to prevent Spark skipping blank lines for NULL rows
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* refactor: rename BaseDirectSeeder to BaseSqlInsertSeeder for clarity
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Itamar Hartstein <haritamar@gmail.com>1 parent f1b70aa commit 66ad06a
7 files changed
Lines changed: 331 additions & 48 deletions
File tree
- .github/workflows
- integration_tests
- docker/spark
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
39 | 75 | | |
40 | 76 | | |
41 | 77 | | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
0 commit comments