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
- Connect to an Elasticsearch instance and fetch data.
- Load data directly into a specified BigQuery table.
- Optional timestamping for record insertion.
Installation Install the package via pip:
pip install Elasticsearch_to_BigQuery_Connector
Dependencies
- elasticsearch: To connect and interact with Elasticsearch.
- 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):
- For Elasticsearch, provide the host, port, scheme, and authentication details.
- 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
Release history Release notifications | RSS feed
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
- Download URL: Elasticsearch_to_BigQuery_Connector-0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2565e9faec7e1d9f7cb0c5b66eb7a3204532c87cf98b361ce5de45eac9a8146 |
|
MD5 | 8d0dc1aeaff4797d59f2b43e9abbfeba |
|
BLAKE2b-256 | e3fca7a343a3be30642be16b7048301f29442a85b668252cfaadb7a8f5ea070d |
File details
Details for the file Elasticsearch_to_BigQuery_Connector-0.0-py3-none-any.whl
.
File metadata
- Download URL: Elasticsearch_to_BigQuery_Connector-0.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 180b834257c9d8c5574c3d381bfad3232e14ac4726c7bbc723de35fc0ce9b5e5 |
|
MD5 | 11107176e8d51740f2529bf8edd17911 |
|
BLAKE2b-256 | fff911b9192ae772a2bbe8fa61202d64534d469741840e8f28f2916bdef972db |