Skip to main content

read_sql

Function read_sql 

Source
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):

ParameterDescription
ClusterIDRedshift cluster identifier (required for IAM auth)
RegionAWS region (default: us-east-1)
AutoCreatetrue to auto-create the DB user
IdP_HostIdP hostname. If absent, falls back to ambient AWS credentials
IdP_PortIdP port (default: 443)
Plugin_NameSAML provider variant (e.g. PingCredentialsProvider). Maps to PluginName.
Preferred_RoleIAM 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://.