Amazon Redshift Spectrum Data Source

You can create an Amazon Redshift Spectrum data source using the Immuta CLI or the Immuta V2 API.

Requirements

  • The enable_case_sensitive_identifier parameter must be set to false (default setting) for your Redshift cluster.

  • CREATE_DATA_SOURCE Immuta permission

  • The Redshift user registering data sources must have the following privileges on all securables:

    • USAGE on all schemas with registered data sources

    • SELECT on all tables within those schemas

Create a data source using the Immuta CLI

connectionKey: redshift
connection:
  hostname: your-redshift-cluster.djie25k.us-east-1.redshift.amazonaws.com
  port: 5439
  ssl: true
  database: your_database_with_external_schema
  username: awsuser
  password: your_password
  handler: Redshift
  schema: external_schema
nameTemplate:
  dataSourceFormat: <Tablename>
  schemaFormat: <schema>
  tableFormat: <tablename>
  schemaProjectNameFormat: <Schema>
  nativeSchemaFormat: <schema>_immuta
  nativeViewFormat: <tablename>
sources:
  - all: true
  1. Copy the snippet above and save it as a YAML file. Replace the configuration values with your own, where

    1. hostname is the URL of your Redshift account.

    2. database is the name of the existing or new database that the Immuta system user will manage and store metadata in.

    3. username and password are the credentials for the system account that can act on Redshift objects and configure the integration.

    4. schema is the name of the external schema in the database.

  2. Run immuta datasource save <filepath> [--wait int] [--dryRun], referencing the file you just created. The options you can specify include

    • -d or --dryRun: No updates will actually be made to the data source(s).

    • -h or --help: Get more information about the command.

    • -w or --wait int: Specify how long to wait for data source creation.

For additional configuration options, see the connection object details for Redshift Spectrum data sources on the Create a data source guide.

Create a data source using the Immuta V2 API

  1. Copy the request example. The example provided uses JSON format, but the request also accepts YAML.

  2. Replace the Immuta URL and API key with your own.

  3. Change the config values to your own, where

    1. hostname is the URL of your Redshift account.

    2. database is the name of the existing or new database that the Immuta system user will manage and store metadata in.

    3. username and password are the credentials for the system account that can act on Redshift objects and configure the integration.

    4. schema is the name of the external schema in the database.

Path parameters

Parameter
Description
Required or optional
Default value

dryRun boolean

If true, no updates will actually be made.

Optional

false

wait number

The number of seconds to wait for data sources to be created before returning. Anything less than 0 will wait indefinitely.

Optional

0

Body parameters

The request accepts a JSON or YAML payload with the parameters outlined below.

Parameter
Description
Required or optional

connectionKey string

A key/name to uniquely identify this collection of data sources.

Required

connection object

Connection information. See the connection object description for attribute details.

Required

A template to override naming conventions. If not provided, system defaults will be used. See the nameTemplate object description for attribute details.

Optional

options object

Override options for these data sources. If not provided, system defaults will be used. See the options object description for attribute details.

Optional

owners object

Specify owners for all data sources created. See the owners object description for attribute details.

Optional

sources array

Configure which data sources are created. If not provided, all objects from the given connection will be created. See the sources array description for attribute details.

Optional

Last updated

Was this helpful?