How to Browse the Registry¶
CLI¶
List Registry Components¶
Assuming you have already configured dsgrid to point to the right database (URL and name), you can list components by type: projects, datasets, dimensions, dimension mappings:
dsgrid registry projects list
dsgrid registry datasets list
dsgrid registry dimensions list
dsgrid registry dimension-mappings list
You can filter the output of each table like this:
dsgrid registry dimensions list -f Type==geography
You can also list all components at once:
dsgrid registry list
You can also browse different registries by specifying the database URL directly on the command line:
dsgrid -u sqlite:////projects/dsgrid/standard-scenarios.db registry list
Project Viewer¶
dsgrid provides a Dash application that allows you to browse the registry in a web UI.
Step 1: Set Environment Variables¶
Set these environment variables in preparation for starting the dsgrid API server:
export DSGRID_REGISTRY_DATABASE_URL=sqlite:///<your-db-path>
export DSGRID_QUERY_OUTPUT_DIR=api_query_output
export DSGRID_API_SERVER_STORE_DIR=.
Step 2: Start the Server¶
Start the dsgrid API server:
uvicorn dsgrid.api.app:app
Check the output for the address and port. The examples below assume that the server is running at http://127.0.0.1:8000.
Step 3: Start the Project Viewer App¶
Launch the project viewer application:
python dsgrid/apps/project_viewer/app.py
Next Steps¶
Learn about dataset registration
Explore querying projects
Understand the CLI reference