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.

Ability to run builtin validation checks via CLI

See original GitHub issue

Overview

We have builtin checks in the framework which is not enabled by default - https://framework.frictionlessdata.io/docs/guides/validation-checks#table-dimensions. We want a way to enable them via CLI.

I think in general we need to provide a JSON interface to do so. It will be a universal way that supports all the builtin checks and all the enabled via plugins custom checks.

$ frictionless validate table.csv --checks '[{"code": "table-dimensions", "numRows": 10}]'

On the other hand, we might need to provide some shortcuts for most common conditions (again similar for the dialect API). For example:

$ frictionless validate table.csv --forbidden-values 'columnName:value1,value2,value3' --formula 'columnX > columnY`

@shashigharti @aivuk Let’s discuss what options we’d like to expose

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
rollcommented, May 17, 2022

@aivuk @shashigharti @aborruso

Human readable syntax brainstorming:

$ frictionless validate table.csv --checks duplicate-row deviated-cell forbidden-value:values=a,b,c 
2reactions
rollcommented, May 17, 2022

@aivuk The default JSON interface is still good to have as:

  • it’s a universal way for FD
  • we use the same for dialect/etc
  • it will work for any checks added in the future
  • it can be used for non-human CLI usage (JSON stringified)

Another question is that the second way of providing checks might be exactly as you suggest. Of course, it will require some smart CLI coding:

providing two checks might be a problem for this syntax

$ frictionless validate table.csv --check CHECK_CODE1 --PARAM_NAME1 PARAM_VALUE1 --PARAM_NAME 2 --PARAM_VALUE2 CHECK_CODE2 

OR

… [alternatives]

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI - Open Policy Agent
The 'run' command can ONLY be used with the –bundle flag to verify signatures for existing bundle files or directories following the bundle...
Read more >
Command: validate | Terraform - HashiCorp Developer
Validate runs checks that verify whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing ...
Read more >
Validate the Configuration of a Debugging Engine - JetBrains
PhpStorm can validate your configuration of Xdebug or Zend Debugger and tell you if some setting is missing or inconsistent with other settings....
Read more >
ASK CLI Command Reference | Alexa Skills Kit
High-level commands simplify working with your Alexa skill projects by abstracting details and performing multiple actions. Start with these commands if you are ......
Read more >
Redocly CLI
An unbundled definition is far easier to edit and check for duplicates. Our Redocly CLI lets you quickly validate and lint a multi-file...
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