This article covers:
To establish a connection to an Amazon Redshift database, navigate to the Connections page, select New Connection, then AWS Redshift from the New Connection modal:
You will be prompted to provide the following connection details to establish a connection to your Amazon Redshift database:
Please refer to the examples in our developer documentation to find out how to create a connection to Redshift via our API.
Notes:
Once you have connected your Redshift you can add datasets as explained here.
{{metadata.< parameter name >|< default value >}}. Find out more about parameterized SQL Datasets.Also make sure to check out this article on Preparing your data for analytics.
To find out how to add datasets using our API, please refer to the examples in our developer documentation.
When generating an Authorization token to grant a user acces to your embedded dashboards it is possible to override the data source properties in the authorization request to dynamically use different properties. Find out more about connection overrides.
The fields available for overriding a Redshift connection are as follows:
Our developer documentation has more info about connection overrides and examples of Redshift connection overrides.
Example code demonstrating how to override a Redshift connection:
import Luzmo from '@luzmo/nodejs-sdk';
const client = new Luzmo({
api_key: '<your Luzmo API key>',
api_token: '<your Luzmo API token>',
host: 'https://api.luzmo.com:443'
});
const response = await client.create('authorization',
{
type: "embed",
username: "< A unique and immutable identifier for your user >",
name: "< user name >",
email: "< user email >",
suborganization: "< a suborganization name >",
access: {
collections: [
{
id: "<collection_id>",
inheritRights: "use"
}
]
},
account_overrides: {
<your connection_id>: {
host: "<The new database host URL to connect to>",
user: "<username>",
password: "<password>"
}
}
}
);
| Data Type in Redshift | Data Type in Luzmo |
|---|---|
| bigint | numeric |
| bigserial | numeric |
| bit | hierarchy |
| bit varying | hierarchy |
| boolean | hierarchy |
| character | hierarchy |
| bpchar | hierarchy |
| character varying | hierarchy |
| cidr | hierarchy |
| date | datetime |
| double precision | numeric |
| inet | hierarchy |
| integer | numeric |
| json | hierarchy |
| jsonb | hierarchy |
| macaddr | hierarchy |
| money | numeric |
| numeric | numeric |
| real | numeric |
| smallint | numeric |
| smallserial | numeric |
| serial | numeric |
| text | hierarchy |
| time without time zone | datetime |
| time with time zone | datetime |
| timestamp without time zone | datetime |
| timestamp with time zone | datetime |
| uuid | hierarchy |
| xml | hierarchy |