stasaking commited on
Commit
58eeeb9
·
verified ·
1 Parent(s): e9b61e5

Upload main.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -95,12 +95,12 @@ def startup():
95
  mode = "remote httpfs" if is_remote else "local files"
96
  print(f"Data mode: {mode}")
97
 
98
- # Results table: loaded into memory (small, ~47MB, queried frequently)
 
99
  db.execute(f"""
100
- CREATE TABLE results AS
101
  SELECT * FROM read_parquet('{results_src}')
102
  """)
103
- # Features: remote view (larger, queried on demand via httpfs range requests)
104
  db.execute(f"""
105
  CREATE VIEW features AS
106
  SELECT * FROM read_parquet('{features_src}')
 
95
  mode = "remote httpfs" if is_remote else "local files"
96
  print(f"Data mode: {mode}")
97
 
98
+ # Create views that query Parquet remotely via httpfs range requests.
99
+ # No data copied into RAM — DuckDB fetches only needed columns/rows per query.
100
  db.execute(f"""
101
+ CREATE VIEW results AS
102
  SELECT * FROM read_parquet('{results_src}')
103
  """)
 
104
  db.execute(f"""
105
  CREATE VIEW features AS
106
  SELECT * FROM read_parquet('{features_src}')