Skip to content

Resource

Defined in: core/resource/Resource.ts:11

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

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

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

optional $schema: string

Defined in: core/resource/Resource.ts:15

JSON schema profile URL for validation


optional bytes: number

Defined in: core/resource/Resource.ts:72

Size of the file in bytes


optional data: unknown

Defined in: core/resource/Resource.ts:33

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


optional description: string

Defined in: core/resource/Resource.ts:67

A description of the resource


optional dialect: string | Dialect

Defined in: core/resource/Resource.ts:94

Table dialect specification Describes delimiters, quote characters, etc.

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


optional encoding: string

Defined in: core/resource/Resource.ts:57

Character encoding of the resource

"utf-8"

optional format: string

Defined in: core/resource/Resource.ts:45

The file format

"csv", "json", "xlsx"

optional hash: string

Defined in: core/resource/Resource.ts:77

Hash of the resource data


optional licenses: License[]

Defined in: core/resource/Resource.ts:87

License information


optional mediatype: string

Defined in: core/resource/Resource.ts:51

The media type of the resource

"text/csv", "application/json"

name: string

Defined in: core/resource/Resource.ts:21

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


optional path: string | string[]

Defined in: core/resource/Resource.ts:27

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: core/resource/Resource.ts:101

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

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


optional sources: Source[]

Defined in: core/resource/Resource.ts:82

Data sources


optional title: string

Defined in: core/resource/Resource.ts:62

Human-readable title


optional type: "table"

Defined in: core/resource/Resource.ts:39

The resource type

"table"