Skip to main content

A CLI client for exporting elasticsearch data to csv

Project description

Build Status Latest Version Python versions Package status Package coverage

This project is to just have a simple cli command to export data from ES, postgres, etc using the CPU’s, It’s intended to be used in Data workflow for extracting data out.

Note

This is still early in the development and a bit rough around the edges. Any bug reports, feature suggestions, etc are greatly appreciated. :)

Installation and usage

Installation Since this is a Python package available on PyPi you can install it like any other Python package.

# on modern systems with Python you can install with pip
$ pip install bq-sqoop
# on older systems you can install using easy_install
$ easy_install bq-sqoop

Usage The commands should be mostly self-documenting in how they are defined, which is made available through the help command.

$ bq-sqoop
usage: bq-sqoop -h

arguments:
    -h, --help            show this help message and exit
    -v, --version         Show version and exit.
    -c CONFIG_FILE,       --config_file CONFIG_FILE
                            Toml Config file for the bq-sqoop job.Can be a local
                            file path or a public http link or a GCS fileeg,
                            https://storage.googleapis.com/sample_config.toml or
                            gs://gcs_bucket/sample_config.toml or
                            /tmp/sample_config.toml
    -d, --debug           Debug mode on.

Configuration files

You can find an example repository at https://github.com/therako/bqsqoop-examples.git

Configuration objects

  1. Bigquery
  2. Extractor

Bigquery

[bigquery]
project_id="destination-google-project-id"
dataset_name="destination-dataset"
table_name="destination-table-name"
gcs_tmp_path="gs://gcs-tmp-bucket/bqsqoop/"

Extractor

Elasticsearch

[extractor.elasticsearch]
url="localhost:9200,localhost:9201"
index="source-es-index-name"
timeout="60s"
scroll_size=500
fields=["_all"]

SQL

[extractor.sql]
sql_bind="postgresql+psycopg2://username:password@127.0.0.1:5432/database"
query="select * from table_name"

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

bq-sqoop-0.0.12.post1.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bq_sqoop-0.0.12.post1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file bq-sqoop-0.0.12.post1.tar.gz.

File metadata

  • Download URL: bq-sqoop-0.0.12.post1.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.5

File hashes

Hashes for bq-sqoop-0.0.12.post1.tar.gz
Algorithm Hash digest
SHA256 6510522fa98e9a8de0eecc158bb1b3610586852e5921a122b2091c246a4c7214
MD5 83c73035674deb1b1d8b180639f1748d
BLAKE2b-256 4ffc4e709fb3676009867107e2e4426b848872eb063e082f3b04a1ed376af851

See more details on using hashes here.

File details

Details for the file bq_sqoop-0.0.12.post1-py3-none-any.whl.

File metadata

  • Download URL: bq_sqoop-0.0.12.post1-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.5

File hashes

Hashes for bq_sqoop-0.0.12.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 763bfaf5c83906fb96bc6bceff62806c6a7527a5a67adf4576516d9e8b5821a3
MD5 9b3ed06fcd2f3cf6ff7234ed55ddd382
BLAKE2b-256 972cf4a80aae841a2f608be25eefe7687f86b7d3904235e77a2a17b7802eb069

See more details on using hashes here.

Supported by

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