druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

[api] Adding support for headers #155

Closed john-bodley closed 5 years ago

john-bodley commented 5 years ago

This PR closes https://github.com/druid-io/pydruid/issues/151 by providing a mechanism for specifying whether the Druid SQL response should include a header (added in 0.13.0) which contains the column names.

Note the default behavior remains unchanged, i.e., headers are not requested. Including the headers field in the request body is not problematic for older versions of Druid which are agnostic of this option.

to: @betodealmeida

mistercrunch commented 5 years ago

Can we add a note in the README.md around the dbapi examples as to why and how to use or not to use header=True and how to set it up in the connection string (looks like ?header=true)?

john-bodley commented 5 years ago

@mistercrunch I added a section in the README.md which explains the header logic.

mistercrunch commented 5 years ago

Fantastique, LGTM!