diff --git a/source-oracle-flashback/acmeCo/FLOW_TEST_TEST_ALL_TYPES.schema.yaml b/source-oracle-flashback/acmeCo/FLOW_TEST_TEST_ALL_TYPES.schema.yaml index 68b60cc9b..b430bee23 100644 --- a/source-oracle-flashback/acmeCo/FLOW_TEST_TEST_ALL_TYPES.schema.yaml +++ b/source-oracle-flashback/acmeCo/FLOW_TEST_TEST_ALL_TYPES.schema.yaml @@ -109,6 +109,12 @@ properties: default: ~ format: number title: Num + NUM104: + anyOf: + - type: number + - type: "null" + default: ~ + title: Num104 NUM15: anyOf: - type: integer diff --git a/source-oracle-flashback/source_oracle_flashback/models.py b/source-oracle-flashback/source_oracle_flashback/models.py index 751cbb129..23f098475 100644 --- a/source-oracle-flashback/source_oracle_flashback/models.py +++ b/source-oracle-flashback/source_oracle_flashback/models.py @@ -291,7 +291,7 @@ def build_table( field_type: type[int | str | datetime | float | Decimal] field_schema_extra: dict | None = None - if col.data_type == col.Type.NUMBER and col.data_scale == 0 : + if col.data_type == col.Type.NUMBER and col.data_scale == 0: # data_precision: 0 defaults to precision 38 if col.data_precision > 18 or col.data_precision == 0: field_type = Decimal diff --git a/source-oracle-flashback/tests/db_seeds/create_test_all_types.sql b/source-oracle-flashback/tests/db_seeds/create_test_all_types.sql index 8269ca005..961059578 100644 --- a/source-oracle-flashback/tests/db_seeds/create_test_all_types.sql +++ b/source-oracle-flashback/tests/db_seeds/create_test_all_types.sql @@ -7,6 +7,7 @@ CREATE TABLE flow_test.test_all_types( num NUMBER (38, 9), num19 NUMBER (19, 0), num15 NUMBER (15, 0), + num104 NUMBER (10, 4), small_int SMALLINT, integ INTEGER, double_precision DOUBLE PRECISION, diff --git a/source-oracle-flashback/tests/db_seeds/insert_test_all_types.sql b/source-oracle-flashback/tests/db_seeds/insert_test_all_types.sql index ee91f4b22..b0ace0775 100644 --- a/source-oracle-flashback/tests/db_seeds/insert_test_all_types.sql +++ b/source-oracle-flashback/tests/db_seeds/insert_test_all_types.sql @@ -7,6 +7,7 @@ INSERT INTO flow_test.test_all_types( num, num19, num15, + num104, small_int, integ, double_precision, @@ -33,6 +34,7 @@ INSERT INTO flow_test.test_all_types( 123456789.123456789, 1234567891234567891, 123456789123456, + 123456.3456, 123456789, 18446744073709551615, 123456789.123456789, diff --git a/source-oracle-flashback/tests/snapshots/snapshots__capture_all_types__stdout.json b/source-oracle-flashback/tests/snapshots/snapshots__capture_all_types__stdout.json index 0bbc10880..98260eb66 100644 --- a/source-oracle-flashback/tests/snapshots/snapshots__capture_all_types__stdout.json +++ b/source-oracle-flashback/tests/snapshots/snapshots__capture_all_types__stdout.json @@ -12,6 +12,7 @@ "INTERVAL_DAY": "+01 02:03:04.567000", "INTERVAL_YEAR": "+1234-05", "NUM": "123456789.123456789", + "NUM104": 123456.3456, "NUM15": 123456789123456, "NUM19": "1234567891234567891", "NVCHAR2": "nvarchar2 value with unicode characters \u2764\ufe0f \ud83d\udd25\ufe0f", diff --git a/source-oracle-flashback/tests/snapshots/snapshots__discover__stdout.json b/source-oracle-flashback/tests/snapshots/snapshots__discover__stdout.json index 17777f10a..33667bbf3 100644 --- a/source-oracle-flashback/tests/snapshots/snapshots__discover__stdout.json +++ b/source-oracle-flashback/tests/snapshots/snapshots__discover__stdout.json @@ -194,6 +194,18 @@ "format": "number", "title": "Num" }, + "NUM104": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Num104" + }, "NUM15": { "anyOf": [ {