generate_pyspark_code
Generate PySpark code for common data operations like reading, writing, transforming, joining, and aggregating lakehouse tables using operation, table, column, and filter inputs.
Instructions
Generate PySpark code for common operations.
Args:
operation: Type of operation ('read_table', 'write_table', 'transform', 'join', 'aggregate')
source_table: Source table name (format: lakehouse.table_name)
target_table: Target table name (format: lakehouse.table_name)
columns: Comma-separated list of columns
filter_condition: Filter condition for data
ctx: Context object containing client information
Returns:
A string containing the generated PySpark code or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | No | ||
| operation | Yes | ||
| source_table | No | ||
| target_table | No | ||
| filter_condition | No |