You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
existing_schema: dict= (
# Use transformed schema if availabletransformed_schema["properties"].get(prop_key, {})
# ...or original schema for passthroughorself.raw_schema["properties"].get(prop_def, {})
)
If the stream map is defined using _['columnName'] or record['columnName'], the type mapping falls back to string because it doesn't look at the underlying column name, but rather treats the entire expression as the column that it's searching for. prop_def should check for that specification and pass through the appropriate column name.
Also, another thing to note is that when renaming a column and assigning the original to __NULL__, the null currently must be defined second in order to pick up the data type here. Otherwise, it gets popped from the schema before the type can be grabbed. One potential solution is to order the stream maps, but not sure if this might have some other downstream effect.
Here is also the transformation I applied to prop_def to get the actual column name. Again, this has not been extensively tested yet.
# Extract the property name from prop_def if it matches the pattern _['ColumnName'] or record['ColumnName']defextract_property_name(prop_def):
match=re.match(r"[_record]+\['(.+?)'\]", prop_def)
returnmatch.group(1) ifmatchelseprop_def
Another similar issue in CustomStreamMap:
If the stream map is defined using
_['columnName']
orrecord['columnName']
, the type mapping falls back to string because it doesn't look at the underlying column name, but rather treats the entire expression as the column that it's searching for.prop_def
should check for that specification and pass through the appropriate column name.Originally posted by @dluo-sig in #1695 (comment)
The text was updated successfully, but these errors were encountered: