Skip to content

Commit

Permalink
fix: Convert integer columns in DeltaLakeCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-ca committed Sep 9, 2024
1 parent cf0004a commit c4d7b23
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions cryptofeed/backends/deltalake.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def _convert_datetime_columns(self, df: pd.DataFrame):
LOG.debug(f"Sample 'dt' value: {df['dt'].iloc[0]}")

LOG.debug("Datetime columns converted and 'dt' column created.")

def _convert_int_columns(self, df: pd.DataFrame):
LOG.debug("Converting integer columns.")
int_columns = ["id", "trade_id", "trades"]
Expand Down
6 changes: 3 additions & 3 deletions examples/demo_deltalake.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def main():
f = FeedHandler()

# Define the Delta Lake base path (can be local or S3)
delta_base_path = 's3://your-bucket/path/to/delta/tables'

Expand Down Expand Up @@ -53,9 +53,9 @@ def main():
)
}
))

f.run()


if __name__ == '__main__':
main()
main()
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'''
"""
Copyright (C) 2017-2024 Bryant Moscon - [email protected]
Please see the LICENSE file for the terms and conditions
associated with this software.
'''
"""
import os
import sys

Expand Down

0 comments on commit c4d7b23

Please sign in to comment.