describe
and list
command: if datapackage.json
is not provided describe
will load a sample from every tabular data file in a dataset and infer a schema while list
is a very lean and quick command operating only with available metadata and not touching actual data files.
With Frtictionless describe
command you can get a metadata of file or a dataset.
By default, it outputs metadata visually formatted:
frictionless describe tables/*.csv
─────────────────────────────────── Dataset ────────────────────────────────────
dataset
┏━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ name ┃ type ┃ path ┃
┡━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ chunk1 │ table │ tables/chunk1.csv │
│ chunk2 │ table │ tables/chunk2.csv │
└────────┴───────┴───────────────────┘
──────────────────────────────────── Tables ────────────────────────────────────
chunk1
┏━━━━━━━━━┳━━━━━━━━┓
┃ id ┃ name ┃
┡━━━━━━━━━╇━━━━━━━━┩
│ integer │ string │
└─────────┴────────┘
chunk2
┏━━━━━━━━━┳━━━━━━━━┓
┃ id ┃ name ┃
┡━━━━━━━━━╇━━━━━━━━┩
│ integer │ string │
└─────────┴────────┘
It's possible to output as YAML
or JSON
, for example:
frictionless describe tables/*.csv --yaml
resources:
- name: chunk1
type: table
path: tables/chunk1.csv
scheme: file
format: csv
mediatype: text/csv
encoding: utf-8
schema:
fields:
- name: id
type: integer
- name: name
type: string
- name: chunk2
type: table
path: tables/chunk2.csv
scheme: file
format: csv
mediatype: text/csv
encoding: utf-8
schema:
fields:
- name: id
type: integer
- name: name
type: string