All Projects → tibkiss → es2postgres

tibkiss / es2postgres

Licence: Apache-2.0 License
ElasticSearch to PostgreSQL loader

Programming Languages

shell
77523 projects
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to es2postgres

YaEtl
Yet Another ETL in PHP
Stars: ✭ 60 (+233.33%)
Mutual labels:  etl, loader
Csv2db
The CSV to database command line loader
Stars: ✭ 102 (+466.67%)
Mutual labels:  etl, loader
Bentools Etl
PHP ETL (Extract / Transform / Load) library with SOLID principles + almost no dependency.
Stars: ✭ 45 (+150%)
Mutual labels:  etl, loader
proc-that
proc(ess)-that - easy extendable ETL tool for Node.js. Written in TypeScript.
Stars: ✭ 25 (+38.89%)
Mutual labels:  etl, loader
architectury-api
An intermediary api aimed at easing development of multiplatform mods.
Stars: ✭ 139 (+672.22%)
Mutual labels:  loader
kafka-connect-datagen
A Kafka Connect source connector that generates data for tests
Stars: ✭ 27 (+50%)
Mutual labels:  etl
KVSpinnerView
KVSpinnerView is highly customizable progress HUD
Stars: ✭ 37 (+105.56%)
Mutual labels:  loader
favicon-canvas-loader
Create and display a circular loading <canvas> animation as a webpage favicon.
Stars: ✭ 83 (+361.11%)
Mutual labels:  loader
astro
Astro allows rapid and clean development of {Extract, Load, Transform} workflows using Python and SQL, powered by Apache Airflow.
Stars: ✭ 79 (+338.89%)
Mutual labels:  etl
phaser-webpack-loader
Asset loader for Phaser + Webpack.
Stars: ✭ 85 (+372.22%)
Mutual labels:  loader
faker
A kotlin extension to load images asynchronously on android
Stars: ✭ 58 (+222.22%)
Mutual labels:  loader
rprogress
React ajax loader progress bar with clear API
Stars: ✭ 12 (-33.33%)
Mutual labels:  loader
rollup-loader
Rollup does what it can do, and let Webpack finish the job.
Stars: ✭ 86 (+377.78%)
Mutual labels:  loader
rivery cli
Rivery CLI
Stars: ✭ 16 (-11.11%)
Mutual labels:  etl
dts-css-modules-loader
A small Webpack loader to generate typings for your CSS-Modules
Stars: ✭ 44 (+144.44%)
Mutual labels:  loader
react-intl-loader
Async react-intl locale data loader for webpack
Stars: ✭ 46 (+155.56%)
Mutual labels:  loader
DataXServer
为DataX(https://github.com/alibaba/DataX) 提供远程多语言调用(ThriftServer,HttpServer) 分布式运行(DataX on YARN) 功能
Stars: ✭ 130 (+622.22%)
Mutual labels:  etl
vue-visual
Vue 2 image and video loader supporting lazy loading, background videos, fixed aspect ratios, low rez poster images, transitions, loaders, slotted content and more.
Stars: ✭ 56 (+211.11%)
Mutual labels:  loader
nunjucks-loader
Webpack loader for Nunjucks templates
Stars: ✭ 20 (+11.11%)
Mutual labels:  loader
sparklanes
A lightweight data processing framework for Apache Spark
Stars: ✭ 17 (-5.56%)
Mutual labels:  etl

es2postgres

docker build docker pulls license

ElasticSearch to PostgreSQL Loader.

Uses es2csv, xsv, GNU sed and psql client to periodically Extract, Transform and Load data from ES to PSQL.

  • Extract: ElasticSearch is queried from the last ingestion point for new data (delta-load). The result is stored in a CSV file.
  • Transform: Currently limited to column name changes via GNU sed expressions.
  • Load: The transformed data is loaded to PostgreSQL Database using the provided schema.

Usage

Docker

docker run \
  -e ES_URL="http://my_elasticsearch_host:9200" \
  -e ES_INDEX_PATTERN='logstash-*' \
  -e CSV_TMPFILE_PATH=/tmp/esdump.csv \
  -e CSV_SED_CMD="1s/prefix_to_remove\.//g ; 1s/@timestamp/timestamp/ ; 1s/kubernetes\.labels\.release/my_instance/ " \
  -e PG_HOST=my_database_host \
  -e PG_USER=my_database_user \
  -e PG_DATABASE=my_database_name \
  -e PG_PASSWORD=my_database_pass \
  -e PG_DDL_FILE=/tmp/table.sql \
  -e PG_SCHEMA_NAME=public \
  -e PG_TABLE_NAME=my_table \
  -e PG_TIME_FIELD=my_time_field \
  -e REFRESH_INTERVAL=3600 \
  -v $(pwd)/table.sql:/tmp/table.sql \
  tibkiss/es2postgres

Kubernetes / Helm-2.x

git clone https://github.com/tibkiss/es2postgres
cd es2postgres
cp /path/to/my/ddl.sql helm-chart/ddl.sql

helm install \
  --name es2postgres \
  --set es.url=http://elasticsearch-master:9200 \
  --set es.indexPattern="logstash-*" \
  --set pg.host="postgresql" \
  --set pg.password=superSeKretPaSS \
  --set pg.database=my_database \
  --set pg.tableName=my_table \
  --set pg.timeField=time \
  --set pg.ddl=ddl.sql \
  --set csvSedCmd="1s/@timestamp/timestamp/ ; 1s/kubernetes\.labels\.release/my_instance/ " \
  ./helm-chart

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].