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.11.post1.tar.gz (15.7 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.11.post1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bq-sqoop-0.0.11.post1.tar.gz
  • Upload date:
  • Size: 15.7 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.11.post1.tar.gz
Algorithm Hash digest
SHA256 0645ef441c0fda36334db8a8d212e3cc2d3bf2af512812d13bb9f64f5daee0bc
MD5 59adaacf0b61e88f2fcd57539d93f1e1
BLAKE2b-256 d543b34cf428658388182e7333c74bce21aa2b6f4fc9aee36ace029e7eadc708

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bq_sqoop-0.0.11.post1-py3-none-any.whl
  • Upload date:
  • Size: 20.8 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.11.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 94ef3b013cb1212ad0e5aca4770863b0bb7672c768bd5002aea1337786aea325
MD5 8aef57b5c14749103d31646c0fe967b3
BLAKE2b-256 dea18b5bc2e073e328a1b4dd4343b2997d0f83e641f9c17ec1451610ef5d41dd

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