15 lines
450 B
Python
15 lines
450 B
Python
import duckdb
|
|
|
|
def get_keys():
|
|
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';")
|
|
|
|
df = conn.execute("SELECT * FROM read_parquet('s3://nearle/parquet/deliveries/*.parquet') LIMIT 1").df()
|
|
print(df.columns.tolist())
|
|
|
|
if __name__ == "__main__":
|
|
get_keys()
|