Skip to main content

No project description provided

Project description

Python Library for connecting to Elasticsearch and loading data into BigQuery.

This Python library provides utilities to extract data from Elasticsearch and load it directly into Google BigQuery. It simplifies the process of data migration between Elasticsearch and BigQuery by handling connection setup, data extraction, and data loading with optional timestamping.

Features

  1. Connect to an Elasticsearch instance and fetch data.
  2. Load data directly into a specified BigQuery table.
  3. Optional timestamping for record insertion.

Installation Install the package via pip:

pip install Elasticsearch_to_BigQuery_Connector

Dependencies

  1. elasticsearch: To connect and interact with Elasticsearch.
  2. google-cloud-bigquery: To handle operations related to BigQuery.

Make sure to have these installed using:

pip install elasticsearch google-cloud-bigquery

Example Usage:

from Elasticsearch_to_BigQuery_Connector import Elasticsearch_to_BigQuery_Connector

load_data_to_bigquery(
    es_index_name='your_index',
    es_host='localhost',
    es_port=port,
    es_scheme='http',
    es_http_auth=('user', 'pass'),
    es_size=size,
    bq_project_id='your_project_id',
    bq_dataset_id='your_dataset_id',
    bq_table_name='your_table_name',
    bq_add_record_addition_time=True
)

Additional Notes:

Ensure you have configured credentials for both Elasticsearch and Google Cloud (BigQuery):

  1. For Elasticsearch, provide the host, port, scheme, and authentication details.
  2. For BigQuery, ensure your environment is set up with the appropriate credentials (using Google Cloud SDK or setting the GOOGLE_APPLICATION_CREDENTIALS environment variable to your service account key file).

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

Built Distribution

File details

Details for the file Elasticsearch_to_BigQuery_Connector-0.0.tar.gz.

File metadata

File hashes

Hashes for Elasticsearch_to_BigQuery_Connector-0.0.tar.gz
Algorithm Hash digest
SHA256 d2565e9faec7e1d9f7cb0c5b66eb7a3204532c87cf98b361ce5de45eac9a8146
MD5 8d0dc1aeaff4797d59f2b43e9abbfeba
BLAKE2b-256 e3fca7a343a3be30642be16b7048301f29442a85b668252cfaadb7a8f5ea070d

See more details on using hashes here.

File details

Details for the file Elasticsearch_to_BigQuery_Connector-0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Elasticsearch_to_BigQuery_Connector-0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 180b834257c9d8c5574c3d381bfad3232e14ac4726c7bbc723de35fc0ce9b5e5
MD5 11107176e8d51740f2529bf8edd17911
BLAKE2b-256 fff911b9192ae772a2bbe8fa61202d64534d469741840e8f28f2916bdef972db

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