question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI frictionless `summary` ignores `required` property of fields

See original GitHub issue

Overview

frictionless summary countries.resource.yaml command ignores real value field property required

Input data

File COUNTRIES.csv:

CID;ECC;CCD;CNAME
11;E2;2;Czech Republic

File countries.resource.yaml:

# --------
# metadata: COUNTRIES.csv
# --------

path: COUNTRIES.csv
name: countries
profile: tabular-data-resource
scheme: file
format: csv
hashing: md5
encoding: utf-8-sig
dialect:
  delimiter: ;
schema:
  fields:
    - type: integer
      name: CID
      required: true
    - type: string
      name: ECC
      required: false
    - type: integer
      name: CCD
    - type: string
      name: CNAME

Summary output

$ frictionless summary countries.resource.yaml

# Describe 

+--------+---------+------------+
| name   | type    | required   |
+========+=========+============+
| CID    | integer |            |
+--------+---------+------------+
| ECC    | string  |            |
+--------+---------+------------+
| CCD    | integer |            |
+--------+---------+------------+
| CNAME  | string  |            |
+--------+---------+------------+

# Extract 

+-----+------+-----+------------------+
| CID | ECC  | CCD | CNAME            |
+=====+======+=====+==================+
|  11 | 'E2' |   2 | 'Czech Republic' |
+-----+------+-----+------------------+


# Validate 

# -----
# valid: COUNTRIES.csv 
# -----

## Summary 

+------------------------+-------------------+
| Description            | Size/Name/Count   |
+========================+===================+
| File name              | COUNTRIES.csv     |
+------------------------+-------------------+
| File size (bytes)      | 46                |
+------------------------+-------------------+
| Total Time Taken (sec) | 0.008             |
+------------------------+-------------------+

As can be seen, required columns is empty, regardless of the fact:

  • field CID is explicitly required
  • field ECC is explicitly not required
  • fields CCD and CNAME shall be by definition (as default value) required

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
vlcinskycommented, Jul 18, 2022

@roll this explains couple of things.

0reactions
rollcommented, Jul 19, 2022

The warning has been added in #1193 (will be released in v5 this month)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validating Data - Frictionless Framework
We can validate this file by using both command-line interface and ... is not valid: 'bad' is not of type 'array' at property...
Read more >
Salesforce B2C Commerce / Customer 360 Platform Integration
This approach powers frictionless customer experiences across B2C Commerce ... b2c-crm-sync requires a B2C Commerce Sandbox and a Salesforce ...
Read more >
Required field error message not displayed when using Patch ...
Solved: Hello, I have a powerapps form with submit button onselect having a patch function tthat creates a new item. The required fields...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found