framework
framework copied to clipboard
Support multipart excel files in the resourse´s path property
Overview
Frictionless doesn´t support multipart excel files in the resourse´s path property in the same way as csv does.
Snippet of code
frictionless validate https://raw.githubusercontent.com/splor-mg/datapackage-reprex/main/reprex/20231807T163531/datapackage.yaml
─────────────────────────────────────────────────────────────────── Dataset ───────────────────────────────────────────────────────────────────
dataset
┏━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ name ┃ type ┃ path ┃ status ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ excel │ table │ data-raw/alteracoes-orcamentarias_2021.xlsx (multipart) │ INVALID │
│ csv │ table │ data-raw/alteracoes-orcamentarias_2021.csv (multipart) │ VALID │
└───────┴───────┴─────────────────────────────────────────────────────────┴─────────┘
─────────────────────────────────────────────────────────────────── Tables ────────────────────────────────────────────────────────────────────
excel
┏━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Row ┃ Field ┃ Type ┃ Message ┃
┡━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ None │ None │ format-error │ The data source could not be successfully parsed: invalid excel file │
│ │ │ │ "data-raw/alteracoes-orcamentarias_2021.xlsx" │
└──────┴───────┴──────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
datapackage.yaml file validated
name: multipart-resource
resources:
- name: excel
type: table
path: ["data-raw/alteracoes-orcamentarias_2021.xlsx", "data-raw/alteracoes-orcamentarias_2022.xlsx"]
scheme: file
format: xlsx
mediatype: application/vnd.ms-excel
encoding: utf-8
schema: schemas/alteracoes-orcamentarias.yaml
dialect:
excel:
sheet: base
- name: csv
type: table
path: ["data-raw/alteracoes-orcamentarias_2021.csv", "data-raw/alteracoes-orcamentarias_2022.csv"]
scheme: file
format: csv
mediatype: text/csv
encoding: utf-8
schema: schemas/alteracoes-orcamentarias.yaml
dialect:
csv:
delimiter: ';'
@hslinhares Thank you for reporting!. We will investigate.