Creating Code
Create Python or SQL code for data processing.
Step 1: Select Type
- Select the Code card.
- Choose a language.
- Python: Implement complex logic such as dataframe processing
- SQL: Write data query and aggregation queries
Step 2: Basic Info
- Name: Code name (required)
- Packages (Python only): List of required libraries (e.g.,
pandas, numpy) - Description, Tags, and other metadata input
Step 3: Code Content
[Screenshot] Code editor screen of the code creation wizard (with AI inline chat popup active)
Write logic using the built-in code editor.
AI Code Assistant
The editor has a powerful AI coding assistant built in.
- Inline Chat: Press
Ctrl+I(orCmd+I) to request code from AI in natural language.- Example: "Remove null values from the input data and sort by date"
- Code Explanation: Select written code and request an explanation from AI.
Default Templates
When you select a language, template code with a basic execution structure is automatically provided.
Python example:
def run(input, options):
# input: input dataframe
# write logic
return {"output": input}
SQL example:
SELECT * FROM input
Completion
Once the code is complete, click the Create (or Submit Code) button to save the code.