Version 4.43 or later needs to be installed to add the server automatically
Tools
| Name | Description |
|---|---|
list_columns | List all columns in a specified table within a Redshift schema. This tool queries the SVV_ALL_COLUMNS system view to discover all columns that the user has access to in the specified table, including detailed information about data types, constraints, and column properties. ## Usage Requirements - Ensure your AWS credentials are properly configured (via AWS_PROFILE or default credentials). - The cluster must be available and accessible. - Required IAM permissions: redshift-data:ExecuteStatement, redshift-data:DescribeStatement, redshift-data:GetStatementResult. - The user must have access to the database to query system views. ## Parameters - cluster_identifier: The unique identifier of the Redshift cluster to query. IMPORTANT: Use a valid cluster identifier from the list_clusters tool. - column_database_name: The database name to list columns for. IMPORTANT: Use a valid database name from the list_databases tool. - column_schema_name: The schema name to list columns for. IMPORTANT: Use a valid schema name from the list_schemas tool. - column_table_name: The table name to list columns for. IMPORTANT: Use a valid table name from the list_tables tool. ## Response Structure Returns a list of RedshiftColumn objects with the following structure: - database_name: The name of the database. - schema_name: The name of the schema. - table_name: The name of the table. - column_name: The name of the column. - ordinal_position: The position of the column in the table. - column_default: The default value of the column. - is_nullable: Whether the column is nullable (yes or no). - data_type: The data type of the column. - character_maximum_length: The maximum number of characters in the column. - numeric_precision: The numeric precision. - numeric_scale: The numeric scale. - remarks: Remarks about the column. ## Usage Tips 1. First use list_clusters to get valid cluster identifiers. 2. Then use list_databases to get valid database names for the cluster. 3. Then use list_schemas to get valid schema names for the database. 4. Then use list_tables to get valid table names for the schema. 5. Ensure the cluster status is 'available' before querying columns. 6. Note data types and constraints for query planning and data validation. ## Interpretation Best Practices 1. Use ordinal_position to understand column order in the table. 2. Check is_nullable for required vs optional fields. 3. Use data_type information for proper data handling in queries. 4. Consider character_maximum_length for string field validation. 5. Use numeric_precision and numeric_scale for numeric field handling. 6. Use column names for SELECT statements and query construction. |
list_schemas | List all schemas in a specified database within a Redshift cluster. This tool queries the SVV_ALL_SCHEMAS system view to discover all schemas that the user has access to in the specified database, including local schemas, external schemas, and shared schemas from datashares. ## Usage Requirements - Ensure your AWS credentials are properly configured (via AWS_PROFILE or default credentials). - The cluster must be available and accessible. - Required IAM permissions: redshift-data:ExecuteStatement, redshift-data:DescribeStatement, redshift-data:GetStatementResult. - The user must have access to the database to query system views. ## Parameters - cluster_identifier: The unique identifier of the Redshift cluster to query. IMPORTANT: Use a valid cluster identifier from the list_clusters tool. - schema_database_name: The database name to list schemas for. Also used to connect to. IMPORTANT: Use a valid database name from the list_databases tool. ## Response Structure Returns a list of RedshiftSchema objects with the following structure: - database_name: The name of the database where the schema exists. - schema_name: The name of the schema. - schema_owner: The user ID of the schema owner. - schema_type: The type of the schema (external, local, or shared). - schema_acl: The permissions for the specified user or user group for the schema. - source_database: The name of the source database for external schema. - schema_option: The options of the schema (external schema attribute). ## Usage Tips 1. First use list_clusters to get valid cluster identifiers. 2. Then use list_databases to get valid database names for the cluster. 3. Ensure the cluster status is 'available' before querying schemas. 4. Note schema types to understand if they are local, external, or shared. 5. External schemas connect to external data sources like S3 or other databases. ## Interpretation Best Practices 1. Focus on 'local' schema types for cluster-native schemas. 2. 'external' schema types indicate connections to external data sources. 3. 'shared' schema types indicate schemas from datashares. 4. Use schema names for subsequent table and column discovery. 5. Consider schema permissions (schema_acl) for access planning. |
list_tables | List all tables in a specified schema within a Redshift database. This tool queries the SVV_ALL_TABLES system view to discover all tables that the user has access to in the specified schema, including base tables, views, external tables, and shared tables. ## Usage Requirements - Ensure your AWS credentials are properly configured (via AWS_PROFILE or default credentials). - The cluster must be available and accessible. - Required IAM permissions: redshift-data:ExecuteStatement, redshift-data:DescribeStatement, redshift-data:GetStatementResult. - The user must have access to the database to query system views. ## Parameters - cluster_identifier: The unique identifier of the Redshift cluster to query. IMPORTANT: Use a valid cluster identifier from the list_clusters tool. - table_database_name: The database name to list tables for. IMPORTANT: Use a valid database name from the list_databases tool. - table_schema_name: The schema name to list tables for. IMPORTANT: Use a valid schema name from the list_schemas tool. ## Response Structure Returns a list of RedshiftTable objects with the following structure: - database_name: The name of the database where the table exists. - schema_name: The schema name for the table. - table_name: The name of the table. - table_acl: The permissions for the specified user or user group for the table. - table_type: The type of the table (views, base tables, external tables, shared tables). - remarks: Remarks about the table. ## Usage Tips 1. First use list_clusters to get valid cluster identifiers. 2. Then use list_databases to get valid database names for the cluster. 3. Then use list_schemas to get valid schema names for the database. 4. Ensure the cluster status is 'available' before querying tables. 5. Note table types to understand if they are base tables, views, external tables, or shared tables. ## Interpretation Best Practices 1. Focus on 'TABLE' table types for regular database tables. 2. 'VIEW' table types indicate database views. 3. 'EXTERNAL TABLE' types indicate connections to external data sources. 4. 'SHARED TABLE' types indicate tables from datashares. 5. Use table names for subsequent column discovery and query operations. 6. Consider table permissions (table_acl) for access planning. |