Skip to main content

Amazon Redshift

Amazon Redshift is a cloud data warehouse service.

Add Amazon Redshift as a Source

  1. On the Datasets page, to the right of Sources in the left panel, click This is the Add Source icon..
  2. In the Add Data Source dialog, under Databases, select Amazon Redshift.

General

Under Name, enter the name to identify the data source in Dremio. The name cannot include the following special characters: /, :, [, or ].

Connection

Enter the JDBC Connection String. The connection URL can be found in the AWS console.

Authentication

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) allowed to wait for the results of a query. 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.
  • Connection Properties: Custom key-value pairs for the connection relevant to the source. To add a connection property, click Add property and add the property name and value.

Reflection Refresh

Set the policy that controls how often Reflections are refreshed or expired, using the following options:

  • Never refresh: Select to prevent automatic Reflection refresh; otherwise, the default is to refresh automatically.
  • Refresh every: 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

Set the following metadata options:

  • Remove dataset definitions if underlying data is unavailable: Checked by default. If this box is not checked and the underlying folder/source is not accessible, Dremio does not remove the dataset definitions.
  • Data Discovery: Set the time interval for fetching top-level source 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 needed for 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 in a source. 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

To grant privileges to specific users or roles:

  1. For Privileges, 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.
  2. 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.
  3. Click Save after setting the configuration.

See Access Control for additional information about privileges.

Edit an Amazon Redshift Source

  1. On the Datasets page, click Databases. A list of databases is displayed.
  2. Hover over the database and click This is the icon that represents the Database settings. that appears next to the database.
  3. In the Source Settings dialog, you cannot edit the name. Editing other parameters is optional.
  4. Click Save.

Delete an Amazon Redshift Source

note

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.

  1. On the Datasets page, click Databases. A list of sources is displayed.
  2. Hover over the database and click This is the more icon that appears next to the database.
  3. From the list of actions, click Delete. Confirm that you want to remove the source.

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 Mapping

All string types map to VARCHAR, integer types to INTEGER or BIGINT, and timestamp types to TIMESTAMP.

Amazon Redshift TypesDremio Type
BIT, BOOL, BOOLEANBOOLEAN
INT, INT2, INT4, INTEGER, TINYINTINTEGER
INT8BIGINT
FLOAT4FLOAT
FLOAT8DOUBLE
NUMERICDECIMAL
BPCHAR, CHAR, CHARACTER VARYING, NCHAR, NVARCHAR, TEXT, VARCHARVARCHAR
BYTEA, VARBINARYVARBINARY
DATEDATE
TIMESTAMP, TIMESTAMPTZ, TIMESTAMP WITH TIMEZONE, TIMESTAMP WITHOUT TIMEZONETIMESTAMP