Public Repository

Last pushed: a year ago
Short Description
Run dashing in a docker container with support for MSSQL queries.
Full Description

Dashing with MSSQL

This is a fork of frvi/dashing with the inculsion of freetds-dev and the tiny_tds gem.

Example Job

#!/bin/env ruby
# encoding: utf-8

require 'tiny_tds'

def GetTransactionCount()
    client = TinyTds::Client.new(:username => 'USERNAME', :password => 'MYPASSWORD', :host => 'HOST', :database => 'DATABASENAME', :port => '1433')
    rows = client.execute("SELECT COUNT(*) AS transcount FROM transactions")
    rows.each do |row|
      return row['transcount']
    end
end

SCHEDULER.every '10s' do
  send_event('transactions', { current: GetTransactionsCount() })
end
Docker Pull Command
Owner
t0mburtn

Comments (0)