Files
Analytical_engine_backend/get_cols_line.py
2026-05-11 12:36:20 +05:30

16 lines
505 B
Python

import duckdb
def get_full_schema():
conn = duckdb.connect()
conn.execute("INSTALL httpfs; LOAD httpfs;")
conn.execute("SET s3_region='sgp1';")
conn.execute("SET s3_endpoint='sgp1.digitaloceanspaces.com';")
conn.execute("SET s3_url_style='path';")
rows = conn.execute("DESCRIBE SELECT * FROM read_parquet('s3://nearle/parquet/deliveries/*.parquet')").fetchall()
cols = [row[0] for row in rows]
print(", ".join(cols))
if __name__ == "__main__":
get_full_schema()