Skip to main content

Run a query on Databricks

Project description

dbq

Run Databricks queries from your terminal or editor.

Basic demo

Installation and configuration

pip3 install dbq

Note: libsasl2 is required on your system. On Ubuntu, get it through sudo apt-get install libsasl2-dev.

Configuration instructions will be displayed when you run dbq.

Usage

dbq [QUERY]

Interactive session

Run dbq (without QUERY) to start an interactive REPL. Readline is supported, a history file is kept in ~/.dbq_history.

Read query from stdin

Specify - for QUERY. Useful for editor integrations; see next section.

Integrating with vim

This example binds ctrl+s to running the selected text as a query (visual mode) or the subquery that is under the cursor (normal mode).

nnoremap <C-s> vi(:w !dbq -<cr>
vnoremap <C-s> :w !dbq -<cr>

Vim demo

Development and contributing

For development pipenv is required on your system. Set up the development environment with make develop, run with pipenv run dbq ... as needed. When submitting pull requests, ensure that make lint comes back clean; you can auto format the code with make format.

We welcome pull requests; if you are planning to perform bigger changes then it makes sense to file an issue first.

Security

For sensitive security matters please contact security@getyourguide.com.

Legal

Copyright 2019 GetYourGuide GmbH.

dbq is licensed under the Apache License, Version 2.0. See LICENSE for the full text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbq-0.9.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

dbq-0.9.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file dbq-0.9.0.tar.gz.

File metadata

  • Download URL: dbq-0.9.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for dbq-0.9.0.tar.gz
Algorithm Hash digest
SHA256 c0a6e64b85c2cca5e6042ceea1900f754bdb09e3cb2dadee3cf85b536f8cbb82
MD5 550c5a1f497e810c8f0799682727074c
BLAKE2b-256 a211097a8c2f92d14ab2155f994252c771d2e6ff26485e781dbb18f31d48c6e6

See more details on using hashes here.

File details

Details for the file dbq-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: dbq-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for dbq-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98a48bda1c95790da77ce0bb7a859f4bd25227f4e7c32142c79f276914622b9d
MD5 32223ab86738fb8df3cd0463bf4a0654
BLAKE2b-256 6b0b8aaa5b54b7dabd36e29d606340558349ad56fabe38f2da181b1991257b83

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page