Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Batch Import, feature with datetime format issue #203

Closed
budi opened this issue May 27, 2019 · 1 comment · Fixed by #217
Closed

Batch Import, feature with datetime format issue #203

budi opened this issue May 27, 2019 · 1 comment · Fixed by #217

Comments

@budi
Copy link
Contributor

budi commented May 27, 2019

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

@romanwozniak
Copy link
Collaborator

The proper fix would be to convert the timestamp column of the df during a staging into CSV into the format, compatible with the importer job datetime format.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants