Skip to main content

scan file

metacrafter scan file <filename> [options]

Detects format from the extension (including compression) and classifies each column. See Formats and File scanning.

File-specific options​

FlagMeaning
--delimiterCSV/TSV delimiter (default: auto-detected)
--tagnameXML tag that wraps records
--encodingCharacter encoding (default: auto-detected)
--compressionauto, none, or a codec (gz, bz2, zip, …)
--sheetWorkbook sheet (XLSX, XLS, ODS): a name, a number from 1, or all. Default: the first sheet that holds a table. all scans every sheet with a header and three rows below it (every non-empty ODS sheet) as a table of its own: the report has one source per sheet (source is the file, table the sheet), like a database scan. Other files are one table
--tableTable of a SQLite database or GeoPackage: a name, a number from 1, or all. Default: the first GeoPackage layer, else the first data table by name. all scans the GeoPackage layers (in gpkg_contents order) and then the other data tables, without metadata, R-tree and SpatiaLite system tables, each as a table of its own (one source per table, as for --sheet all). A metadata table is scanned when it is named. Other files are one table for all. Not with --sheet

Plus the shared scan options. Default --limit is 100 records per field.

Examples​

metacrafter scan file somefile.csv --format short

metacrafter scan file data.parquet \
--format full \
--output-format json \
-o parquet_results.json

metacrafter scan file election.xlsx --sheet all \
--format full --output-format json -o election.json

metacrafter scan file survey.sqlite --table all --format full

metacrafter scan file users.csv \
--fields email,phone,name \
--confidence 50.0 \
--contexts pii \
--format full \
-o filtered_results.json