diff --git a/tap_postgres/db.py b/tap_postgres/db.py index f21dd1f0..2693a422 100644 --- a/tap_postgres/db.py +++ b/tap_postgres/db.py @@ -159,6 +159,8 @@ def selected_value_to_singer_value_impl(elem, sql_datatype): cleaned_elem = elem else: raise Exception(f"do not know how to marshall a dict if its not an hstore or json: {sql_datatype}") + elif 'range' in sql_datatype: + cleaned_elem = str(elem) else: raise Exception( f"do not know how to marshall value of class( {elem.__class__} ) and sql_datatype ( {sql_datatype} )") diff --git a/tap_postgres/discovery_utils.py b/tap_postgres/discovery_utils.py index cd9a00c4..f6a214bf 100644 --- a/tap_postgres/discovery_utils.py +++ b/tap_postgres/discovery_utils.py @@ -280,6 +280,10 @@ def schema_for_column_datatype(col): schema['type'] = nullable_column('string', col.is_primary_key) return schema + if 'range' in data_type: + schema['type'] = nullable_column('string', col.is_primary_key) + return schema + return schema