Data definition
ALTER LOCATION
Reference and syntax for the ALTER LOCATION statement.
Modifies an existing location object in your Firebolt account. You can use ALTER LOCATION to rename a location, update its URL, or modify its credentials while maintaining all dependent objects.
Topics:
Notes
- All identifiers are case-insensitive unless enclosed in double-quotes
- Location modifications maintain all dependent object relationships
- External tables using the location remain valid after modifications
- For more information about object identifiers, see Object identifiers
Syntax
Parameters
Parameter | Description |
---|---|
<location_name> | The identifier of the location to modify. |
<new_location_name> | The new identifier for the location. Must be a valid identifier, see Object identifiers. |
<new_url> | The new Amazon S3 URL in the format: s3://{bucket_name}/{path} |
<aws_access_key_id> | The AWS access key ID. |
<aws_secret_access_key> | The AWS secret access key. |
<aws_session_token> | The AWS session token. |
<aws_role_arn> | The AWS role ARN. |
<aws_role_external_id> | The AWS role external ID. |
IF EXISTS | Optional parameter that suppresses the error if the location doesn’t exist. |
Examples
Rename a location
Update location URL
Update credentials
Error handling
The following table lists common errors and their resolutions:
Error | Cause | Resolution |
---|---|---|
Invalid Identifier | New location name contains invalid characters or is a reserved keyword. | Use a valid identifier that starts with a letter and contains only letters, numbers, and underscores. |
Location Not Found | The specified location doesn’t exist or you lack permission to modify it. | Verify the location name and your permissions. Use IF EXISTS to handle non-existent locations. |
Name Conflict | The new location name is already in use. | Choose a different name or drop the existing location first. |
Invalid URL | The new URL is not a valid S3 URL. | Use the correct format: s3://{bucket_name}/{path} |
Invalid Credentials | Missing required credential parameters or invalid format. | Ensure all required credentials are provided and properly formatted. |