Hello @Faizan_khan8171,
Thanks for your question.
In Unity Catalog, external location names must be unique within the metastore. This restriction prevents naming conflicts and ensures that every external location is easily identifiable and manageable. Therefore, you cannot use the same name for an external location in both test and production environments.
If you rename the external location in your test environment, you will need to manually update all references to this location, such as those in schemas, tables, pipelines, and access permissions. This is because these references are tied to the specific name of the external location.
To manage this effectively, consider the following best practices:
- Maintain a Clear Naming Convention: Establish different naming conventions for external locations in test and production environments to avoid conflicts and make it clear which environment a location belongs to.
- Update References Methodically: When renaming an external location, make a checklist of all places where this name is referenced (schemas, tables, pipelines, access permissions) and update them systematically.
- Test Changes in a Sandbox Environment: Before making changes in the production environment, test the renaming process and the updates to references in a sandbox environment to ensure there are no disruptions to your workflows