MeridianMERIDIAN
FinetypeGuides

Profile a Parquet File

Profile data stored in Parquet format using Finetype — directly with the CLI or inside DuckDB.

Goal: Profile a Parquet file to discover the semantic types in your data, either directly with the CLI or inside the DuckDB extension.

Prerequisites

ToolPurpose
FinetypeSemantic type detection
DuckDBRequired by finetype profile, which reads files through DuckDB
A .parquet fileAny Parquet file — a data warehouse export, a public dataset, your own data

Two ways to profile Parquet

finetype profile reads CSV and Parquet through the DuckDB engine, so a Parquet file needs no conversion step:

  1. Profile it directly — point finetype profile at the .parquet file
  2. Use the DuckDB extension — classify columns directly inside SQL queries

Both approaches give you the same type labels. Choose whichever fits your workflow.

Option A: Profile the file directly

Run profile on the Parquet file — the same command you would use for a CSV:

finetype profile -f data.parquet
Finetype Column Profile — "data.parquet" (1000 rows, 5 columns)
════════════════════════════════════════════════════════════════════════════════

  COLUMN                    TYPE                                      BROAD   CONF
  ──────────────────────────────────────────────────────────────────────────────
  user_id                   representation.identifier.increment      BIGINT  77.1% [numeric_sequential_detection]
  email                     identity.person.email                   VARCHAR 100.0%
  signup_date               datetime.date.iso                          DATE 100.0%
  country                   geography.location.country              VARCHAR 100.0%
  ip_address                technology.internet.ip_v4               VARCHAR 100.0% [ipv4_detection]

5/5 columns typed, 1000 rows analyzed

You now know the semantic types in your Parquet file. From here you can export a schema (finetype profile -f data.parquet -o json-schema), validate and materialise a typed table (finetype validate data.parquet schema.json --db out.db --table sample), or simply use the profile as documentation.

Option B: Use the DuckDB extension

The Finetype DuckDB extension profiles columns directly inside SQL — no CSV export needed.

1. Install and load the extension

INSTALL finetype FROM community;
LOAD finetype;

The signed community artifact loads on DuckDB 1.2 through 1.5+. See the DuckDB Extension docs for the full function reference.

2. Profile every column

Materialise the Parquet file as a table, then pass its name to the ft_profile table macro:

CREATE TABLE data AS SELECT * FROM read_parquet('data.parquet');

FROM ft_profile('data');
┌─────────────┬─────────────────────────────────────┬────────────────────┬─────────────┐
│ column_name │                type                 │     confidence     │ duckdb_type │
├─────────────┼─────────────────────────────────────┼────────────────────┼─────────────┤
│ amount      │ finance.currency.amount             │ 0.9960123300552368 │ VARCHAR     │
│ created_at  │ datetime.timestamp.iso_8601         │ 0.9695983529090881 │ TIMESTAMP   │
│ email       │ identity.person.email               │                1.0 │ VARCHAR     │
│ id          │ representation.identifier.increment │ 0.9105001091957092 │ BIGINT      │
│ ip_address  │ technology.internet.ip_v4           │                1.0 │ INET        │
│ name        │ identity.person.full_name           │ 0.9888034462928772 │ VARCHAR     │
└─────────────┴─────────────────────────────────────┴────────────────────┴─────────────┘

ft_profile returns one row per column — the detected type, confidence, and the DuckDB type to cast to — the equivalent of finetype profile running entirely inside DuckDB.

Because the result is an ordinary relation, you can filter it inline — for example, to surface only the columns that warrant a typed cast:

SELECT column_name, type, duckdb_type
FROM ft_profile('data')
WHERE duckdb_type <> 'VARCHAR';

What you learned

  • finetype profile reads Parquet directly — the same command as for CSV, no conversion step
  • The DuckDB extension's ft_profile table macro profiles columns in-place — useful when you want to stay in SQL
  • Both paths produce the same Finetype type labels

See also

On this page