mirror of
https://github.com/hanzo-ds/driver.git
synced 2026-10-30 20:32:40 +00:00
9 lines
322 B
Python
9 lines
322 B
Python
import sys
|
|
import requests
|
|
from ujson import loads
|
|
|
|
query = "SELECT * FROM perftest.ontime WHERE FlightDate < '{}' FORMAT JSONEachRow".format(sys.argv[1])
|
|
resp = requests.get('http://localhost:8123/', stream=True, params={'query': query})
|
|
|
|
data = [list(loads(line).values()) for line in resp.iter_lines(chunk_size=10000)]
|