Overview
TheQueryEngine class provides powerful graph traversal and analysis capabilities for the Engineering Knowledge Graph. It enables you to explore relationships, find dependencies, analyze impact, and understand ownership across your engineering assets.
Initialization
Core Capabilities
The QueryEngine provides several categories of operations:Dependency Analysis
- Downstream dependencies: Find what a node depends on
- Upstream dependencies: Find what depends on a node
- Blast radius: Full impact analysis including affected teams
Path Finding
- Shortest path: Find connections between any two nodes
Ownership
- Get owner: Find the team that owns an asset
- Get team assets: List all assets owned by a team
Basic Usage
Method Reference
downstream()
Get transitive dependencies
upstream()
Get transitive dependents
blast_radius()
Full impact analysis
path()
Find shortest path between nodes
Ownership Methods
Team ownership operations
Return Types
All query methods return standard Python data structures:- Node lists return
List[Dict[str, Any]] - Single nodes return
Optional[Dict[str, Any]] - Complex results return
Dict[str, Any]with structured data
Performance Considerations
- Use
max_depthto limit traversal depth and prevent performance issues - Filter by
edge_typesto narrow results and improve query speed - Large graphs may require tuning of depth parameters