graphistry.compute.gfql_validation package#
Note
Deprecated. Use graphistry.compute.gfql instead. This module only re-exports
the GFQL validation APIs for backward compatibility.
DEPRECATED: Use graphistry.compute.gfql instead.
All functionality moved to graphistry.compute.gfql. Update imports:
From:
graphistry.compute.gfql_validationTo:
graphistry.compute.gfql
This duplicate module was created during code extraction and provides no additional functionality.
- exception graphistry.compute.gfql_validation.GFQLColumnNotFoundError(column, table, available_columns)#
Bases:
GFQLSchemaErrorRaised when a referenced column doesn’t exist in the schema.
- Parameters:
column (str)
table (str)
available_columns (list)
- exception graphistry.compute.gfql_validation.GFQLException(message, context=None)#
Bases:
ExceptionBase exception for all GFQL-related errors.
- Parameters:
message (str)
context (Dict[str, Any] | None)
- exception graphistry.compute.gfql_validation.GFQLSchemaError(message, context=None)#
Bases:
GFQLValidationErrorRaised when GFQL query references non-existent columns or has type mismatches.
- Parameters:
message (str)
context (Dict[str, Any] | None)
- exception graphistry.compute.gfql_validation.GFQLSyntaxError(message, context=None)#
Bases:
GFQLValidationErrorRaised when GFQL query has invalid syntax.
- Parameters:
message (str)
context (Dict[str, Any] | None)
- exception graphistry.compute.gfql_validation.GFQLTypeError(column, column_type, predicate, expected_type)#
Bases:
GFQLSchemaErrorRaised when a predicate is applied to incompatible column type.
- Parameters:
column (str)
column_type (str)
predicate (str)
expected_type (str)
- exception graphistry.compute.gfql_validation.GFQLValidationError(message, context=None)#
Bases:
GFQLException,ValueErrorBase validation error. Inherits from ValueError for backwards compatibility.
- Parameters:
message (str)
context (Dict[str, Any] | None)
- class graphistry.compute.gfql_validation.Schema(node_columns=None, edge_columns=None)#
Bases:
objectRepresents the schema of node and edge dataframes.
- Parameters:
node_columns (Dict[str, str] | None)
edge_columns (Dict[str, str] | None)
- class graphistry.compute.gfql_validation.ValidationIssue(level, message, operation_index=None, field=None, suggestion=None, error_type=None)#
Bases:
objectRepresents a validation issue (error or warning).
- Parameters:
level (str)
message (str)
operation_index (int | None)
field (str | None)
suggestion (str | None)
error_type (str | None)
- to_dict()#
Convert to dictionary for JSON serialization.
- Return type:
Dict[str, Any]
- graphistry.compute.gfql_validation.extract_schema(g)#
Extract schema from a Plottable object.
- Args:
g: Plottable object with node/edge data
- Returns:
Schema object
- graphistry.compute.gfql_validation.extract_schema_from_dataframes(nodes_df=None, edges_df=None)#
Extract schema from pandas DataFrames.
- Args:
nodes_df: Optional node dataframe edges_df: Optional edge dataframe
- Returns:
Schema object with column names and types
- Parameters:
nodes_df (DataFrame | None)
edges_df (DataFrame | None)
- Return type:
- graphistry.compute.gfql_validation.format_validation_errors(issues)#
Format validation errors for human/LLM consumption.
- Args:
issues: List of validation issues
- Returns:
Formatted error string
- Parameters:
issues (List[ValidationIssue])
- Return type:
str
- graphistry.compute.gfql_validation.suggest_fixes(chain, issues)#
Generate fix suggestions for validation issues.
- Args:
chain: The problematic chain issues: Validation issues found
- Returns:
List of suggested fixes
- Parameters:
chain (Chain | List)
issues (List[ValidationIssue])
- Return type:
List[str]
- graphistry.compute.gfql_validation.validate_query(chain, nodes_df=None, edges_df=None)#
Combined syntax and schema validation.
- Args:
chain: GFQL chain or list of operations nodes_df: Optional node dataframe for schema validation edges_df: Optional edge dataframe for schema validation
- Returns:
List of validation issues
- Parameters:
chain (Chain | List)
nodes_df (DataFrame | None)
edges_df (DataFrame | None)
- Return type:
List[ValidationIssue]
- graphistry.compute.gfql_validation.validate_schema(chain, schema)#
Validate query against data schema.
- Args:
chain: GFQL chain or list of operations schema: Schema object with column information
- Returns:
List of validation issues
- Parameters:
- Return type:
List[ValidationIssue]
- graphistry.compute.gfql_validation.validate_syntax(chain)#
Validate GFQL query syntax without requiring data.
- Args:
chain: GFQL chain or list of operations
- Returns:
List of validation issues (errors and warnings)
- Parameters:
chain (Chain | List)
- Return type:
List[ValidationIssue]