Amazon Redshift
Amazon Redshift is a cloud data warehouse service.
Connect to Amazon Redshift
- In the Dremio console, click Add Data on the Home page.
- In the Add Data dialog, select Amazon Redshift.
- Configure the connection using the sections below, then click Save.
General
Under Name, enter the Dremio connection name. The name cannot include the following special characters: /, :, [, or ].
Enter the JDBC Connection String. The connection URL can be found in the AWS console and follows this format:
Redshift JDBC Connection String Formatjdbc:redshift://<host>:<port>/<database>
The database value in the connection string specifies the target database. Dremio discovers and displays the schemas and tables in the specified database, whether it is a local database or a shared database created from a Redshift datashare.
Shared databases only contain the schemas and tables that the producer explicitly added to the datashare. System schemas such as pg_internal and pg_auto_copy that appear in local databases are not present in shared databases.
Select an Authentication option:
- No Authentication
- Master Credentials (default):
- Username: Provide the Redshift username.
- Password: Provide the Redshift password for the given user.
Advanced Options
- Record fetch size: Number of records to fetch at once. Set to 0 (zero) to have Dremio automatically decide. The default is 10.
- Maximum idle connections: The total number of connections allowed to be idle at a given time. The default is 8.
- Connection idle time (s): The amount of time (in seconds) allowed for a connection to remain idle before the connection is terminated. The default is 60 seconds.
- Query timeout: The amount of time (in seconds) to wait for query results. If this time expires, the connection being used is returned to an idle state.
- Health check timeout: The timeout in seconds for health check execution. The default is 1 second.
Reflection Refresh
- Never refresh: Select to prevent automatic Reflection refresh; otherwise, the default is to refresh automatically.
- Refresh every: Define how often to refresh Reflections, specified in hours, days, or weeks. This option is ignored if Never refresh is selected.
- Set refresh schedule: Specify the daily or weekly schedule.
- Never expire: Select to prevent Reflections from expiring; otherwise, the default is to expire automatically after the time limit specified in Expire after.
- Expire after: The time limit after which Reflections expire and are removed from Dremio, specified in hours, days, or weeks. This option is ignored if Never expire is selected.
Metadata
Dataset Handling
- Remove dataset definitions if underlying data is unavailable: Checked by default. If this box is not checked and the underlying data is not accessible, Dremio does not remove the dataset definitions.
Metadata Refresh
- Data Discovery: Set the time interval for fetching top-level object names such as databases and tables. You can choose to set the Fetch every frequency to fetch object names in minutes, hours, days, or weeks. The default frequency to fetch object names is 1 hour.
- Dataset Details: The metadata that Dremio needs for query planning, such as information about fields, types, shards, statistics, and locality. Use these parameters to fetch or expire the metadata:
- Fetch mode: Fetch only from queried datasets. Dremio updates details for previously queried objects. By default, this is set to Only Queried Datasets.
- Fetch every: Set the frequency to fetch dataset details in minutes, hours, days, or weeks. The default frequency to fetch dataset details is 1 hour.
- Expire after: Set the expiry time of dataset details in minutes, hours, days, or weeks. The default expiry time of dataset details is 3 hours.
Privileges
This connection inherits privileges from Project settings. To grant specific users or roles additional privileges in this connection:
- Enter the username or role name that you want to grant access to and click the Add to Privileges button. The added user or role is displayed in the USERS/ROLES table.
- For the users or roles in the USERS/ROLES table, toggle the checkmark for each privilege you want to grant on the Dremio source that is being created.
- Click Save after setting the configuration.
See Privileges for additional information about privileges.
Edit an Amazon Redshift Connection
- On the Open Catalog page, under Connections, right-click the connection and select Settings.
- Update the connection configuration as needed.
- Click Save.
Delete an Amazon Redshift Connection
If the source is in a bad state (for example, Dremio cannot authenticate to the source or the source is otherwise unavailable), only users who belong to the ADMIN role can delete the source.
- On the Open Catalog page, under Connections, right-click the connection and select Delete.
- Click Delete to confirm.
Predicate Pushdowns
Dremio offloads these operations to Redshift. If your query uses a function not on this list, the filter will be applied after data is retrieved.
*, +, -, /
<, <=, <>, =, >, >=, !=
AND, NOT, OR, ||
ABS
ACOS
ADD_MONTHS
ASIN
ATAN
ATAN2
AVG
CAST
CBRT
CEIL
CEILING
CHAR_LENGTH
CHARACTER_LENGTH
CONCAT
COS
COT
DATE_ADD
DATE_SUB
DATE_TRUNC_CENTURY
DATE_TRUNC_DAY
DATE_TRUNC_DECADE
DATE_TRUNC_HOUR
DATE_TRUNC_MINUTE
DATE_TRUNC_MONTH
DATE_TRUNC_QUARTER
DATE_TRUNC_SECOND
DATE_TRUNC_WEEK
DATE_TRUNC_YEAR
DEGREES
E
EXP
EXTRACT_CENTURY
EXTRACT_DAY
EXTRACT_DECADE
EXTRACT_DOW
EXTRACT_DOY
EXTRACT_EPOCH
EXTRACT_HOUR
EXTRACT_MILLENNIUM
EXTRACT_MINUTE
EXTRACT_MONTH
EXTRACT_QUARTER
EXTRACT_SECOND
EXTRACT_WEEK
EXTRACT_YEAR
FLOOR
IS DISTINCT FROM
IS NOT DISTINCT FROM
IS NOT NULL
IS NULL
LAST_DAY
LCASE
LEFT
LENGTH
LIKE
LN
LOCATE
LOG
LOG10
LOWER
LPAD
LTRIM
MAX
MEDIAN
MIN
MOD
PERCENT_CONT
PERCENT_DISC
PI
POSITION
POW
POWER
RADIANS
REPLACE
REVERSE
RIGHT
ROUND
RPAD
RTRIM
SIGN
SIN
SQRT
STDDEV
STDDEV_POP
STDDEV_SAMP
SUBSTR
SUBSTRING
SUM
TAN
TIMESTAMPADD_DAY
TIMESTAMPADD_HOUR
TIMESTAMPADD_MINUTE
TIMESTAMPADD_MONTH
TIMESTAMPADD_QUARTER
TIMESTAMPADD_SECOND
TIMESTAMPADD_WEEK
TIMESTAMPADD_YEAR
TIMESTAMPDIFF_DAY
TIMESTAMPDIFF_HOUR
TIMESTAMPDIFF_MINUTE
TIMESTAMPDIFF_MONTH
TIMESTAMPDIFF_QUARTER
TIMESTAMPDIFF_SECOND
TIMESTAMPDIFF_WEEK
TIMESTAMPDIFF_YEAR
TO_CHAR
TO_DATE
TRIM
TRUNC
TRUNCATE
UCASE
UPPER
VAR_POP
VAR_SAMP
Data Type Map
All string types map to VARCHAR, integer types to INTEGER or BIGINT, and timestamp types to TIMESTAMP.
| Amazon Redshift Type | Dremio Type |
|---|---|
| BIT, BOOL, BOOLEAN | BOOLEAN |
| INT, INT2, INT4, INTEGER, TINYINT | INTEGER |
| INT8 | BIGINT |
| FLOAT4 | FLOAT |
| FLOAT8 | DOUBLE |
| NUMERIC | DECIMAL |
| BPCHAR, CHAR, CHARACTER VARYING, NCHAR, NVARCHAR, TEXT, VARCHAR | VARCHAR |
| BYTEA, VARBINARY | VARBINARY |
| DATE | DATE |
| TIMESTAMP, TIMESTAMPTZ, TIMESTAMP WITH TIMEZONE, TIMESTAMP WITHOUT TIMEZONE | TIMESTAMP |