upload-r1

Upsert aggregated R1 XLSX data into ReturnPro's stg_financials_raw.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/clenisa/optimal-cli --skill upload-r1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upload-r1
Source: https://github.com/clenisa/optimal-cli/tree/main/skills/upload-r1
Command: npx skills add https://github.com/clenisa/optimal-cli --skill upload-r1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Uploads R1 reverse-logistics XLSX files into ReturnPro's financial staging tables. The R1 export is parsed using WASM-based calamine (fast XLSX parser without ExcelJS overhead), rows are aggregated by master program, and results are upserted into stg_financials_raw for FP&A.

Core Features & Use Cases

  • Ingest R1 XLSX files parsed with WASM/calamine; upsert aggregated results into stg_financials_raw keyed by month and master_program_id.
  • Resolve program names to dim_master_program.id via fuzzy matching, and validate accounts using dim_account to ensure data integrity.
  • Log ingestion activity and errors to observability dashboards for auditing and troubleshooting.

Quick Start

Provide the path to the R1 XLSX file and the target month to ingest data into ReturnPro staging.

Frequently Asked Questions about upload-r1

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ingest R1 XLSX data into ReturnPro staging for FP&A aggregation?

Ingest R1 XLSX data into ReturnPro staging by parsing files with WASM-based calamine, aggregating rows by master program, resolving program IDs via dim_master_program, and upserting results into stg_financials_raw keyed by month.

How does WASM calamine parsing compare to ExcelJS for XLSX file ingestion?

WASM-based calamine provides fast XLSX parsing without ExcelJS overhead, enabling efficient ingestion of R1 reverse-logistics files into ReturnPro financial staging tables for FP&A pipelines.

What environment variables do I need to set up before uploading R1 files to ReturnPro?

Uploading R1 files to ReturnPro requires setting the RETURNPRO_SUPABASE_URL and RETURNPRO_SUPABASE_SERVICE_KEY environment variables to authenticate and write aggregated data into stg_financials_raw.

Can I resolve program names to dim_master_program IDs automatically during XLSX ingestion?

Yes, the ingestion process resolves program names to dim_master_program.id via fuzzy matching and validates accounts using dim_account to ensure data integrity before upserting aggregated results into ReturnPro staging.

What limitations should I expect when staging monthly program-level financial data from R1 exports?

Staging R1 exports requires valid column structures for aggregation, successful fuzzy matching to dim_master_program, and valid dim_account entries; ingestion errors and activities are logged to observability dashboards for troubleshooting.