initial commit
This commit is contained in:
15
peek_live.py
Normal file
15
peek_live.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import duckdb
|
||||
import json
|
||||
|
||||
def peek_data():
|
||||
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';")
|
||||
|
||||
row = conn.execute("SELECT * FROM read_parquet('s3://nearle/parquet/deliveries/*.parquet') LIMIT 1").df().to_dict('records')[0]
|
||||
print(json.dumps(row, indent=2, default=str))
|
||||
|
||||
if __name__ == "__main__":
|
||||
peek_data()
|
||||
Reference in New Issue
Block a user