Connect to a Amazon Redshift Database

Connect to a Amazon Redshift database and run dynamic scripts through that library. The library is responsible for connecting to the database, executing the script and closing the connection after execution.

const redshift = require('linkapi-sdk/state/redshift');

const config = {
  credentials: {
    "host": "",
    "user": "",
    "password": "",
    "port": "",
    "database": ""
  }
}

const query = 'SELECT * FROM {{table}}';

const queryValues = {
  table: 'PRODUCTS'
};

const result = await redshift.execute(config);