Skip to content

feat: Support Parquet input in RPT client#1520

Merged
davidkna-sap merged 21 commits intomainfrom
davidkna-sap_rpt-parquet-cloud-sdk
Feb 27, 2026
Merged

feat: Support Parquet input in RPT client#1520
davidkna-sap merged 21 commits intomainfrom
davidkna-sap_rpt-parquet-cloud-sdk

Conversation

@davidkna-sap
Copy link
Copy Markdown
Member

@davidkna-sap davidkna-sap commented Feb 6, 2026

Context

This PR is #1484 but powered by the multi-part SAP Cloud SDK PR.

Related https://github.com/SAP/ai-sdk-js-backlog/issues/469.
Cloud SDK PR/branch: SAP/cloud-sdk-js#6301

What this PR does and why it is needed

@davidkna-sap davidkna-sap force-pushed the davidkna-sap_rpt-parquet-cloud-sdk branch from 9fadc5e to 24b672a Compare February 6, 2026 14:45
@davidkna-sap davidkna-sap force-pushed the davidkna-sap_rpt-parquet-cloud-sdk branch from 24b672a to bd7d3ef Compare February 6, 2026 14:47
Copy link
Copy Markdown
Member Author

@davidkna-sap davidkna-sap Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are not in the upstream spec:

I've requested that encoding is added and AFAIK prediction_config types were already requested.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome 😊

@davidkna-sap davidkna-sap added blocked Issue or PR blocked due to other issues. don't merge labels Feb 6, 2026
…uet-cloud-sdk

