feast icon indicating copy to clipboard operation
feast copied to clipboard

Missing key error in snowflake_python_type_to_feast_value_type in type_map for numpy datetime64 with timezone

Open tlam-lyra opened this issue 3 years ago • 1 comments

Expected Behavior

Feast should be able to handle different source column data types when updating feature views with inferred features. Specifically all possible datetime64 python data types with specific timezones should be handled.

Current Behavior

Snowflake python type datetime64[ns, america/los_angeles] does not have a corresponding feast ValueType. There's a ValueType for datetime64[ns] but not a numpy datetime64 with a specific timezone

File "/opt/homebrew/anaconda3/envs/feast-python37/lib/python3.7/site-packages/feast/type_map.py", line 536, in snowflake_python_type_to_feast_value_type
    return type_map[snowflake_python_type_as_str.lower()]
KeyError: 'datetime64[ns, america/los_angeles]'

Steps to reproduce

Specifications

  • Version: 0.21.3
  • Platform: Mac OSX Monterey 12.4
  • Subsystem:

Possible Solution

tlam-lyra avatar Jun 14 '22 17:06 tlam-lyra

Hi @tlam-lyra could you add a pr for a fix to support these types?

kevjumba avatar Jun 15 '22 17:06 kevjumba

@tlam-lyra @kevjumba taking a look.

@tlam-lyra can you tell me what the snowflake datatype is? TIMESTAMP_TZ?

sfc-gh-madkins avatar Aug 15 '22 02:08 sfc-gh-madkins

See https://github.com/feast-dev/feast/pull/3083

sfc-gh-madkins avatar Aug 15 '22 02:08 sfc-gh-madkins