Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

CSV Schema Validator

schema.validate_csv_schema

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
File inputNo network

Overview

You send CSV data together with a list of the columns you expect, and we tell you where the file disagrees: a required column that is not there, an empty cell in a column you said cannot be empty, and any value that does not parse as the type you declared. Every problem comes back with its row number, its column name, a stable code, and a readable message, so you can act on it or show it to whoever sent you the file. We check names, emptiness, and types — not ranges, patterns, or allowed-value lists. Accepts file input via file_ref — no need to extract file content first.

CSV is still how most data changes hands, and a single mistyped cell can poison an import hours after it started. Catching it at the door, with the row and column named, is cheaper than unwinding it later.

Reliability

Deterministic: the same file, schema, and options always produce the same errors in the same order. Type checks are deliberately simple — a whole number for integer, any parseable number for number, true, false, 0 or 1 for boolean, YYYY-MM-DD for date, and a date followed by a time for datetime — and a type name we do not recognise passes everything. Empty cells are skipped by the type check, so nullable is what enforces presence. If the text cannot be parsed as CSV at all we return the recoverable failure CSV_MALFORMED, which you can clear by inspecting the real structure with schema.infer_csv_schema and calling again with the right delimiter. We reject the call, and an unchanged retry will not help, when neither csv nor file_ref is present, when schema is missing or has no non-empty columns array, when the text exceeds 10485760 bytes, or when a referenced file is missing, unreadable, or over 5000000 bytes.

Context footprint

Inline text is capped at 2097152 characters and a referenced file at 5000000 bytes; the response holds at most maxErrors short rows, so a badly broken file does not flood your context. A successful call costs 1 execution credit.

When to use it

Right before CSV data enters your system, especially when it came from somewhere you do not control. If you do not know the columns yet, run schema.infer_csv_schema first and validate against what it found.

When you have no expectations to check against yet, or when what you really want is for the data to be cleaned up rather than judged.

Powered by Apache Commons CSV, a hardened RFC 4180 parser relied on across the Java ecosystem for robust CSV handling.

Scope

Note
We check a CSV against the column names, emptiness rules, and types you declare, and report every disagreement with its row, column, code, and message.

Non-goals

  • We never work out the columns for you — that is schema.infer_csv_schema
  • We never clean, coerce, or reshape the data — that is data.csv_normalize
  • We never check ranges, patterns, or allowed-value lists, only names, emptiness, and types

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MBMax file size4.8 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file4.8 MiBSkill maximum

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify using a self-contained open-source component
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Self contained open source component
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
csvstringNoCSV text, 1 to 2097152 characters. Required unless file_ref is provided.
file_refstringNoTenant-owned CSV file reference; omit it to read csv. When both are sent this one wins.
schemaobjectYesClosed CSV schema with a non-empty columns array; unlisted file columns are ignored.
delimiterstringNoField delimiter, a single character; omit it for comma.
quoteCharstringNoQuote character, a single character; omit it for double-quote.
headerbooleanNoWhether the first row is a header; omit it for true.
maxErrorsintegerNoHow many problems to list; omit it for the skill default.

Output schema

FieldTypeRequiredDescription
validbooleanYesTrue when every checked cell satisfied the schema.
rowCountintegerYesHow many data rows were checked.
columnCountintegerYesHow many columns the header named.
errorCountintegerYesHow many problems are in the errors list.
errorsarrayYesProblems in file order, 0 through 100000 closed {row, column, code, message} objects.
warningsarrayYesNon-fatal advisory notices as 0 through 256 strings, each one sentence long; empty when nothing was worth flagging.
truncatedbooleanNoTrue when more problems existed than maxErrors; omit it when the list is complete.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.validate_csv_schema","input":{"csv":"name,age\nAlice,30","schema":{"columns":[{"name":"name","type":"string","required":true},{"name":"age","type":"integer","required":true}]}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("schema.validate_csv_schema", {"csv":"name,age,email\nAlice,30,[email protected]\nBob,25,[email protected]","schema":{"columns":[{"name":"name","required":true,"type":"string"},{"name":"age","required":true,"type":"integer"},{"name":"email","required":true,"type":"string"}]}});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
CSV_MALFORMED400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • We never work out the columns for you — that is schema.infer_csv_schema
  • We never clean, coerce, or reshape the data — that is data.csv_normalize
  • We never check ranges, patterns, or allowed-value lists, only names, emptiness, and types
  • Discovering what the columns are in the first place (schema.infer_csv_schema)
  • Cleaning or converting the data (data.csv_normalize)
  • Checking JSON or XML rather than tabular data

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "schema.validate_csv_schema",
  "input": {
    "csv": "name,age,email\nAlice,30,[email protected]\nBob,25,[email protected]",
    "schema": {
      "columns": [
        {
          "name": "name",
          "required": true,
          "type": "string"
        },
        {
          "name": "age",
          "required": true,
          "type": "integer"
        },
        {
          "name": "email",
          "required": true,
          "type": "string"
        }
      ]
    }
  }
}

Examples

Valid CSV against schema

Inputjson
{
  "csv": "name,age,email\nAlice,30,[email protected]\nBob,25,[email protected]",
  "schema": {
    "columns": [
      {
        "name": "name",
        "required": true,
        "type": "string"
      },
      {
        "name": "age",
        "required": true,
        "type": "integer"
      },
      {
        "name": "email",
        "required": true,
        "type": "string"
      }
    ]
  }
}
Expected outputjson
{
  "rowCount": 2,
  "errorCount": 0,
  "valid": true,
  "errors": [],
  "warnings": [],
  "columnCount": 3
}

Invalid CSV with type mismatch

Inputjson
{
  "csv": "name,age,email\nAlice,thirty,[email protected]",
  "schema": {
    "columns": [
      {
        "name": "name",
        "required": true,
        "type": "string"
      },
      {
        "name": "age",
        "required": true,
        "type": "integer"
      },
      {
        "name": "email",
        "required": true,
        "type": "string"
      }
    ]
  }
}
Expected outputjson
{
  "rowCount": 1,
  "errorCount": 1,
  "valid": false,
  "errors": [
    {
      "code": "type_mismatch",
      "column": "age",
      "message": "Expected integer, got 'thirty'",
      "row": 1
    }
  ],
  "warnings": [],
  "columnCount": 3
}
  • Check an uploaded file before you let it near your database
  • Guard a scheduled import so a bad export fails loudly instead of quietly
  • Tell a partner exactly which rows and columns of their file are wrong

Avoid for

  • Discovering what the columns are in the first place (schema.infer_csv_schema)
  • Cleaning or converting the data (data.csv_normalize)
  • Checking JSON or XML rather than tabular data

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

datavalidationcsv