pub fn read_sql(
query: &str,
connection_uri: impl ToString,
) -> Result<Vec<RecordBatch>, ConnectorXOutError>Expand description
Executes query against a Redshift cluster described by a JDBC-style IAM connection URI
and returns the results as Arrow RecordBatches.
§URI format
[jdbc:]redshift:iam://<user>:<password>@<host>:<port>/<database>?<params>The jdbc: prefix is optional and stripped automatically. Supported query parameters
(all case-insensitive):
| Parameter | Description |
|---|---|
ClusterID | Redshift cluster identifier (required for IAM auth) |
Region | AWS region (default: us-east-1) |
AutoCreate | true to auto-create the DB user |
IdP_Host | IdP hostname. If absent, falls back to ambient AWS credentials |
IdP_Port | IdP port (default: 443) |
Plugin_Name | SAML provider variant (e.g. PingCredentialsProvider). Maps to PluginName. |
Preferred_Role | IAM role ARN to assume via SAML |
When IdP_Host and a password are present the Plugin_Name parameter is
parsed into a PluginName variant and looked up in the global registry.
PluginName::PingCredentialsProvider is pre-registered. All other variants
must be registered first via register_provider.
§Errors
Returns ConnectorXOutError::SourceNotSupport if the URI does not start with
redshift:iam://.