my skill -names
by @fisa712
Connect to TigerGraph distributed graph database to query, load, and manage large-scale knowledge graph data using GSQL and REST++ APIs
clawhub install tigergraph-connectorπ About This Skill
name: tigergraph_connector description: Connect to TigerGraph distributed graph database to query, load, and manage large-scale knowledge graph data using GSQL and REST++ APIs category: integrations tags: - knowledge-graph - tigergraph - graph-database - gsql - graph-analytics - distributed-graph - real-time-analytics - graph-algorithms - integration version: 1.0.0 author: kg-dev-skills
TigerGraph Connector
Purpose
This skill enables comprehensive interaction with TigerGraph graph database for storing, querying, analyzing, and managing large-scale knowledge graph data.
TigerGraph is a high-performance distributed graph database platform optimized for:
Key Capabilities
When To Use This Skill
Use this skill when:
Example Triggers
Connection Configuration
Connection Parameters
{
"host": "http://localhost",
"restpp_port": 9000,
"graph_name": "MyGraph",
"api_token": "your-api-token",
"timeout": 30,
"retry_count": 3
}
Configuration Details
| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | host | string | required | TigerGraph server URL | | restpp_port | integer | 9000 | REST++ API port | | graph_name | string | required | Graph name to work with | | api_token | string | required | Authentication token | | timeout | integer | 30 | Request timeout in seconds | | retry_count | integer | 3 | Number of retries | | username | string | optional | Alternative authentication | | password | string | optional | Alternative authentication |
Authentication Methods
Core Concepts
GSQL (Graph Search Query Language)
Example Query:
CREATE QUERY getNeighbors(VERTEX person) FOR GRAPH MyGraph {
Start = {person};
Result = SELECT t
FROM Start:s -(KNOWS:e)-> Person:t;
PRINT Result;
}
Graph Schema
#### Vertex Types
#### Edge Types
#### Properties
REST++ APIs
GSQL Query Patterns
Basic Query Structure
CREATE QUERY queryName(PARAMETERS) FOR GRAPH graphName {
// Variable declarations
// Pattern matching
// Aggregations
// Output
}
Vertex Pattern Matching
#### Query Single Vertex Type
Start = {Person.*};
Result = SELECT * FROM Start;
#### Query Multiple Vertex Types
Start = {Person.* UNION Company.*};
Result = SELECT * FROM Start;
Traversal Patterns
#### Single-Hop Traversal
Result = SELECT t
FROM Start:s -(KNOWS:e)-> Person:t;
#### Multi-Hop Traversal
Result = SELECT t
FROM Start:s -(KNOWS:e)-> Person:t -(WORKS_AT:e2)-> Company:c;
#### Variable-Length Traversal
Result = SELECT t
FROM Start:s -(KNOWS:e)->* Person:t;
Aggregation Patterns
#### Count Aggregation
Result = SELECT COUNT(DISTINCT t)
FROM Start:s -(KNOWS:e)-> Person:t;
#### Property Aggregation
Result = SELECT s.name, COUNT(DISTINCT t)
FROM Start:s -(KNOWS:e)-> Person:t
GROUP BY s.name;
Filtering Patterns
#### Where Clause
Result = SELECT *
FROM Start
WHERE age > 25 AND status == "active";
#### Having Clause
Result = SELECT s.name, COUNT(DISTINCT t) as cnt
FROM Start:s -(KNOWS:e)-> Person:t
GROUP BY s.name
HAVING cnt > 5;
Data Loading Operations
Insert Vertices
{
"vertices": {
"Person": {
"alice": {
"name": "Alice",
"age": 30,
"email": "alice@example.com"
},
"bob": {
"name": "Bob",
"age": 25,
"email": "bob@example.com"
}
}
}
}
Insert Edges
{
"edges": {
"Person": {
"alice": {
"KNOWS": {
"Person": {
"bob": {
"since": "2020-01-15"
}
}
}
}
}
}
}
Batch Loading
#### CSV File Loading
connector.load_from_csv(
file_path="data.csv",
vertex_type="Person",
mapping={"name": "Name", "age": "Age"}
)
Graph Algorithms
Built-In Algorithms
#### PageRank
RUN QUERY pagerank(max_iterations=100, damping_factor=0.85)
Measures vertex importance in the graph.
#### Shortest Path
RUN QUERY shortest_path(source_vertex, target_vertex)
Finds shortest path between two vertices.
#### Community Detection
RUN QUERY louvain_community(resolution=1.0)
Detects communities/clusters in graph.
#### Centrality Analysis
RUN QUERY betweenness_centrality()
Measures vertex betweenness centrality.
Custom Algorithms
Can be defined using GSQL for specific use cases.
Query Execution Patterns
Simple Query Execution
result = connector.run_query(
query_name="getNeighbors",
parameters={"person": "Alice"}
)
Query with Timeout
result = connector.run_query(
query_name="complexQuery",
parameters={...},
timeout=60
)
Batch Query Execution
results = connector.batch_query(
queries=[
{"name": "query1", "params": {...}},
{"name": "query2", "params": {...}}
]
)
Error Handling
Common Error Scenarios
| Error | Cause | Solution | |-------|-------|----------| | Connection refused | Server not running | Start TigerGraph server | | Unauthorized | Invalid token | Regenerate API token | | Query not found | Query not installed | Install query definition | | Timeout | Query too slow | Optimize query, increase timeout | | Graph not found | Wrong graph name | Verify graph name |
Error Handling Best Practices
1. Validate Connections - Check before operations 2. Handle Retries - Implement exponential backoff 3. Log Errors - Track all errors for debugging 4. Graceful Degradation - Handle partial failures 5. Timeout Management - Set appropriate timeouts
Best Practices
1. Query Design
β Use installed queries for performance β Pre-compile queries instead of dynamic ones β Optimize pattern matching β Use appropriate graph traversal depth β Leverage built-in algorithms2. Data Loading
β Use batch loading for bulk data β Validate data before loading β Use atomic transactions β Monitor loading progress β Handle duplicates appropriately3. Performance
β Create indexes on frequently queried properties β Monitor query execution plans β Use result streaming for large datasets β Cache frequently accessed data β Distribute computation across nodes4. Schema Management
β Design schema for query patterns β Use appropriate data types β Maintain referential integrity β Document schema changes β Version schema updates5. Analytics
β Use built-in graph algorithms β Tune algorithm parameters β Monitor resource usage β Implement incremental updates β Cache algorithm results6. Scalability
β Partition data appropriately β Use distributed loading β Monitor cluster health β Balance load across nodes β Plan capacity growth7. Security
β Protect API tokens β Use HTTPS connections β Implement access control β Audit all operations β Encrypt sensitive data8. Maintenance
β Monitor database health β Regular backups β Update software regularly β Archive old data β Clean up temporary dataIntegration with Related Skills
Neo4j Integration
JanusGraph Connector
RDF Triple Store Integration
Graph Query Optimization
REST API Wrapper
Libraries & Dependencies
Core Libraries
| Library | Purpose | |---------|---------| | pyTigerGraph | Official Python SDK | | requests | HTTP client | | json | JSON handling |
Installation
pip install pyTigerGraph requests
Expected Benefits
Using this skill enables:
β Performance - High-speed graph processing at scale β Analytics - Advanced graph algorithms and analytics β Scalability - Enterprise-scale knowledge graph processing β Real-Time - Real-time graph computations β Flexibility - Support for complex graph patterns β Reliability - Enterprise-grade reliability and backup β Integration - Easy integration with applications
Quick Reference
Connection & Query
connector = TigerGraphConnector()
connector.connect(config)
result = connector.run_query("queryName", params)
connector.close()
Common Operations
# Insert vertices
connector.insert_vertices(vertex_type, vertices)Insert edges
connector.insert_edges(edge_type, edges)Run algorithm
connector.run_algorithm("pagerank", params)Get statistics
stats = connector.get_statistics()
Data Loading
connector.load_from_csv(file_path, vertex_type, mapping)
connector.batch_insert(vertices, edges)
Related Skills
Resources
Status: β Production Ready Version: 1.0.0 Last Updated: April 12, 2026