Skip to content

Batch Import, feature with datetime format issue #203

@budi

Description

@budi

Expected Behavior

  • The format used in python different with the one used in import job

Current Behavior

  • The sdk is using csv format as staging file before ingesting to feast
  • It's using different zone offset format for the timestamp column than the one used in the import job

Steps to reproduce

Using the quickstart:

df = pd.read_csv('./train_head.csv', index_col=False)
df['pickup_datetime'] = pd.to_datetime(df['pickup_datetime'])  # 'pickup_datetime' is a proper datetime column
...

importer = Importer.from_df(df, 
                           entity='test_entity', 
                           owner='user@go-jek.com',  
                           staging_location=STAGING_LOCATION,
                           id_column='entity_id',
                           timestamp_column='pickup_datetime')
fs.run(importer, apply_features=True, apply_entity=True)

Specifications

Possible Solution

The current workaround is:

df['pickup_datetime'] = pd.to_datetime(df['pickup_datetime']).apply(lambda d: d.replace(tzinfo=None))

@romanwozniak

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions