Skip to main content
Version: devel

destinations.impl.dremio.pydremio

Copyright (C) 2017-2021 Dremio Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The code in this module was original from https://github.com/dremio-hub/arrow-flight-client-examples/tree/main/python. The code has been modified and extended to provide a PEP 249 compatible interface.

This implementation will eagerly gather the full result set after every query. Eventually, this module should be replaced with ADBC Flight SQL client. See: https://github.com/apache/arrow-adbc/issues/1559

DremioClientAuthMiddlewareFactory Objects

class DremioClientAuthMiddlewareFactory(flight.ClientMiddlewareFactory)

[view_source]

A factory that creates DremioClientAuthMiddleware(s).

DremioClientAuthMiddleware Objects

class DremioClientAuthMiddleware(flight.ClientMiddleware)

[view_source]

A ClientMiddleware that extracts the bearer token from the authorization header returned by the Dremio Flight Server Endpoint.

Parameters

factory : ClientHeaderAuthMiddlewareFactory The factory to set call credentials if an authorization header with bearer token is returned by the Dremio server.

CookieMiddlewareFactory Objects

class CookieMiddlewareFactory(flight.ClientMiddlewareFactory)

[view_source]

A factory that creates CookieMiddleware(s).

CookieMiddleware Objects

class CookieMiddleware(flight.ClientMiddleware)

[view_source]

A ClientMiddleware that receives and retransmits cookies. For simplicity, this does not auto-expire cookies.

Parameters

factory : CookieMiddlewareFactory The factory containing the currently cached cookies.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.