These are chat archives for frictionlessdata/chat

31st
Mar 2018
Andrea Borruso
@aborruso
Mar 31 2018 11:36
Hi all. A question about the great goodtable: how to read inferred schema output via command line?
If I run goodtables --infer-schema input.csv, I do not have any information about table fields.
I have only
{
    "tables": [
        {
            "error-count": 0,
            "format": "csv",
            "row-count": 384,
            "encoding": "utf-8",
            "headers": [
                "title",
                "accessURL",
                "downloadURL",
                "nomefile"
            ],
            "errors": [],
            "source": "input.csv",
            "time": 0.095,
            "scheme": "file",
            "valid": true,
            "schema": "table-schema"
        }
    ],
    "error-count": 0,
    "table-count": 1,
    "warnings": [],
    "valid": true,
    "time": 0.099,
    "preset": "nested"
}
Thank you
Rufus Pollock
@rufuspollock
Mar 31 2018 15:43

@aborruso i'm not sure goodtables will output this.

The way I use to get the inferred schema at the moment is to use the data command line tool: https://datahub.io/docs/features/data-cli

data init

This will print out the schema (as well as datapackage.json). If you'd like to see a pure data infercommand less me know - it would be easy to add.

Andrea Borruso
@aborruso
Mar 31 2018 15:47
@rufuspollock I have read this frictionlessdata/goodtables-py#258 and and I thought it could do it.
And than what's the meaning of infer-schema option?
Rufus Pollock
@rufuspollock
Mar 31 2018 15:48
@aborruso the point of the infer schema option is that it guesses the schema for you prior to validating rather than validating without a schema (if you did not provide one). Why would you ever validate without a schema? Because goodtables does both "structural" validation (do you have empty columns, blank rows etc) and schema validation.
Andrea Borruso
@aborruso
Mar 31 2018 15:50
Ok, I thought that it infer schema when ther is no one. Ok, my fault. Thank you, a stupid question
Rufus Pollock
@rufuspollock
Mar 31 2018 15:50
@aborruso np and a very sensible question ...
Andrea Borruso
@aborruso
Mar 31 2018 15:51
than I will try data init input.csv
mmm, I have some node problem :(
I love goodtables, because it's easier as enviromente
Rufus Pollock
@rufuspollock
Mar 31 2018 15:52
@aborruso did you install the packaged binaries - then you don't need to worry about node ...
Andrea Borruso
@aborruso
Mar 31 2018 15:53
ok, I'll do it
I have installed it via node
Rufus Pollock
@rufuspollock
Mar 31 2018 16:24
@aborruso did that work?
Andrea Borruso
@aborruso
Mar 31 2018 16:25
@rufuspollock yea!!
Thank you
Rufus Pollock
@rufuspollock
Mar 31 2018 16:27
:thumbsup: