framework icon indicating copy to clipboard operation
framework copied to clipboard

Support multipart excel files in the resourse´s path property

Open hslinhares opened this issue 2 years ago • 1 comments

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: ';'

link to clone the datapackage-reprex or download the files

hslinhares avatar Jul 25 '23 16:07 hslinhares

@hslinhares Thank you for reporting!. We will investigate.

shashigharti avatar Jul 26 '23 03:07 shashigharti