A resource MUST contain a property describing the location of the data associated to the resource. The location of resource data MUST be specified by the presence of one (and only one) of these two properties:
path: for data in files located online or locally on disk.
A “url-or-path” is a string with the following additional constraints:
MUST either be a URL or a POSIX path
URLs MUST be fully qualified. MUST be using either http or https scheme. (Absence of a scheme indicates MUST be a POSIX path)
POSIX paths (unix-style with / as separator) are supported for referencing local files, with the security restraint that they MUST be relative siblings or children of the descriptor. Absolute paths (/) and relative parent paths (…/) MUST NOT be used, and implementations SHOULD NOT support these path types.
Examples:
# fully qualified url
"path": "http://ex.datapackages.org/big-csv/my-big.csv"
# relative path
# note: this will work both as a relative path on disk and on online
"path": "my-data-directory/my-csv.csv"
Os trechos relevantes da especificação:
A resource MUST contain a property describing the location of the data associated to the resource. The location of resource data MUST be specified by the presence of one (and only one) of these two properties:
path
: for data in files located online or locally on disk.data
: for data inline in the descriptor itself.path
Data in Filespath
MUST be a string – or an array of strings (see “Data in MultipleFiles”). Each string MUST be a “url-or-path” as defined in the next section.
URL or Path
A “url-or-path” is a
string
with the following additional constraints:MUST
either be a URL or a POSIX pathMUST
be a POSIX path)/
as separator) are supported for referencing local files, with the security restraint that theyMUST
be relative siblings or children of the descriptor. Absolute paths (/) and relative parent paths (…/) MUST NOT be used, and implementations SHOULD NOT support these path types.Examples: