Skip to content

Resource

Defined in: resource/Resource.ts:12

Data Resource interface built on top of the Data Package standard and Polars DataFrames

https://datapackage.org/standard/data-resource/

  • Metadata

[key: `${string}:${string}`]: any

optional $schema: string

Defined in: resource/Resource.ts:16

JSON schema profile URL for validation


optional bytes: number

Defined in: resource/Resource.ts:73

Size of the file in bytes


optional data: unknown

Defined in: resource/Resource.ts:34

Inline data content instead of referencing an external file Either path or data must be provided


optional description: string

Defined in: resource/Resource.ts:68

A description of the resource


optional dialect: string | Dialect

Defined in: resource/Resource.ts:95

Table dialect specification Describes delimiters, quote characters, etc.

https://datapackage.org/standard/table-dialect/


optional encoding: string

Defined in: resource/Resource.ts:58

Character encoding of the resource

"utf-8"

optional format: string

Defined in: resource/Resource.ts:46

The file format

"csv", "json", "xlsx"

optional hash: string

Defined in: resource/Resource.ts:78

Hash of the resource data


optional jsonSchema: string | Descriptor

Defined in: resource/Resource.ts:109

Schema for the json data Describes fields in the json, constraints, etc.

https://json-schema.org/


optional licenses: License[]

Defined in: resource/Resource.ts:88

License information


optional mediatype: string

Defined in: resource/Resource.ts:52

The media type of the resource

"text/csv", "application/json"

name: string

Defined in: resource/Resource.ts:22

Unique resource identifier Should use lowercase alphanumeric characters, periods, hyphens, and underscores


optional path: string | string[]

Defined in: resource/Resource.ts:28

A reference to the data itself, can be a path URL or array of paths Either path or data must be provided


optional schema: string | Schema

Defined in: resource/Resource.ts:102

Schema for the tabular data Describes fields in the table, constraints, etc.

https://datapackage.org/standard/table-schema/


optional sources: Source[]

Defined in: resource/Resource.ts:83

Data sources


optional title: string

Defined in: resource/Resource.ts:63

Human-readable title


optional type: "table"

Defined in: resource/Resource.ts:40

The resource type

"table"