Palantir's Ontology SQL GA: How Reusable Business Logic Is Reshaping Enterprise Software Competition
Palantir's Ontology SQL and SQL Functions let developers model business objects, relationships, and rules in a shared ontology, then expose them as versioned, permissioned functions reusable across dashboards, mobile apps, BI tools, and AI agents — shifting enterprise software from siloed features to reusable business capabilities.
Introduction: The Inventory Allocation Problem
A warehouse shows 12 units in stock, but a customer orders 10 and requires full shipment. The warehouse clerk says it cannot ship because 5 units are already reserved for other orders, leaving only 7 allocatable. An AI assistant that only checks total inventory would incorrectly say "shippable." This illustrates the gap between raw data and business logic.
On November 12, 2026, Palantir announced general availability of Ontology SQL and SQL Functions. Developers can now query orders, inventory, and reservation relationships inside the ontology using SQL, and publish the "allocatable inventory" calculation as a function. Warehouse systems, sales dashboards, and AI agents can all call the same function to answer "how many units can this order actually receive?"
The next generation of enterprise software delivers not just features and APIs, but reusable business knowledge and capabilities. When a customer switches applications, the fulfillment rules clarified with the warehouse remain usable.
01: What Does "Customer" Mean in the Ontology?
In a management meeting, leaders need to know which customers are at risk, which orders may be delayed, and which contracts are expiring. But sales, finance, and operations may define "customer" differently. A customer group may have three stores; sales tracks by group, contracts by signing entity, orders by receiving store. Simple name matching fails due to mismatches and duplicate names.
The ontology defines group, signing company, store, contract, and order as distinct business objects with their own attributes, states, and relationships. Which store belongs to which group? Which contract governs an order? Which company is responsible for payment? Recording these relationships creates verifiable query paths for "group total spend" and "which company owes money."
This separates the data layer (tables, primary/foreign keys) from the business semantics layer (reservation rules, fulfillment conditions, approval authority). Previously these rules were scattered across ERP, CRM, MES, and report code. Centralizing them lets new applications reuse the warehouse-validated standards.
Palantir's Ontology SQL queries object types, interfaces, and many-to-many relationships, supporting a subset of Spark SQL syntax. Simple queries run in-memory on object storage; complex ones delegate to Spark. Analysts write and run SQL in SQL Studio with AI assistance.
02: Turning a SQL Query into a Reusable Function
Business experts must define which customer attributes matter and how signing companies link to stores. But if every report requires a modeling expert, the model remains inaccessible. Palantir lets every role use the same business model through familiar entry points: analysts query in SQL Studio, developers get typed parameters and returns via SQL Functions/SDK/API, business users view results in Workshop, and AI agents call functions within permission scopes.
Step 1: Agree on the Calculation Logic
Sales wants to know how many valid orders a customer placed and the total amount. If a dashboard excludes cancelled orders but an AI includes them, the same question yields two answers. First, confirm with finance which orders count, then write a universal SQL aggregation.
Assume orders already excludes cancellations, each row is one order. order_amount stores the full order amount in CNY. :customer_id is a parameter placeholder filled with the customer code at call time.
SELECT
customer_id,
COUNT(*) AS order_count,
SUM(order_amount) AS total_amount
FROM orders
WHERE customer_id = :customer_id
GROUP BY customer_id;For customer C-017 with two valid orders (O-001: 300, O-002: 500), passing C-017 returns one row: customer_id C-017, order_count 2, total_amount 800.
Step 2: Adapt for Foundry's Object Mode
In Foundry SQL Studio's object mode, select the prepared valid order object type and replace the example value in backticks with its resource identifier (RID). Assuming the API names for customer code and order amount are customerId and orderAmount, the query becomes:
DECLARE
@customer_id STRING = 'C-017';
SELECT
customerId AS customer_id,
COUNT(*) AS order_count,
SUM(orderAmount) AS total_amount
FROM `ri.ontology.main.object-type.<uuid>`
WHERE customerId = @customer_id
GROUP BY customerId;The DECLARE value C-017 is a default for testing in the editor. Save the worksheet to a project, then publish the query as getCustomerOrderSummary. Callers can now pass any customer code. The function is usable in Workshop, Actions, Automate, and via the Ontology SDK.
Step 3: Handle Granularity and Edge Cases
Verify whether one row equals one order or one line item. If order O-001 (300) has three line items and O-002 (500) has one, joining line items expands two orders into four rows. COUNT(*) returns 4. COUNT(DISTINCT order_id) fixes the count to 2, but the sum becomes 1400 because O-001's full amount appears three times. The fix: use the order-level amount once per order, or aggregate line subtotals per order first.
Also agree with the UI team on empty results: grouping by customer yields no row for customers without valid orders. If the page must show "0 orders, 0 amount," define how to handle the empty list.
Five Ways to Use the Same Ontology
Business Architect: defines customer, order, and affiliation relationships in the ontology.
Data Analyst: uses SQL to query orders and aggregate by customer.
Software Developer: uses SQL Functions, SDK, or API to plug the same aggregation into different apps.
Business User: selects a customer in Workshop and sees the result instantly.
AI Agent: queries data within the user's visible scope and triggers permitted actions when needed.
SQL makes the calculation logic auditable; functions let different applications reuse that logic. When finance changes the cancellation rule, the team knows exactly which function to update. Adding a cancelled order to the test set validates the new logic.
03: From "What Is This Order?" to "Can It Ship Now?"
Customer, order, and inventory APIs answer "what exists in the system." But when a customer calls asking "can you ship today?" sales must combine order and inventory data to decide. GET /orders/12345 returns order number, amount, customer, and status. Suppose a confirmed order needs 10 units, customer requires full shipment. The shipping warehouse has 12 units of the same SKU, passed quality check, not frozen. Reservation records show 5 units already allocated to other orders.
Encapsulate this check as a business function checkOrderFulfillment(orderId). Sales passes the order number and gets a human-readable answer: "This order needs 10 units, currently 7 allocatable, short 3, cannot ship full." The warehouse can also trace which reservation consumed the stock. When missing stock arrives, re-evaluate against the order's current state and other release conditions.
Apply this pattern elsewhere: credit approval checks credit limit and arrears; project delays check blocked milestones; late orders check missing materials; anomalous transactions cite the triggered rule for manual review. Providing both the judgment and its basis to other applications is the "business capability interface."
From "can ship" to "shipped" there is another step. Ontology SQL Functions are read-only — they can query inventory and compute gaps. Reserving inventory and confirming shipment mutate business records; in Foundry these are done via Actions. Submission checks the operator's permissions on relevant objects and data, plus any defined submission criteria. Enterprise-mandated approvals run their workflow.
Concurrency matters: after sales checks inventory, a warehouse clerk clicks "ship," but another order might grab the stock in the interim. Therefore submission must re-verify inventory and order state, record actual shipped quantity, and leave an audit trail for later review of why release was granted and how many units actually shipped.
04: What Should an AI Agent Query First When Asked "Which Customers Are High Risk?"
Many teams first give an AI model database access to write SQL and return results. A demo like "how many orders yesterday?" works quickly. But a customer manager asks "which customers are high risk this week, who should I contact first?" If the assistant simply sorts by order amount descending, the top may be a large, always-on-time payer.
Correct SQL syntax can still answer the wrong business question. Is "customer" the whole group or the signing entity? Does risk mean expiring contracts, abnormal orders, or overdue payments? Which orders belong to which contracts? When were payment records last updated? What customers can the asker see? These answers determine what the assistant should query and what results it may show.
Assume the company rule: if a signing company has an overdue receivable >30 days unpaid, the customer manager must prioritize contact. The assistant first restricts to customers the manager can view, then verifies contract payment dates, unpaid amounts, and latest payment timestamps, producing a follow-up list.
AI Agent's Business Understanding Chain
From question to answer, the assistant must clarify business meaning, call SQL or functions within authorized scope, verify rules and result visibility, then explain reasoning and recommendations.
Example response to customer manager: "Recommend contacting Customer A first. As of yesterday's payment records, contract HT-018 has 80,000 CNY outstanding, overdue 42 days, exceeding the company's 30-day follow-up threshold. Before contacting, please verify if any payment arrived today."
The manager may equate "contact first" with "highest risk." For Customer A, the accounting fact, the follow-up rule, and the risk rating each have separate bases:
Is payment overdue? As of yesterday, contract HT-018 has 80k CNY unpaid, overdue 42 days.
Why prioritize follow-up? 42 days exceeds the 30-day threshold; manager should verify payment then contact.
Can we rate as high risk? Not solely on this debt; need to check other evidence per company rating standards, e.g., past repeated delays.
Contract numbers and dates must be included. If the customer paid this morning, check what time the payment record updated. If money is recorded under a different same-name company, check how the signing entity links to payment records. These two scenarios require completely different query directions.
The ontology lets the agent know how customers, orders, and contracts relate; functions give it a business-verified data access path. Before launch, the team must still validate data accuracy, cross-departmental metric alignment, role-based record visibility, and rule correctness. After actual execution, verify outcomes.
If the manager then says "pause this customer's credit," the system must separately check who can initiate, whether current conditions allow submission, who approves, and log the operation. Seeing the risk list, initiating a credit pause, and approving that decision are three distinct permissions.
05: How Can CRM, Finance, and Support Share One Customer View?
CRM holds customer profiles, ERP holds customer codes, finance and support each have their own ledgers. Adding an AI chatbot often requires assembling yet another copy. Each system works in isolation, but cross-system tasks force people to first reconcile whether multiple records refer to the same customer — the classic "siloed applications" problem.
Example: a group store changes its operating company in July; the shipping address and group affiliation stay the same. Overwriting the customer profile's company name would make June transactions appear under the July company. The operating relationship must record when it changed, and each contract must retain its own signing and paying parties.
Sales aggregates by group, so both companies' orders count. Finance collects against a specific receivable, so it must find the contract's designated payer. The two side-by-side boxes in Figure 1 illustrate how the system remembers this distinction.
The ontology defines what relationships can exist between customers and orders; the knowledge graph records the concrete mappings (e.g., C-017 placed O-001 and O-002). Dashboards, recommendation systems, and AI agents query along the same relationships with consistent data timestamps and visibility scopes, so orders reconcile.
What belongs in the shared layer? First, objects and relationships — who signs contracts, which store receives goods. Second, metrics and rules — do cancelled orders count, how much inventory is allocatable. Third, query functions and business actions — any app can query inventory, but only authorized users can reserve inventory or confirm shipment. Who did what and when must be auditable.
These rules need owners. Finance owns the revenue recognition rule; warehouse owns the allocatable inventory rule; dev teams implement rules as functions and test with real orders. Web, mobile, admin, BI, and agents each serve their users' needs. For example, adding a low-stock alert on mobile lets the product team focus on timely notification to the warehouse clerk; the inventory algorithm and release conditions are reused.
In Palantir's architecture, the ontology also connects to existing enterprise computation rules and execution systems. The same order appears in analytical reports and, when permissions and conditions are met, enters the fulfillment flow. Figure 8's connecting lines show where the same business capability is used across both paths.
06: What Should a Customer Accept When Delivering an Order System?
Traditional software acceptance checks off modules, APIs, database schema, and workflows. Buy an order management module, users learn to create, view, approve orders — project delivered. Later, when the customer wants mobile access, they discover some rules only exist in the original web pages, and some exceptions only the original implementers know.
Relationships among customers, products, orders, contracts, people, and equipment should be explicit at delivery so future AI integration has a foundation. At acceptance I would ask three more questions: On what basis does sales promise a delivery date? Who has authority to approve shipment? When a dispute arises, where is the original basis recorded?
Traditional Software Product vs. AI-Era Business Platform
Deliver order management features → Other apps can also query "can this order ship?"
Deliver data tables and fields → Deliver defined customers, orders, contracts, and their relationships
Provide data extraction APIs → Provide business functions with declared inputs, outputs, and calculation logic
Deliver fixed approval workflows → Steps like inventory check, approval, shipment confirmation are composable, each permission-controlled
Users learn menus and steps → Users ask business questions; AI assists query, explanation, and execution
Charge per module; new needs often require new modules → Extend new scenarios on existing capabilities; agree scope based on added work and value
Phase 2 adds a warehouse mobile app. Which of the order relationships, inventory rules, and release conditions clarified in Phase 1 can be reused directly? Which work justifies additional payment? The software vendor must make this accounting clear to continue building on the existing product.
Have the warehouse clerk use the mobile app on that short-ship order. Inventory and reservations unchanged; call the already-accepted function — it should show "short 3" and reveal the reservation records the clerk can see. Switch to a sales account to verify visible details. Finally, use the clerk's account to attempt shipment when conditions are met. If these steps work, Phase 1's rules are truly live on mobile.
07: How Can an Enterprise Adopt Ontology in Existing Products?
Palantir's platform covers data integration, modeling, permissions, app development, automation, and AI. Teams with existing ERP, CRM, or industry products can start with one product. The first three steps clarify objects, functions, and AI entry points; the fourth step takes one real business case from data ingestion through to shipment result.
Step 1: Start Modeling from Business Objects
Before designing database tables, ask frontline colleagues to bring a historically contentious order and, using original records, answer five questions: What objects are involved? What information does each object need? How do they relate? What states does an order go through? In each state, who can do what? Participants usually pinpoint the most error-prone step — more concrete than discussing a blank data dictionary.
For an enterprise management platform, list enterprises, customers, orders, contracts, projects, then map which customer placed which order, which contract maps to which project. Then mark who can create customers, approve contracts, confirm orders, assign projects, track risks. An order moving from "pending" to "confirmed" to "shipped" — what conditions must be met at each transition, and which role performs it? Once the business is clear, decide how to store data.
Step 2: Build a Unified Business Capability Layer
What numbers are repeatedly calculated in the backend, mobile app, and reports? Take those questions to frontline staff, have them pick the most frequently asked from the right column, and decide which function to build first. Six example functions: getCustomerProfile — What is this customer's basic situation and business history with us? getCustomerOrders — What orders does this customer have? calculateCustomerRisk — Per current company rules, what risks exist for this customer and what is the evidence? getProjectProgress — Which milestone has the project reached? checkOrderStatus — What is the current state of this order? getContractExpiration — When does this contract expire?
Every function must specify inputs, outputs, judgment logic, and access permissions . For customer risk: does the call take a group code or a signing company code? Does the result include risk reasons and calculation date? Which contracts participate in the judgment? Who can see the details? Documenting these conventions lets the customer page developer and the AI integration colleague both use the same function.
Step 3: Make AI the Business Operations Entry Point
Business users shouldn't have to open customer, order, and contract pages one by one. They can ask "which customers have abnormal orders lately?" "which projects might be delayed?" "which contracts are expiring soon?" They can also request a summary of a customer's business history or a draft of this month's operating analysis report. Every key conclusion must be traceable to the underlying orders, contracts, or projects for verification.
Next, the user may say "these three contracts expire next week, notify the owners." The agent finds the contracts, lists recipients, drafts reminders, and hands off to the handler for review. Actual sending respects the current user's permissions and sending conditions. For payments, contract approvals, order changes, the agent must obtain authorization per company policy, completing required approvals or manual confirmations. Separating query, recommendation, and execution clarifies which steps AI can automate and which require human decision.
Step 4: Pick One Order and Run the Full Six-Stage Loop
Ask the warehouse for an order that shows stock on paper but cannot actually ship . Use it for an end-to-end acceptance; at each stage observe what result this order produces.
Business Data Ingestion — Verify how many units the order needs, how many the warehouse has, how many are reserved. Record each data source's last update time.
Business Object Modeling — Map each SKU in the order to the shipping warehouse's inventory; confirm with the warehouse clerk how reservation, freeze, and other states affect allocatable quantity.
Query Capability Encapsulation — Input order number; return shippable yes/no, shortfall quantity, and the basis. If inventory records are missing, explicitly return "pending verification."
Application Capability Reuse — View the same order in the admin console, warehouse mobile app, and BI. At the same time and with the same view permissions, verify that all three entry points show identical quantities and reasons.
AI Agent Integration — Let sales ask "why can't this ship?" and see if the assistant explains the gap. Then have a person with shipment permission verify that when conditions are met, the agent can execute the shipment per policy.
Feedback Loop Closure — Compare the judgment result with the actual shipment record. If inventory sync is too slow, fix the sync, then re-validate with the same order.
The last step is often skipped. Example: system says shippable, but the clerk finds the batch was just quality-frozen. If the model lacks a "frozen" state, add the state and its rules. If the rule exists but the freeze record arrived an hour late, investigate the data latency. Completing one full loop reveals which object definitions and functions withstand real business scrutiny and can be carried to the next scenario.
08: Three Judgments Worth Remembering from This Release
Judgment 1: Ontology Is the Business Knowledge Infrastructure for Enterprise AI
Databases can store ten years of orders. But later readers may not know why several companies were grouped together, how special contracts were handled, or who gets priority when inventory is tight. Much experience lives in tribal knowledge, some in report scripts, some only recalled during approvals. Explicitly recording customer-contract-inventory relationships and handling rules, maintained by business experts, lets new hires and new AI assistants find the same authoritative basis.
Figure 11 places the semantic layer between data and AI. To test its utility, ask business colleagues to explain three common terms: From what day does "overdue" start? Does "delivered" mean shipped or customer-signed? What quantities are deducted from "available inventory"? Clarifying who defines these terms and whether two systems use the same caliber tells the team whether to fix the model or first align business definitions.
Judgment 2: Standardized Interfaces Determine Whether Business Knowledge Scales
Writing business definitions into documents gives colleagues a discussion basis. To let another team use them in their product, the rules must become versioned, permissioned SQL functions, APIs, or SDK interfaces with verifiable examples.
When finance changes the cancellation rule, take a set of orders containing cancellations and have the dashboard, mobile app, and AI assistant each compute once. If all three numbers match, check whether they all call the same rule version. Comparing only numbers sometimes yields accidental agreement without revealing which end still runs old logic.
Judgment 3: Software Competition Will Extend to Business Understanding and Execution Capability
For the past decade, delivering features on time and getting systems live was the software vendor's core competency. Now AI can also draw UIs and write queries, so customers naturally ask deeper: Why is this order held? Where is the evidence? Who can take it over? The winning teams will be those who can encode industry experience into rules and functions, and also govern execution and approval cleanly. When the customer expands, they will prefer to give the next phase to such a team.
09: How Can Accumulated Enterprise Business Knowledge Be Structured in Five Layers?
Suppose next year we swap the CRM, add a project management system, or introduce an AI assistant. How much of today's clarified customer relationships, order rules, and approval flows can we carry forward? The diagram below shows a five-layer decomposition of enterprise software. Using the same short-ship order, start from the sales question "why still can't ship?" and trace downward for the basis.
Five-Layer Responsibilities for the Short-Ship Order
AI Agent Layer: Sales asks "why still can't ship?" Assistant finds evidence, explains gap, gives recommendation. When action needed, initiates permitted operations.
Business Application Layer: Web, warehouse mobile, BI, management cockpit, and automation flows share the same judgment; present results or execute business per role.
Business Capability Layer: SQL Functions, APIs, and business rules compute shortfall quantity and reason. When orders or inventory change, workflows and Actions execute approved operations.
Business Ontology Layer: Map order lines to SKUs and shipping warehouse inventory; record object relationships, states, and visibility scopes.
Data Foundation Layer: Ingest order quantities, inventory, and reservation records from databases, files, and other systems; tag update timestamps.
Tracing down the table, the assistant's "short 3" ultimately reconciles to the warehouse's inventory and reservation records. Whether the clerk checks on mobile or sales asks the AI, they use the same judgment. Who can see details, who can modify inventory, which step requires approval — all still follow enterprise policy. First walk one order through this entire path; when building the second scenario, see what can be reused.
Define the Next Product Roadmap by Answering Three Questions
How do existing business data form a unified ontology? From one order, trace back to customer, contract, product, and inventory. Note what codes each system uses, which records are one-to-many, which relationships need business confirmation. Prioritize clarifying the most easily confused object pairs, e.g., customer group vs. signing company.
Which business capabilities are worth turning into standard functions? Find a rule already implemented in two or more applications. Ask the business owner to confirm inputs, outputs, judgment logic, and permissions. For acceptance, pick three orders: one shippable, one short, one with inventory pending verification. Record each's expected result; the next integrating application gets ready-made test cases.
Which scenario is best for the first AI Agent pilot? Choose a question frontline staff ask often, where evidence exists, and where a wrong answer is easy to audit. First hear if the assistant can explain clearly; then decide which actions can be delegated and which require human approval. Finally, follow through to completion and correct rules or data with actual results.
Next time I see an enterprise AI demo, I'll pull out that short-ship order and ask three questions: Why can't it ship? How many short? Who can handle it?
If next year the model changes and sales asks on mobile, the system still finds those 5 reserved units, explains the 3-unit gap, and hands subsequent operations to the authorized person. The previous project's experience truly persists. For the enterprise, this business-validated, application-portable knowledge and rules deserves a place on the next software acceptance checklist.
References
Palantir announcement "Ontology SQL and SQL functions are GA", November 12, 2026.
Palantir Product Documentation | Ontology SQL
Palantir Product Documentation | Ontology SQL functions
Palantir Product Documentation | SQL Studio
Palantir Product Documentation | Action permissions
Palantir Product Documentation | Submission criteria
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
