0.1.11 • Published 10 years ago

sense-sql-engine v0.1.11

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

SQL Engine for Sense

A SQL engine for Sense supporting Redshift, MySql, Postgres, and SQLite3.

Note: This engine is not yet officially supported due to known bugs in the chunker.

Installation

You can install this engine in Sense using:

npm install sense-sql-engine

Usage

Database connection info must be stored securely in environmental variables (Project > Environment). For instance, if you have a database you want to call MYREDSHIFT, store the connection info as:

MYREDSHIFT=driver://user:pass@hostname/database

The driver can be postgresql (redshift or postgres), mysql, or sqlite.

You can then select the database from within a SQL dashboard or script using:

CONNECT MYREDSHIFT;

Your connection information will never appear in any dashboard output. You can then execute queries like you would normally:

CONNECT MYREDSHIFT;
SELECT * FROM users WHERE created_at > CURRENT_TIMESTAMP - INTERVAL '7 days'

You can switch between multiple databases in a single script by issuing multiple CONNECT statements. Connection names are case insensitive.

Tips

  • Make sure to always limit the amount of data you return using like LIMIT.
  • Comments are markdown formatted.

Support

LICENSE

MIT

0.1.11

10 years ago

0.1.9

10 years ago

0.1.7

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago