Alibabacloud Odps Maxframe Coding
Use this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official exa... Skill: Alibabacloud Odps Maxframe Coding Owner: sdk-team Summary: Use this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official exa... Tags: latest:0.0.2 Version history: v0.0.2 | 2026-06-02T09:40:39.558Z | auto - Added support for MaxFrame documentation and API navigation—users can now ask questions about MaxFrame APIs, conce
Rank
62
Safety
84
Downloads
4.4k
Updated
Oct 9, 2026
Version
0.0.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 4.4K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 4.4K downloadsadoption · observed Oct 9, 2026
- Latest release
- 0.0.2release · observed Jun 2, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-odps-maxframe-coding- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-odps-maxframe-coding/snapshot"
Documentation
CLAWHUB
158,534 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
references/common-workflow.md
# Common Workflow Complete Guide
Detailed guide for the complete MaxFrame development workflow with comprehensive examples.
## Session Setup Patterns
### Pattern 1: Auto-detect (DataWorks/MaxCompute Notebook)
```python
import os
import maxframe.dataframe as md
from maxframe.session import new_session
from odps import ODPS
# Auto-detect from environment (preferred in DataWorks/MaxCompute Notebook)
session = new_session()
```
### Pattern 2: Explicit ODPS Connection
```python
import os
import dotenv
import maxframe.dataframe as md
from maxframe.session import new_session
from odps import ODPS
dotenv.load_dotenv()
o = ODPS(
access_id=os.getenv("ODPS_ACCESS_ID"),
secret_access_key=os.getenv("ODPS_ACCESS_KEY"),
project=os.getenv("ODPS_PROJECT"),
endpoint=os.getenv("ODPS_ENDPOINT"),
user_agent='AlibabaCloud-Agent-Skills/alibabacloud-odps-maxframe-coding'
)
session = new_session(o)
```
### Pattern 3: Production-ready Session
```python
import logging
import maxframe.dataframe as md
from maxframe.session import new_session
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
session = new_session()
try:
logger.info(f"Session created. Logview: {session.get_logview_address()}")
# Your operations
...
finally:
session.destroy()
logger.info("Session destroyed")
```
## Reading Data Patterns
### Pattern 1: Basic Table Read
```python
# Read from MaxCompute table
df = md.read_odps_table("table_name")
# Read with index column
df = md.read_odps_table("table_name", index_col="id")
# With column selection
df = md.read_odps_table("table_name", columns=['id', 'value', 'timestamp'])
# With partition filter
df = md.read_odps_table("table_name", partition='ds=2024-01-01')
```
### Pattern 2: SQL Query Read
```python
# Read from SQL query with filters
df = md.read_odps_query(
"SELECT * FROM table WHERE date >= '2024-01-01' AND status = 'active'"
)
# Complex SQL with joins
df = md.read_odps_query(
"SELECT a.*, b.value FROM table_a a JOIN table_b b ON a.id = b.id"
)
```
### Pattern 3: Sample Data Construction
When user doesn't provide input table name, construct pandas DataFrame:
```python
import pandas as pd
import numpy as np
# Time series analysis example
example_pd_df = pd.DataFrame({
'timestamp': pd.date_range('2026-01-01', periods=1000, freq='H'),
'metric_name': np.random.choice(['cpu', 'memory', 'disk'], 1000),
'value': np.random.randn(1000) * 10 + 50,
'host_id': np.random.choice(['host1', 'host2', 'host3'], 1000)
})
# Load into MaxFrame
df = md.read_pandas(example_pd_df)
```
**Key guidelines for sample data:**
- Match data types and structure to job requirements
- Use realistic value ranges for the domain
- Include 100-1000 rows to demonstrate logic
- Use descriptive column names matching operations
## Operator Selection Workflow
### Step 1: Identify Required Operations
Break down the task into specific operations needed:
- Filtering
- Grouping
- Aggregreferences/installation.md
# MaxFrame Installation Guide
This guide provides step-by-step instructions for installing and configuring MaxFrame for distributed data processing on MaxCompute.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Dependencies](#dependencies)
- [Environment Configuration](#environment-config)
- [Required Environment Variables](#required-environment-variables)
- [Setting Environment Variables](#setting-environment-variables)
- [Find Your MaxCompute Endpoint](#find-your-maxcompute-endpoint)
- [Installation Verification](#installation-verification)
- [Session Setup](#session-setup)
- [Manual Session Creation](#manual-session-creation)
- [Auto-Detect from Environment](#auto-detect-from-environment)
- [Troubleshooting](#troubleshooting)
- [Common Issues](#common-issues)
- [Getting Help](#getting-help)
- [Next Steps](#next-steps)
- [Cleanup](#cleanup)
## Prerequisites
- Python 3.7 or higher
- MaxCompute (ODPS) account with valid credentials
- Access to a MaxCompute project
## Dependencies
Install the required Python packages:
```bash
pip install maxframe -U
```
The required packages are:
- **maxframe** - MaxFrame SDK for distributed data processing
- **pyodps** - ODPS Python SDK for MaxCompute access
- **pandas** - Data manipulation library (for pandas-compatible APIs)
## Environment Configuration
### Required Environment Variables
Configure the following environment variables to authenticate with MaxCompute:
| Variable | Description |
|----------|-------------|
| `ODPS_ACCESS_ID` | MaxCompute access ID (username) |
| `ODPS_ACCESS_KEY` | MaxCompute access key (password) |
| `ODPS_PROJECT` | MaxCompute project name |
| `ODPS_ENDPOINT` | MaxCompute endpoint URL |
### Setting Environment Variables
#### Option 1: Set in Shell
```bash
export ODPS_ACCESS_ID="your_access_id"
export ODPS_ACCESS_KEY="your_access_key"
export ODPS_PROJECT="your_project_name"
export ODPS_ENDPOINT="your_endpoint"
```
#### Option 2: Use .env File
Create a `.env` file in your project directory:
```env
ODPS_ACCESS_ID=your_access_id
ODPS_ACCESS_KEY=your_access_key
ODPS_PROJECT=your_project_name
ODPS_ENDPOINT=your_endpoint
```
Then load the environment variables in Python:
```python
from dotenv import load_dotenv
load_dotenv()
```
### Find Your MaxCompute Endpoint
MaxCompute endpoints vary by region, check the [MaxCompute documentation](https://www.alibabacloud.com/help/zh/maxcompute/user-guide/endpoints?spm=a2c63.p38356.help-menu-search-27797.d_0) for the correct endpoint for your region.
## Installation Verification
Verify your installation by running the following Python script:
```python
import os
from dotenv import load_dotenv
from odps import ODPS
from maxframe.session import new_session
# Load environment variables
load_dotenv()
# Create ODPS connection
o = ODPS(
access_id=os.getenv("ODPS_ACCESS_ID"),
secret_access_key=os.getenv("ODPS_ACCESS_KEY"),
project=os.getenv("ODPS_PROJECT"),
endpoint=os.getenv("ODPS_ENDPOIreferences/local-debug-guide.md
# MaxFrame Local Debug Mode Guide
This guide provides comprehensive instructions for using MaxFrame's local debug mode, which enables offline UDF development with full IDE debugging support.
## Overview
MaxFrame Local Debug Mode is designed for data development engineers to debug UDF (User-Defined Functions) locally without connecting to remote MaxCompute services. It provides a seamless development experience with IDE breakpoint support for functions like `apply()` and `apply_chunk()`.
## Core Value
| Feature | Traditional Approach | Local Debug Mode |
|---------|---------------------|------------------|
| Breakpoint Debugging | ❌ Not supported | ✅ Full IDE support |
| Remote Dependency | ❌ Requires cluster connection | ✅ Completely offline |
| Debug Cycle | ❌ Submit to remote each time | ✅ Local immediate execution |
| Code Changes | ❌ Multiple code versions | ✅ Same code for dev/prod |
### Key Benefits
1. **Zero-Configuration Startup**: Simply use `debug=True` or `debug="local"` - no additional tools or services required
2. **Completely Offline**: No dependency on network or remote cluster resources
3. **Native IDE Support**: Breakpoints, variable inspection, step-by-step execution - all debugging capabilities preserved
4. **Flexible Data Sources**: Support for in-memory data, local files, or MaxCompute tables
5. **Seamless Production Switch**: Remove `debug=True` parameter and code runs directly in production
## When to Use Local Debug Mode
Use local debug mode when:
- Developing UDF functions (`apply`, `apply_chunk`)
- Need IDE breakpoints and step-by-step debugging
- Want to debug offline without network access
- Working on complex logic that requires iterative testing
- Need to verify data transformation logic quickly
**Use remote debug mode instead when:**
- Testing with production-scale data on MaxCompute
- Need to verify execution on actual cluster
- Investigating runtime issues that require logview URLs
- Debugging distributed execution problems
## Quick Start
### Prerequisites
```bash
pip install --upgrade maxframe # Requires MaxFrame SDK 2.5.0 or later
```
### Basic Example
```python
from odps import ODPS
from maxframe import new_session
import maxframe.dataframe as md
import pandas as pd
# Initialize ODPS object
# Note: In local debug mode, ODPS object is only used for schema validation
# Actual credentials are not used for execution
o = ODPS(
access_id=os.getenv('ODPS_ACCESS_ID', 'dummy_access_id'),
secret_access_key=os.getenv('ODPS_ACCESS_KEY', 'dummy_secret_key'),
project=os.getenv('ODPS_PROJECT', 'dummy_project'),
endpoint=os.getenv('ODPS_ENDPOINT', 'dummy_endpoint'),
user_agent='AlibabaCloud-Agent-Skills/alibabacloud-odps-maxframe-coding'
)
# Enable local debug mode
session = new_session(o, debug=True)
# Prepare sample data
df = md.DataFrame(pd.DataFrame({
"sales": [5000, 8000, 12000, 3000],
"region": ["A", "B", "C", "D"]
}))
def calculate_commission(row):
sales = row['sales']references/maxframe-client-docs/getting_started/comparison/index.md
# Comparison with other tools * [Comparison with PyODPS DataFrame](pyodps_df.md) * [Object abstraction](pyodps_df.md#object-abstraction) * [Functions](pyodps_df.md#functions) * [Execution](pyodps_df.md#execution)
references/maxframe-client-docs/getting_started/comparison/pyodps_df.md
# Comparison with PyODPS DataFrame
[PyODPS DataFrame](https://pyodps.readthedocs.io/en/stable/df.html) is
a DataFrame-like package provided by MaxCompute as a part of PyODPS package.
It provides capability for Python data analyzers to query MaxCompute data
with a set of operators similar to pandas. Despite the similarity in operators,
the usage between two sets of APIs are quite different. It might not be easy
for a developer to dive deep into PyODPS DataFrame with knowledge about
pandas only.
Though PyODPS DataFrame is still part of PyODPS, it is recommended to create
new applications with MaxFrame to enjoy its compatibility with pandas.
## Object abstraction
PyODPS DataFrame does not have indexes. This means that a majority of pandas
APIs with indexes cannot be used or not fully supported.
For instance, arithmetic operations in pandas relies on index alignment. That
is, two DataFrames are aligned first, and then arithmetic operation is performed.
```python
>>> series1 = pd.Series([2, 1, 3], index=[1, 2, 4])
>>> series2 = pd.Series([1, 5, 6], index=[1, 3, 4])
>>> series1 + series2
1 3.0
2 NaN
3 NaN
4 9.0
dtype: float64
```
However, when indexes are absent, this kind of operation is not supported.
To support this kind of operation, in MaxFrame, it is required to add an index
column to DataFrame or Series. If the index is absent, a default RangeIndex
is added. Therefore the statement above can be supported.
Another huge difference between PyODPS DataFrame and MaxFrame is that in PyODPS
DataFrame, representation of data objects and operators are mixed, and this
may confuse newcomers. For instance,
```python
df = o.get_table('table_name').to_df() # df is a DataFrame instance
df2 = df["col1", "col2"] # df2 is a CollectionExpr instance
```
In the second line, `df2` is an instance of `CollectionExpr` which means
it is an expression and different from a `DataFrame` instance. However, all
DataFrame functions can be applied directly onto `df2` and there is nothing
different from `DataFrame` instance.
In MaxFrame, however, data objects and operators are defined separately. Data
objects users interact with are all instances of a few data classes, namely
`DataFrame`, `Series` or `Index`. For the example above, now all
instances are DataFrame now.
```python
df = md.read_odps_table('table_name') # df is a DataFrame instance
df2 = df[["col1", "col2"]] # df2 is also a DataFrame instance
```
## Functions
Functions in PyODPS DataFrame are not fully compatible with pandas. Therefore
to write code with PyODPS DataFrame, users need to read the documents first
before start coding. However, the target of MaxFrame is to create a pandas-compatible
API. Hence there are API differences between PyODPS DataFrame and MaxFrame.
These differences are listed below. Methods starts with `mf.` mean that these non-pandas
methods are added in MaxFrame to facilitate migrating from PyODPS DataFrame to MaxFrame.
Note that you need to read API documents of activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/sdk-team/skills/alibabacloud-odps-maxframe-coding",
"sourceUrl": "https://clawhub.ai/sdk-team/skills/alibabacloud-odps-maxframe-coding",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T05:30:50.389Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-odps-maxframe-coding/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-odps-maxframe-coding/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T05:30:50.389Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "4.4K downloads",
"href": "https://clawhub.ai/sdk-team/alibabacloud-odps-maxframe-coding",
"sourceUrl": "https://clawhub.ai/sdk-team/alibabacloud-odps-maxframe-coding",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T05:30:50.389Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "0.0.2",
"href": "https://clawhub.ai/sdk-team/alibabacloud-odps-maxframe-coding",
"sourceUrl": "https://clawhub.ai/sdk-team/alibabacloud-odps-maxframe-coding",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-06-02T09:40:39.558Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-odps-maxframe-coding/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-odps-maxframe-coding/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 0.0.2",
"description": "- Added support for MaxFrame documentation and API navigation—users can now ask questions about MaxFrame APIs, concepts, usage, and compatibility. - Enhanced scenario detection logic to handle documentation-only queries (Scenario 0), in addition to coding, debugging, and custom runtime scenarios. - Updated workflow and rules to clearly separate documentation navigation from code implementation. - Improved operator selection logic, allowing bypass when the user explicitly names the operation. - Removed outdated skill-card.md and refined documentation for conciseness and accuracy.",
"href": "https://clawhub.ai/sdk-team/alibabacloud-odps-maxframe-coding",
"sourceUrl": "https://clawhub.ai/sdk-team/alibabacloud-odps-maxframe-coding",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-06-02T09:40:39.558Z",
"isPublic": true
}
]
}Record generated Oct 9, 2026.
