data_clickhouse / sources.yaml
Subham9126's picture
Upload 10 files
0c90277 verified
Raw
History Blame Contribute Delete
3.34 kB
# β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
# β”‚ Market-Data Observatory β€” Data Source Registry β”‚
# β”‚ β”‚
# β”‚ To add a new data source, simply append a new entry to the list. β”‚
# β”‚ The init script reads this file at boot and handles everything: β”‚
# β”‚ β€’ git clone / pull β”‚
# β”‚ β€’ ClickHouse VIEW creation (CREATE OR REPLACE) β”‚
# β”‚ β€’ background auto-refresh β”‚
# β”‚ β”‚
# β”‚ On-demand refresh: curl https://<space>/api/refresh β”‚
# β”‚ No code changes needed β€” just edit this YAML file. β”‚
# β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
# Global settings
refresh_interval_seconds: 300 # background git-pull interval (safety net)
# Data sources β€” each entry = git clone + ClickHouse view(s)
sources:
- name: hf_ohlc_data
description: "HuggingFace OHLCV Dataset: altool/ohlcdata"
repo_url: "https://huggingface.co/datasets/altool/ohlcdata"
branch: "main"
auth_env_var: "HF_TOKEN" # Allows pulling from private HF dataset natively
clone_depth: 1
local_dir: "hf_ohlc_data" # β†’ /app/ch/user_files/hf_ohlc_data/
views:
- view_name: hf_ohlc
file_glob: "**/*.parquet"
format: Parquet
description: "Full OHLCV data from HF dataset, selects all 150+ columns automatically"
# ── EXAMPLE: Adding a second data source ──────────────────────────────
# Just uncomment and edit:
#
# - name: options_chain
# description: "NSE options chain snapshots"
# repo_url: "https://github.com/youruser/options_chain_data.git"
# branch: "main"
# clone_depth: 1
# local_dir: "options_chain"
# views:
# - view_name: options
# file_glob: "**/*.parquet"
# format: Parquet
# description: "Options chain snapshots"
# columns: # omit 'columns' to use SELECT *
# - strike
# - expiry
# - option_type
# - open_interest
# - volume
# - ltp
# - iv
#
# ── EXAMPLE: Multiple views from the same repo ───────────────────────
#
# - name: market_indices
# description: "Broad market index data"
# repo_url: "https://github.com/youruser/index_data.git"
# branch: "main"
# clone_depth: 1
# local_dir: "indices"
# views:
# - view_name: nifty50
# file_glob: "nifty50/**/*.parquet"
# format: Parquet
# description: "Nifty 50 index"
# - view_name: banknifty
# file_glob: "banknifty/**/*.parquet"
# format: Parquet
# description: "Bank Nifty index"