* origin/main: (38 commits)
  feat: Support orchestration prompt module fallback (#1454)
  v2.7.0
  chore: Fix pnpm-lockfile refresh merge condition handling (#1497)
  feat: Add `rawResponse` property to `OrchestrationStreamResponse`& `getRequestId`-helpers (#1464)
  chore: Combine ai client type headers (#1545)
  chore(deps-dev): Bump @sap/cds-dk from 9.7.1 to 9.7.2 (#1548)
  chore: update pnpm transitive dependencies (#1544)
  chore(deps-dev): Bump glob from 13.0.2 to 13.0.3 (#1541)
  chore(deps-dev): Bump dotenv from 17.2.4 to 17.3.1 (#1540)
  chore(deps): Bump the langchain group with 3 updates (#1538)
  feat: Update ai-api specification (#1489)
  feat: Advertise AbortSignal support for HTTP request cancellation (#1480)
  chore(deps-dev): Bump orval from 8.2.0 to 8.3.0 (#1536)
  chore(deps): Bump the langchain group with 3 updates (#1535)
  feat: Added support for custom headers in document grounding and open ai clients (#1519)
  chore: Fix rpt (#1533)
  chore(deps-dev): Bump @types/node from 22.19.10 to 22.19.11 (#1532)
  chore(deps-dev): Bump glob from 13.0.1 to 13.0.2 (#1530)
  chore(deps-dev): Bump nock from 14.0.10 to 14.0.11 (#1529)
  chore(deps): Bump the langchain group with 3 updates (#1528)
  ...
@davidkna-sap davidkna-sap changed the base branch from davidkna-sap_rpt-parquet to main February 16, 2026 14:53
@davidkna-sap davidkna-sap changed the title refactor: [WIP] Use updated Cloud-SDK to handle RPT parquet-API feat: Support Parquet input in RPT client Feb 16, 2026
Comment thread package.json
@davidkna-sap davidkna-sap removed the blocked Issue or PR blocked due to other issues. label Feb 17, 2026
Comment thread sample-code/src/rpt.ts Outdated
Comment thread sample-code/src/rpt.ts Outdated
);
}

// Workaround: Endpoint requires a filename that ends with .parquet
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[q] Does it make sense to ask the service owners to ignore the filename and just look at the format?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!


/**
* Predict based on Parquet file data.
* @param parquetData - Parquet file data as Blob. Can also be a File to forward the filename.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nth] Maybe add a few words an what is in the file. I think prediction data and data schema.

Comment thread packages/rpt/src/client.ts Outdated
Comment thread packages/rpt/src/client.test.ts Outdated
Comment thread packages/rpt/src/client.test.ts Outdated
Copy link
Copy Markdown
Contributor

@marikaner marikaner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

Comment thread packages/rpt/src/client.test.ts Outdated
Co-authored-by: Marika Marszalkowski <marika.marszalkowski@sap.com>
…uet-cloud-sdk

* origin/main:
  chore(deps-dev): Bump glob from 13.0.3 to 13.0.5 (#1553)
  chore(deps): Bump the langchain group with 2 updates (#1552)
  chore(deps-dev): Bump orval from 8.3.0 to 8.4.0 (#1550)
@davidkna-sap davidkna-sap marked this pull request as ready for review February 27, 2026 13:06
@hyperspace-insights
Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:

⚠️ Warnings:

  • Could not get access to repository SAP/ai-sdk-js-backlog to retrieve Issue 469. Status: 404 - UnknownObjectException

Support Parquet input in RPT client

New Features

✨ Added support for Parquet file format in the RPT (Relational Prediction Transformation) client, enabling efficient binary tabular data predictions with typed columns.

Changes

RPT Client API Enhancements

  • packages/rpt/src/client.ts: Implemented predictParquet() method to handle Parquet file data (Blob or File) with configurable prediction options
  • packages/rpt/src/types.ts: Added PredictionOptionsParquet interface for Parquet-specific configuration options
  • packages/rpt/src/client/rpt/schema/body-predict-parquet.ts: Updated schema to properly type Parquet file input and prediction config
  • packages/rpt/src/client/rpt/rpt-api.ts: Enhanced API to handle multipart/form-data encoding for Parquet uploads
  • packages/rpt/src/spec/rpt.json: Updated OpenAPI specification to properly define Parquet content type and encoding

Core HTTP Client Improvements

  • packages/core/src/http-client.ts: Enhanced to preserve FormData objects without stringification, enabling proper multipart uploads
  • packages/core/src/http-client.test.ts: Added comprehensive tests for FormData handling and JSON stringification

AI API Client Updates

Generated clients were updated with improved parameter ordering and content-type headers:

  • packages/ai-api/src/client/AI_CORE_API/: Multiple API files updated with proper header and query parameter handling
  • packages/document-grounding/src/client/api/: Document grounding APIs updated
  • packages/prompt-registry/src/client/prompt-registry/: Prompt registry APIs updated
  • packages/foundation-models/src/azure-openai/client/: Audio transcription/translation schemas updated to use Blob type

Sample Code & Documentation

  • sample-code/src/rpt.ts: Added predictParquetFile() and predictParquetBlob() examples
  • sample-code/src/product_data.parquet: Added sample Parquet data file for testing
  • sample-code/resources/generate_parquet.py: Python script to generate sample Parquet data
  • sample-code/src/server.ts: Added /rpt/predict-parquet endpoint

Testing

  • tests/e2e-tests/src/rpt.test.ts: Comprehensive e2e tests for Parquet predictions
  • All tests verify prediction results with proper data type handling

Build Configuration

  • package.json: Updated to use canary SAP Cloud SDK versions for multipart support
  • sample-code/package.json: Updated compile script to copy Parquet file to dist
  • pnpm-lock.yaml: Updated dependencies to use canary versions

File API Changes

  • packages/ai-api/src/client/AI_CORE_API/file-api.ts: Updated fileDownload() return type to Blob for proper binary handling

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.17.80 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Output Template: Default Template
  • Correlation ID: 27c86260-13dd-11f1-9213-7d3f3442cca6
  • LLM: anthropic--claude-4.5-sonnet
  • Event Trigger: pull_request.ready_for_review
  • Summary Prompt: Default Prompt

💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

…uet-cloud-sdk

* origin/main:
  chore(deps-dev): Bump @types/node from 22.19.11 to 22.19.13 (#1581)
  chore(deps): Bump hono from 4.12.2 to 4.12.3 (#1580)
  chore(deps): Bump the langchain group with 4 updates (#1579)
  chore(deps-dev): Bump orval from 8.4.2 to 8.5.0 (#1576)
  Enhance PR template with Definition of Done checklist (#1563)
  chore(deps): Bump @modelcontextprotocol/sdk from 1.27.0 to 1.27.1 (#1575)
  chore(deps): Bump the langchain group with 3 updates (#1574)
  chore(deps): Bump hono from 4.12.1 to 4.12.2 (#1572)
  chore(deps): Bump @modelcontextprotocol/sdk from 1.26.0 to 1.27.0 (#1571)
  chore(deps): Bump langchain from 1.2.25 to 1.2.26 in the langchain group (#1570)
  chore(deps-dev): Bump orval from 8.4.0 to 8.4.2 (#1566)
  chore(deps): Bump hono from 4.12.0 to 4.12.1 (#1567)
  chore(deps): Bump the langchain group with 2 updates (#1565)
  chore(deps-dev): Bump glob from 13.0.5 to 13.0.6 (#1560)
  chore(deps): Bump hono from 4.11.10 to 4.12.0 (#1559)
  chore(deps): Bump hono from 4.11.9 to 4.11.10 (#1556)
  chore(deps): Bump the langchain group with 3 updates (#1555)
@davidkna-sap davidkna-sap force-pushed the davidkna-sap_rpt-parquet-cloud-sdk branch from 2a29a40 to 8828943 Compare February 27, 2026 15:57
@davidkna-sap davidkna-sap merged commit 8cd42f4 into main Feb 27, 2026
12 checks passed
@davidkna-sap davidkna-sap deleted the davidkna-sap_rpt-parquet-cloud-sdk branch February 27, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants