Read ORS Configuration
Detects the map region/location and routing profiles from the ORS configuration and displays them to the user.
Prerequisites
- Active Snowflake connection
- OpenRouteService App deployed
Output Parameters
<REGION_NAME>: The configured region name<ENABLED_PROFILES>: List of enabled vehicle profiles
Error Logging
Follow the Error Logging convention in AGENTS.md. Log file prefix:
routing-customization.
Workflow
Step 1: Extract Region Name from Service Definition
Goal: Determine the currently configured map region
Actions:
- Describe the ORS service to get the service spec:
DESCRIBE SERVICE OPENROUTESERVICE_APP.CORE.ORS_SERVICE;- Parse the service spec from the output to find the configured
<REGION_NAME>for the service:/home/ors/files/<REGION_NAME>.osm.pbf - Extract
<REGION_NAME>(e.g., "SanFrancisco", "great-britain-latest", "paris")
- Parse the service spec from the output to find the configured
Output: <REGION_NAME> extracted
Step 2: Extract Enabled Routing Profiles
Goal: Determine which vehicle profiles are currently enabled
Actions:
Download the ORS config file from stage:
If using Snow CLI (local environment):
snow stage copy @OPENROUTESERVICE_APP.CORE.ORS_SPCS_STAGE/<REGION_NAME>/ors-config.yml .cortex/skills/install-fleet-apps/openrouteservice_app/staged_files/ --connection <ACTIVE_CONNECTION> --overwriteIf using Snowflake Workspace: Use SQL to read from stage:
SELECT $1 AS config_content FROM @OPENROUTESERVICE_APP.CORE.ORS_SPCS_STAGE/<REGION_NAME>/ors-config.yml (FILE_FORMAT => 'OPENROUTESERVICE_APP.CORE.TEXT_FILE_FORMAT');(Create text file format if needed:
CREATE FILE FORMAT IF NOT EXISTS TEXT_FILE_FORMAT TYPE = 'CSV' FIELD_DELIMITER = NONE RECORD_DELIMITER = NONE;)Read the config content (file or query result)
Parse the downloaded file for
profiles:entries withenabled: true- Common profiles:
driving-car,driving-hgv,cycling-electric,cycling-regular,foot-walking
- Common profiles:
Output: <ENABLED_PROFILES> extracted
Step 3: Display Configuration to User
Goal: Present the current ORS configuration
Actions:
- Display the following to the user:
- Configured Map Region:
<REGION_NAME> - Configured Vehicle profiles:
<ENABLED_PROFILES>
- Configured Map Region:
Output: ORS configuration displayed to the user
Stopping Points
- ✋ After Step 1: Verify DESCRIBE SERVICE returned a valid spec before downloading config
- ✋ After Step 2: Confirm config file was downloaded and profiles parsed correctly
Error Handling
| Issue | Solution |
|---|---|
| DESCRIBE SERVICE fails | ORS App not installed or service not created. Install via install-fleet-apps skill |
| Config file download fails | Service may be running with default config. Check stage path matches <REGION_NAME> from Step 1 |
| No profiles found in config | Config file may be malformed. Check ors.engine.profiles section exists in the YAML |