Skip to content

Instantly share code, notes, and snippets.

@rushiagr
Created May 13, 2024 14:19
Show Gist options
  • Save rushiagr/437fef5046a4436673813e4cd6e8c992 to your computer and use it in GitHub Desktop.
Save rushiagr/437fef5046a4436673813e4cd6e8c992 to your computer and use it in GitHub Desktop.
# ========== Finnifty example =========
# python squash.py --generate-parquet-files --index FINNIFTY
"""
===============================================================================================
# NOTE: when parquet generation script is stopped accidentally (some parquet files already generated, but not all),
# and need to restart (worked on 13 May 2024):
1. Delete all today's files in /tmp/quotefiles/[parquet|extracted]
2. Delete all today's files in s3 bucket mys3bucket/kitedata/pq10secquotes[|bn|fn|mn|sn]
3. Uncompress allquotes and allinstruments files back to /drive/kitedata:
cd /drive/kitedata/compressed/quotes
gunzip -c allquotes-2024-05-13 > /drive/kitedata/allquotes-2024-05-13
cd /drive/kitedata/compressed/instruments
gunzip -c allinstruments-2024-05-13 > /drive/kitedata/allinstruments-2024-05-13
4. Run generate_all_parquet_files via automation (change time to be immediately after current time)
# NOTE: below methods didn't work for some reason, in this particular case
==============================================================================================
Command used to locally test midcpnifty and sensex parquet generation:
python squash.py --generate-parquet-files --dates-to-process 2023-08-03,2023-08-04 --index MIDCPNIFTY --skip-upload
python squash.py --generate-parquet-files --dates-to-process 2023-08-03,2023-08-04 --index SENSEX --skip-upload
"""
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment