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_identifierparameter must be set tofalse(default setting) for your Redshift cluster.CREATE_DATA_SOURCEImmuta permissionThe Redshift user registering data sources must have the following privileges on all securables:
USAGEon all schemas with registered data sourcesSELECTon 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: trueCopy the snippet above and save it as a YAML file. Replace the configuration values with your own, where
hostname is the URL of your Redshift account.
database is the name of the existing or new database that the Immuta system user will manage and store metadata in.
username and password are the credentials for the system account that can act on Redshift objects and configure the integration.
schema is the name of the external schema in the database.
Run
immuta datasource save <filepath> [--wait int] [--dryRun], referencing the file you just created. The options you can specify include-dor--dryRun: No updates will actually be made to the data source(s).-hor--help: Get more information about the command.-wor--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.
Avoid schema name conflicts
Your nativeSchemaFormat must contain _immuta to avoid schema name conflicts.
Create a data source using the Immuta V2 API
Copy the request example. The example provided uses JSON format, but the request also accepts YAML.
Replace the Immuta URL and API key with your own.
Change the config values to your own, where
hostname is the URL of your Redshift account.
database is the name of the existing or new database that the Immuta system user will manage and store metadata in.
username and password are the credentials for the system account that can act on Redshift objects and configure the integration.
schema is the name of the external schema in the database.
Avoid schema name conflicts
Your nativeSchemaFormat must contain _immuta to avoid schema name conflicts.
Path parameters
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.
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
nameTemplate object
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?

