specs icon indicating copy to clipboard operation
specs copied to clipboard

Create new type `table`

Open akariv opened this issue 7 years ago • 3 comments

This new JTS type will be identical to array, except it will have a mandatory attribute schema which will contain a valid JSON Table Schema for the items in the array.

For example:

"schema": {
  "fields": [
    { "name": "tender-id", "type": "string", "constraints": {"required": true} },
    { "name": "tender-documents",
      "type": "table",
      "schema": {
        "fields": [
          { "name": "document-date", "type": "date"},
          { "name": "document-title", "type": "string"},
          { "name": "document-url", "type": "string", "format": "uri"}
        ]
      }
    }
  ]
}

akariv avatar Apr 30 '17 10:04 akariv

@akariv i like the idea but sense this is post v1.0. Could you do a PR to add this as a pattern in the mean time?

rufuspollock avatar May 24 '17 00:05 rufuspollock

+1 on this.

pwalsh avatar May 29 '17 07:05 pwalsh

See my comment at https://github.com/frictionlessdata/specs/issues/409#issuecomment-930029124

Noting that this implementation maps well onto document-based data backends that support nesting (mongodb, Elasticsearch) and a version of this is already implemented in https://github.com/frictionlessdata/tableschema-elasticsearch-py

pwalsh avatar Sep 29 '21 10:09 pwalsh