项目作者: alphasentaurii

项目描述 :
SQL queries with digdag and embulk open source libraries for automation of ingesting and analyzing data using a PostgreSQL database.
高级语言: TSQL
项目地址: git://github.com/alphasentaurii/digdag-postgres.git
创建时间: 2020-07-27T19:03:59Z
项目社区:https://github.com/alphasentaurii/digdag-postgres

开源协议:MIT License

下载


Digdag Postgres

The Digdag Postgres project demonstrates how to use SQL queries with digdag and embulk open source libraries for automation of ingesting and analyzing data using a PostgreSQL database.

GitHub repo size
GitHub license

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have a <Windows/Linux/Mac> machine.
  • You have access to sudo privileges
  • You have installed Java version 8
  • You have postgreSQL installed and configured

For help installing and configuring Java and PostgreSQL, check out my blog post Digdag PostgreSQL Tutorial.

Running the Digdag Postgres project

Use sudo to get root privileges

  1. $ sudo -s

Install digdag

  1. $ curl -o ~/bin/digdag --create-dirs -L "https://dl.digdag.io/digdag-latest"
  2. $ chmod +x ~/bin/digdag
  3. $ echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc

Check to make sure digdag is installed correctly:

  1. $ digdag --help

Install Embulk

  1. $ curl --create-dirs -o ~/.embulk/bin/embulk -L "https://dl.embulk.org/embulk-latest.jar"
  2. $ chmod +x ~/.embulk/bin/embulk
  3. $ echo 'export PATH="$HOME/.embulk/bin:$PATH"' >> ~/.bashrc
  4. $ source ~/.bashrc

Install Plugins

  1. $ embulk gem install embulk-input-postgresql
  2. $ embulk gem install embulk-output-postgresql

Run the Digdag PostgreSQL workflow

To run this project locally, follow these steps:

In the command line/terminal:

  1. $ sudo -s # root privileges
  2. $ cd ~/ # change to root directory home folder
  3. $ git clone https://github.com/hakkeray/digdag-postgres.git
  4. $ cd digdag-to-postgres/embulk_to_pg
  5. $ digdag secrets --local --set pg.password=password
  6. $ digdag run embulk_to_pg.dig -O log/task

Note: If this isn’t your first time running the workflow, use the —rerun flag:

  1. $ digdag run embulk_to_pg.dig --rerun -O log/task

Contact

If you want to contact me you can reach me at rukeine@gmail.com.

License

This project uses the following license: MIT License.

  1. _ __ _ _
  2. /\_/\ | '__| | | |
  3. [===] | | | |_| |
  4. \./ |_| \__,_|