diff --git a/sdk/python/feast/infra/offline_stores/snowflake_source.py b/sdk/python/feast/infra/offline_stores/snowflake_source.py index 40e50b3cab9..cc5208a6761 100644 --- a/sdk/python/feast/infra/offline_stores/snowflake_source.py +++ b/sdk/python/feast/infra/offline_stores/snowflake_source.py @@ -263,6 +263,16 @@ def get_table_column_names_and_types( result.dtypes[column].name ] else: + if len(result) > 0: + max_value = result.iloc[0][0] + if max_value is not None and len(str(max_value)) <= 9: + row["snowflake_type"] = "NUMBER32" + continue + elif ( + max_value is not None and len(str(max_value)) <= 18 + ): + row["snowflake_type"] = "NUMBER64" + continue raise NotImplementedError( "NaNs or Numbers larger than INT64 are not supported" )