-
Given this TSV file: date category sub_category amount from to description url
2025-01-01 START N/A 3023.46 - - Balance from 2024 N/A
2025-01-28 DEBIT TRADE -3023 Deployer 0xb1 Velodrome Sell for USDC https://optimistic.etherscan.io/tx/0x79e857395945f03a57454efcccdc5ca00430f5886018d71a9a137808a60fe7fc
Toggle to see JSON schema
{
"$schema": "https://json-schema.org/draft-07/schema",
"title": "JSON Schema for foo.tsv",
"description": "Inferred JSON Schema with `qsv schema foo.tsv`",
"type": "object",
"properties": {
"date\tcategory\tsub_category\tamount\tfrom\tto\tdescription\turl": {
"description": "date\tcategory\tsub_category\tamount\tfrom\tto\tdescription\turl column from foo.tsv",
"minLength": 54,
"maxLength": 168,
"type": [
"string"
],
"enum": [
"2025-01-01\tSTART\tN/A\t3023.46\t-\t-\tBalance from 2024\tN/A",
"2025-01-28\tDEBIT\tTRADE\t-3023\tDeployer 0xb1\tVelodrome\tSell for USDC\thttps://optimistic.etherscan.io/tx/0x79e857395945f03a57454efcccdc5ca00430f5886018d71a9a137808a60fe7fc"
]
}
},
"required": [
"date\tcategory\tsub_category\tamount\tfrom\tto\tdescription\turl"
]
} And that schema doesn't look right to me - why would the concatenated column names be a property? I was expecting one property for each column. |
Beta Was this translation helpful? Give feedback.
Answered by
PaulRBerg
Sep 17, 2025
Replies: 2 comments 1 reply
-
I tested with a CSV file and here it works:
getting: Toggle to see JSON schema
{
"$schema": "https://json-schema.org/draft-07/schema",
"title": "JSON Schema for foo.csv",
"description": "Inferred JSON Schema with `qsv schema foo.csv`",
"type": "object",
"properties": {
"key": {
"description": "key column from foo.csv",
"minLength": 4,
"maxLength": 4,
"type": [
"string"
],
"enum": [
"john",
"mary"
]
},
"value": {
"description": "value column from foo.csv",
"minimum": 42,
"maximum": 100,
"type": [
"integer"
],
"enum": [
42,
100
]
}
},
"required": [
"key",
"value"
]
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looks like a bug: #2997 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
PaulRBerg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like a bug: #2997