Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions tap_google_sheets/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,15 @@ def get_sheet_schema_columns(sheet):
elif column_number_format_type == 'TEXT':
col_properties = {'type': ['null', 'string']}
column_gs_type = 'stringValue'
elif column_number_format_type == 'NUMBER':
col_properties = {'type': ['null', 'number']}
column_gs_type = 'numberType'
else:
# Interesting - order in the anyOf makes a difference.
# Number w/ multipleOf must be listed last, otherwise errors occur.
col_properties = {
'anyOf': [
{
'type': 'null'
},
{
'type': 'number',
'multipleOf': 1e-15
},
{
'type': 'string'
}
]
col_properties = {
'type': ['null', 'number', 'string'],
'multipleOf': 1e-15
}
column_gs_type = 'numberType'
# Catch-all to deal with other types and set to string
Expand Down