Skip to content

Commit e2e8c92

Browse files
SAC-29354: Update _sdc_extra column schema to be nullable (#83)
* Update _sdc_extra column schema to be nullable Co-authored-by: Dylan Sprayberry <dylan.sprayberry@qlik.com> * Fix test Co-authored-by: Dylan Sprayberry <dylan.sprayberry@qlik.com> * Fix integration tests Co-authored-by: Dylan Sprayberry <dylan.sprayberry@qlik.com> --------- Co-authored-by: Dylan Sprayberry <dylan.sprayberry@qlik.com>
1 parent 21676f1 commit e2e8c92

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 2.2.1
4+
* Fixes schema for _sdc_extra column [#83](https://github.com/singer-io/tap-s3-csv/pull/83)
5+
36
## 2.2.0
47
* Refactors JSONL support to use singer-encodings library [#82](https://github.com/singer-io/tap-s3-csv/pull/82)
58

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup
44

55
setup(name='tap-s3-csv',
6-
version='2.2.0',
6+
version='2.2.1',
77
description='Singer.io tap for extracting CSV files from S3',
88
author='Stitch',
99
url='https://singer.io',

tap_s3_csv/s3.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,10 @@ def get_sampled_schema_for_table(config, table_spec):
296296
SDC_SOURCE_BUCKET_COLUMN: {'type': 'string'},
297297
SDC_SOURCE_FILE_COLUMN: {'type': 'string'},
298298
SDC_SOURCE_LINENO_COLUMN: {'type': 'integer'},
299-
SDC_EXTRA_COLUMN: {'type': 'array', 'items': {
300-
'anyOf': [{'type': 'object', 'properties': {}}, {'type': 'string'}]}}
299+
SDC_EXTRA_COLUMN: {
300+
'type': ['null', 'array'],
301+
'items': {'type': 'object', 'properties': {}}
302+
}
301303
}
302304

303305
data_schema = schema.generate_schema(samples)

tests/test_avro.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ def test_run(self):
5151
'_sdc_source_file': {'type': 'string', 'inclusion': 'available'},
5252
'_sdc_source_lineno': {'type': 'integer', 'inclusion': 'available'},
5353
'_sdc_extra': {
54-
'type': 'array',
55-
'items': {
56-
'anyOf': [{'type': 'object', 'properties': {}}, {'type': 'string'}]
57-
},
54+
'type': ['null', 'array'],
55+
'items': {'type': 'object', 'properties': {}},
5856
'inclusion': 'available'}
5957
}
6058
}

tests/test_parquet.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ def test_run(self):
5050
'_sdc_source_file': {'type': 'string', 'inclusion': 'available'},
5151
'_sdc_source_lineno': {'type': 'integer', 'inclusion': 'available'},
5252
'_sdc_extra': {
53-
'type': 'array',
54-
'items': {
55-
'anyOf': [{'type': 'object', 'properties': {}}, {'type': 'string'}]
56-
},
53+
'type': ['null', 'array'],
54+
'items': {'type': 'object', 'properties': {}},
5755
'inclusion': 'available'}
5856
}
5957
}

tests/unittests/test_sampled_schema.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ def test_schema_for_valid_samples(self, mock_valid_sample_files, mocked_get_inpu
4646
'_sdc_source_file': {'type': 'string'},
4747
'_sdc_source_lineno': {'type': 'integer'},
4848
'_sdc_extra': {
49-
'type': 'array',
50-
'items': {
51-
'anyOf': [{'type': 'object', 'properties': {}},
52-
{'type': 'string'}]
53-
}
49+
'type': ['null', 'array'],
50+
'items': {'type': 'object', 'properties': {}}
5451
}
5552
}
5653
}

0 commit comments

Comments
 (0)