Skip to content

Commit

Permalink
[profiles,#87,#418][m]: reintroduce profiles work from v1 alpha as se…
Browse files Browse the repository at this point in the history
…parate mini-spec.

* /profiles/ is a mini-spec explaining and defining meaning and syntax of profile property
* [dr]: add profile property
* [dp]: add profile property
  • Loading branch information
rufuspollock committed May 23, 2017
1 parent c07ee66 commit 67fa3f9
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
20 changes: 20 additions & 0 deletions content/data-package/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,26 @@ Here is an example:
[semver]: http://semver.org
[url-or-path]: /data-resource/#url-or-path

#### `profile`

A string identifying the [profile][] of this descriptor as per the [profiles][profile] specification.

[profile]: /profiles/

Examples:

```javascript
{
"profile": "tabular-data-package"
}
```

```
{
"profile": "http://example.com/my-profiles-json-schema.json"
}
```

### Optional Properties

The following are commonly used properties that the package descriptor MAY contain:
Expand Down
22 changes: 22 additions & 0 deletions content/data-resource/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,28 @@ A resource MUST contain a `name` property. The name is a simple name or
* It would be usual for the name to correspond to the file name (minus the
extension) of the data file the resource describes.

## Recommended Properties

### `profile`

A string identifying the [profile][] of this descriptor as per the [profiles][profile] specification.

[profile]: /profiles/

Examples:

```javascript
{
"profile": "tabular-data-resource"
}
```

```
{
"profile": "http://example.com/my-profiles-json-schema.json"
}
```

## Optional Properties

A descriptor MAY contain any number of additional properties. Common properties include:
Expand Down
39 changes: 39 additions & 0 deletions content/profiles/contents.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
_model: page
---
title: Profiles
---
updated: 24 May 2017
---
created: 11 December 2017
---
author:
- Rufus Pollock (Open Knowledge International)
- Paul Walsh (Open Knowledge International)
---
summary: Data Package and Data Resource Profiles
---
body:

Different kinds of data need different data and metadata formats. To support these different data and metadata formats we need to extend and specialise the generic Data Package. These specialized types of Data Package (or Data Resource) are termed **profiles**. For example, there is a [Tabular Data Package][tdp] profile that specializes Data Packages specifically for tabular data.

Thus, every Package and Resource descriptor has a profile. The default profile, if none is declared, is `default`. The namespace for the profile is the type of descriptor, so, default for a Package descriptor is not the same as default for a Resource descriptor.

In summmary, an extension of Data Package may be formalised as a profile. A profile is a Data Package which extends the default specification towards more specific needs.

## `profile` Property

In addition to the concept, we need an explict way for publishers to state the profile they are using and consumers to discover this.

Thus, we have a `profile` property that declares the profile for the descriptor for this Package or Resource. For the default Data Package and Data Resource descriptor, this SHOULD be present with a value of default, but if not, the absence of a profile is equivalent to setting "profile": "default".

Custom profiles MUST have a profile property, where the value is a unique identifier for that profile. This unique identifier `MUST` be a string and can be in one of two forms. It can be an id from the official [Data Package Schema Registry][registry], or, a fully-qualified URL that points directly to a JSON Schema that can be used to validate the profile.

As part of the Frictionless Data Specifications project, we publish a number of Data Package profiles such as:

* [Tabular Data Package][tdp]
* [Fiscal Data Package][fdp]

[registry]: http://schemas.frictionlessdata.io/registry.json
[tdp]: /tabular-data-package/
[fdp]: /fiscal-data-package/

0 comments on commit 67fa3f9

Please sign in to comment.