Skip to content

Instantly share code, notes, and snippets.

@rushiagr
Created May 13, 2024 14:19
Show Gist options
  • Save rushiagr/78b01515286ee86696e3209970b73a3c to your computer and use it in GitHub Desktop.
Save rushiagr/78b01515286ee86696e3209970b73a3c 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
"""
"""
If for some reason, parquet generation and upload fails, just run this and it'll do things just fine, even if the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment