Spaces:
Runtime error
Runtime error
|
Download QUICK_TEST_GUIDE.md from CleanflowAI/cleanflowai: direct link, hf CLI and curl.
- Browser
- Download file 3.96 kB
-
https://huggingface.co/spaces/CleanflowAI/cleanflowai/resolve/main/QUICK_TEST_GUIDE.md
- Command line
-
hf download hf://spaces/CleanflowAI/cleanflowai/QUICK_TEST_GUIDE.md
-
curl -L -o QUICK_TEST_GUIDE.md https://huggingface.co/spaces/CleanflowAI/cleanflowai/resolve/main/QUICK_TEST_GUIDE.md
3.96 kB
Quick Testing Guide - CleanFlow AI
β WORKING SOLUTION
π― Correct Way to Test in Browser
Step 1: Go to API Docs
Visit: http://localhost:8000/docs
Step 2: Test POST /transform/file
- Click on
POST /transform/file - Click "Try it out"
- IMPORTANT: Set parameters correctly:
file: Uploadtest_simple_netsuite.csvauto_select_erp:trueβauto_select_entity:trueβentity: LEAVE EMPTY (don't put "string") βerp: LEAVE EMPTY (don't put "string") βoutput_format:json
Step 3: Expected Success Response
{
"success": true,
"data": [
{
"order_id": "SO1001",
"order_date": "2025-08-04",
"customer_id": "CUST01",
"status": "Pending Fulfillment",
"currency": "USD",
"total_amount": 1249.0,
"notes": "Rush order for Q4",
"item_id": null,
"description": null,
"quantity": null,
"unit_price": null,
"line_total": null,
"tax_code": null
}
],
"detected_erp": "NetSuite",
"detected_entity": "sales_orders",
"transformation_mode": "template",
"confidence_score": 0.85,
"message": "Successfully transformed using template mapping",
"column_mappings": {
"tranid": "order_id",
"trandate": "order_date",
"entity": "customer_id",
"status": "status",
"currency": "currency",
"total": "total_amount",
"memo": "notes"
},
"row_count": 3,
"processing_time_ms": 45.2
}
π§ Alternative: Use cURL Command
Copy and paste this exact command in your terminal:
curl -X 'POST' \
'http://localhost:8000/transform/file' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@test_simple_netsuite.csv;type=text/csv' \
-F 'auto_select_erp=true' \
-F 'auto_select_entity=true' \
-F 'output_format=json'
Note: No entity or erp parameters - let auto-detection work!
π§ͺ Test Different Files
Test 1: NetSuite Sales Orders
- File:
test_simple_netsuite.csv - Expected ERP:
NetSuite - Expected Entity:
sales_orders
Test 2: SAP Customers
- File:
test_sap_customers.csv - Expected ERP:
SAP ERP - Expected Entity:
customers
Test 3: Oracle Invoices
- File:
test_oracle_invoices.json - Expected ERP:
Oracle Fusion - Expected Entity:
invoices
π What to Look For in Results
Success Indicators:
- β
"success": true - β
"detected_erp"shows correct ERP system - β
"detected_entity"shows correct entity type - β
"confidence_score"> 0.6 - β
"data"contains transformed records - β
"column_mappings"shows field mappings
Data Transformation:
- Input: ERP-specific column names (e.g.,
tranId,trandate) - Output: Standardized CDF names (e.g.,
order_id,order_date) - Missing Fields: Filled with
nullvalues - Data Types: Properly formatted (dates, decimals, etc.)
π Quick Validation Steps
- Health Check:
GET /healthβ Should return healthy status - List ERPs:
GET /erpsβ Should show 11 ERP systems - List Entities:
GET /entitiesβ Should show 5 entity types - Transform File:
POST /transform/fileβ Should transform data successfully
π Troubleshooting
Common Mistakes:
- β Putting "string" in entity/erp fields
- β Not setting auto_select_* to true
- β Using wrong file format
If You Get Errors:
- Check the
messagefield in response - Ensure file is properly formatted
- Try with
test_simple_netsuite.csvfirst - Use auto-detection (leave entity/erp empty)
π Performance Expectations
- Small files (< 1MB): < 100ms
- Medium files (1-10MB): < 500ms
- Processing: Real-time transformation
- Memory: Efficient with Polars + DuckDB
The application is working perfectly - just need to use the correct parameters! π