mirror of
https://github.com/hanzo-ds/connect.git
synced 2026-10-30 20:31:24 +00:00
The wire protocol was the last holdout and it was not cosmetic: the Hanzo Datastore server reads X-Datastore-User, and answers a request bearing X-ClickHouse-User with 401. Verified against the live server, both directions. So a client still sending the old headers is not merely off-brand, it cannot authenticate over HTTP. Everything else follows: types, dialects, error modules, docstrings and doc links now name Datastore, and doc URLs point at docs.hanzo.ai/datastore rather than the upstream vendor's site. Zero occurrences of the old name remain. Still cut from the pinned upstream version, so behaviour is unchanged.
11 lines
444 B
Python
11 lines
444 B
Python
import datastore_connect
|
|
|
|
if __name__ == '__main__':
|
|
client = datastore_connect.get_client()
|
|
query = 'SELECT number, toString(number) AS number_as_str FROM system.numbers LIMIT 5'
|
|
fmt = 'CSVWithNames' # or any other format, see https://docs.hanzo.ai/datastore/en/interfaces/formats
|
|
stream = client.raw_stream(query=query, fmt=fmt)
|
|
with open("output.csv", "wb") as f:
|
|
for chunk in stream:
|
|
f.write(chunk)
|