Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alash3al/sql2slack

send sql results periodically to slack
https://github.com/alash3al/sql2slack

Last synced: 3 months ago
JSON representation

send sql results periodically to slack

Awesome Lists containing this project

README

        

SQL2Slack
=========
> a cron deamon that executes the specified sql query and forward its result to slack ()

Features
========
- Tiny & Portable.
- Works with multiple sql engine.
- Customize the slack message using javascript as well [underscore.js](https://underscorejs.org/).
- Cron like syntax for scheduling sql jobs.
- Uses [hcl language](https://github.com/hashicorp/hcl) for structured configurations.
- Ability to define a job per single file for future maintainability of large jobs.

Quick Overview
==============
```hcl
job tst {
// slack-channel webhook url
channel = "https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxxxxx"

// which sql driver do you use?
driver = "mysql"

// data source name (connection string)
dsn = "root:root@tcp(127.0.0.1:3306)/dbname"

// the query this is a multiline example, you can just write the following
// query = "select * from users"
query = <