Skip to main content

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

MicroSkills Reference

Anonymize Dataset

data.anonymize_dataset

ProductionBounded custom (Class B)Deterministicstrictmoderatev1.0.0
No network

Overview

When you send columns, rows, and an explicit per-column policy, we transform values deterministically (drop, null, constant, mask, truncate, hash, hmac_token, bucket, round, date_shift, generalize, shuffle) and return transformed rows plus a per-column report. We validate the whole policy before touching any row. Same data, policy, secret, and seed yield identical output — do not use this as proof of legal anonymization or GDPR compliance.

Ad-hoc masking is inconsistent. We apply the policy you declare the same way every time.

Reliability

Give us the same rows, policy, secret and seed and you get byte-identical output, which is what makes tokens joinable across exports. Feeding the result back in changes it again, so anonymize once from the source. We check the whole policy before touching a single row: a bad rule fails the call rather than leaving you half-transformed, and your key is never echoed back or folded into policyDigest. What we cannot promise is legal anonymity — a rare combination of quasi-identifiers can still single someone out. Five errors can come back, none of them retryable unchanged: ANONYMIZATION_POLICY_INVALID — trigger: an action we do not know, a missing parameter such as value, length, step, boundaries or mapping, or more than 1,000 columns; retryable: no; next: fix that rule and call again. ANONYMIZATION_COLUMN_NOT_FOUND — trigger: a rule names a column missing from your columns list while failOnUnknownColumn is on; retryable: no; next: correct the name or set the option to false to skip it. ANONYMIZATION_TYPE_MISMATCH — trigger: date_shift met text that is not an ISO date like 2026-03-14; retryable: no; next: reformat the column or switch action. ANONYMIZATION_DATE_OVERFLOW — trigger: shifting a date pushed it outside the supported calendar range; retryable: no; next: lower maxDays. ANONYMIZATION_SECRET_REQUIRED — trigger: an hmac_token rule without a key; retryable: no; next: add key to that rule and keep the same key across exports you want to join.

Context footprint

Returns transformed rows, columnStats, warnings, policyDigest, and optional _meta. A successful call costs 1 execution credit.

When to use it

When you can specify columns, rows, and an explicit transform policy.

When you need a certified legal anonymization guarantee.

Scope

Note
Applies a deterministic per-column anonymization policy you declare.

Non-goals

  • Does not certify legal anonymization
  • Does not auto-detect PII
  • Does not return raw secrets

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationnormalization

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive processing
What this means

This skill is designed to detect, mask, redact, validate, or otherwise process sensitive data.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • 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.
  • Targets sensitive data
  • The response may contain submitted or transformed 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
columnsarrayYesBounded array of 1 through 1000 input column names in the order they should return.
rowsarrayYesBounded array of 0 through 200000 input row objects keyed by column name, where missing keys count as null.
policyarrayYesBounded array of 0 through 1000 closed per-column rules; a column with no rule passes through.
optionsobjectNoClosed optional run knobs; omit the object to keep seed 42, preserveNulls true, and failOnUnknownColumn true.

Output schema

FieldTypeRequiredDescription
columnsarrayYesBounded array of 0 through 1000 surviving column names after drop rules were applied.
rowsarrayYesBounded array of 0 through 200000 result row objects keyed by column name after this skill transformed the table.
columnStatsobjectYesPurpose-bound tally keyed by policy column name; extra keys are those columns and a missing key means the column was dropped or untouched.
warningsarrayYesBounded array of 0 through 1000 closed findings such as ANONYMIZATION_WEAK_TRANSFORM.
policyDigeststringYes16-character fingerprint of the applied policy with secrets omitted.
_metaobjectNoClosed provenance naming the transform rules and how many rows came back.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"data.anonymize_dataset","input":{"columns":["age"],"rows":[{"age":37}],"policy":[{"column":"age","action":"round","step":10}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("data.anonymize_dataset", {"rows":[{"name":"Alice","age":37}],"policy":[{"column":"name","action":"drop"},{"action":"bucket","boundaries":[0,18,30,45,65,200],"column":"age"}],"columns":["name","age"]});

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.
ANONYMIZATION_POLICY_INVALID400NoThe request payload failed this skill's input validation.
ANONYMIZATION_COLUMN_NOT_FOUND400NoThe request payload failed this skill's input validation.
ANONYMIZATION_TYPE_MISMATCH400NoThe request payload failed this skill's input validation.
ANONYMIZATION_DATE_OVERFLOW400NoThe request payload failed this skill's input validation.
ANONYMIZATION_SECRET_REQUIRED412NoThe input is valid but cannot be processed as-is.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not certify legal anonymization
  • Does not auto-detect PII
  • Does not return raw secrets
  • Claiming a dataset is legally anonymous
  • Reversible tokens without a secret

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "data.anonymize_dataset",
  "input": {
    "rows": [
      {
        "name": "Alice",
        "age": 37
      }
    ],
    "policy": [
      {
        "column": "name",
        "action": "drop"
      },
      {
        "action": "bucket",
        "boundaries": [
          0,
          18,
          30,
          45,
          65,
          200
        ],
        "column": "age"
      }
    ],
    "columns": [
      "name",
      "age"
    ]
  }
}

Examples

Drop name and bucket age

Inputjson
{
  "rows": [
    {
      "name": "Alice",
      "age": 37
    }
  ],
  "policy": [
    {
      "column": "name",
      "action": "drop"
    },
    {
      "action": "bucket",
      "boundaries": [
        0,
        18,
        30,
        45,
        65,
        200
      ],
      "column": "age"
    }
  ],
  "columns": [
    "name",
    "age"
  ]
}
Expected outputjson
{
  "policyDigest": "50d8326c5d473e9e",
  "_meta": {
    "policyVersion": "anonymize-1",
    "rowsTransformed": 1
  },
  "rows": [
    {
      "age": "[30,45)"
    }
  ],
  "columns": [
    "age"
  ],
  "warnings": [],
  "columnStats": {
    "age": {
      "transformed": 1
    }
  }
}

Round numeric values to a step

Inputjson
{
  "rows": [
    {
      "age": 37
    }
  ],
  "policy": [
    {
      "action": "round",
      "step": 10,
      "column": "age"
    }
  ],
  "columns": [
    "age"
  ]
}
Expected outputjson
{
  "policyDigest": "f20333391323d3d1",
  "_meta": {
    "policyVersion": "anonymize-1",
    "rowsTransformed": 1
  },
  "rows": [
    {
      "age": 40
    }
  ],
  "columns": [
    "age"
  ],
  "warnings": [],
  "columnStats": {
    "age": {
      "transformed": 1
    }
  }
}
  • Drop or mask identifiers before sharing
  • Bucket ages or dates deterministically
  • Pseudonymize with HMAC tokens when you supply a secret

Avoid for

  • Claiming a dataset is legally anonymous
  • Reversible tokens without a secret

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

transformationanonymizationdata