Skip to content

Schema Commands Status: get_schema requires preview access, put_schema works normally #79

@anjor

Description

@anjor

Issue Summary

The dataset schema commands have different availability and requirements that can cause confusion for users. This issue documents the current status and limitations.

Command Status Overview

🔴 pltr dataset schema get - Limited Availability

  • Status: Requires API preview access
  • Error: Fails with ApiFeaturePreviewUsageOnly for most users
  • Root Cause: Uses SDK's Dataset.get_schema() method which requires special permissions

🟢 pltr dataset schema set - Working

  • Status: Works normally for all users
  • Functionality: Can set schemas from CSV inference, JSON strings, or JSON files
  • Implementation: Uses SDK's Dataset.put_schema() which has no preview restrictions

🟢 pltr dataset schema apply - Working

Impact on Users

Users WITHOUT preview API access:

  • ❌ Cannot read existing schemas (get fails)
  • ✅ Can set/update schemas (set works)
  • ✅ Can infer/apply schemas (apply works)

Users WITH preview API access:

  • ✅ All commands work normally

Examples

Working Commands

# Apply/infer schema (works for everyone)
pltr dataset schema apply ri.foundry.main.dataset.123

# Set schema from CSV (works for everyone)  
pltr dataset schema set ri.foundry.main.dataset.123 --from-csv data.csv

# Set schema from JSON (works for everyone)
pltr dataset schema set ri.foundry.main.dataset.123 --json '{"fieldSchemaList":[...]}'

Limited Command

# Get existing schema (requires preview access)
pltr dataset schema get ri.foundry.main.dataset.123
# ERROR: ApiFeaturePreviewUsageOnly (for users without preview access)

Workarounds

  1. Instead of get → Use apply to infer current schema from data
  2. For schema inspection → Use Foundry UI or request preview API access
  3. For automated workflows → Use set and apply commands which work reliably

Technical Details

  • The get_schema limitation is at the Foundry API level, not a CLI issue
  • The apply_schema command was specifically created to work around this limitation
  • The same API endpoint used by apply is what powers the "Apply Schema" button in Foundry UI

Related

Next Steps

  • Consider adding warning messages back to get_schema command
  • Update documentation to clarify command availability
  • Monitor for SDK updates that might remove preview restrictions

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions