| name | palantir-cost-tuning |
| description | Optimize Palantir Foundry costs through compute tuning, incremental builds, and usage monitoring.
Use when analyzing Foundry compute costs, reducing API usage,
or implementing cost monitoring for Foundry workloads.
Trigger with phrases like "palantir cost", "foundry billing",
"reduce foundry costs", "foundry pricing", "foundry expensive".
|
| allowed-tools | Read, Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","palantir","foundry","cost","optimization"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Palantir Cost Tuning
Overview
Optimize Foundry compute and API costs through incremental transforms, right-sized Spark profiles, efficient pagination, and usage monitoring.
Prerequisites
- Active Foundry enrollment with build history
- Access to Foundry resource usage metrics
- Understanding of transform build patterns
Instructions
Step 1: Cost Drivers in Foundry
| Cost Category | Driver | Optimization |
|---|
| Compute | Full rebuilds of large transforms | Use @incremental() |
| Compute | Oversized Spark profiles | Right-size @configure profiles |
| Storage | Redundant dataset snapshots | Configure retention policies |
| API | High-frequency polling | Use webhooks instead |
| API | Small page sizes | Use max page_size (500) |
Step 2: Convert Full Rebuilds to Incremental
from transforms.api import transform_df, Input, Output, incremental
@transform_df(Output("/out"), data=Input("/in"))
def expensive(data):
return data.filter(data.status == "active")
@incremental()
@transform_df(Output("/out"), data=Input("/in"))
def cheap(data):
data.(data.status == )