Open-Data-Product-Initiative / dev

Open Data Product Specification Development version
https://opendataproducts.org/dev/
Apache License 2.0
1 stars 0 forks source link

Add opportunity to link data product with data contract #9

Closed kyyberi closed 3 months ago

kyyberi commented 4 months ago

Is your feature request related to a problem? Please describe. Data products are shared and technical data contract is used in the process. That data contract is generated separately. Having a link to data contract in the data product would make sense.

Describe the solution you'd like Possibly attribute to root level?

Additional context Data Contracts

  1. https://datacontract.com/
  2. https://github.com/bitol-io/open-data-contract-standard
kyyberi commented 4 months ago

Suggested implementation approach below. This is optional object directly under the product details object.

model

product:
  details:
     contract:
        id:      # ID, like uuid in the system managing contracts  
        type:  # this can be ODCS or DCS 
        version:   # defines the version of the above type standard used
        url:   # link to contract management system. Should be full link and go directly to agreement details. 

example

product:
  details:
     contract:
       id: "2343e34543567e767i23" 
       type: "ODCS" 
       version: "2.2"
       url: "https://demo.datamesh-manager.com/demo834016807886/dataproducts/9bd53b1b-b51e-41a8-a757-4d33b4cde460"
kyyberi commented 4 months ago

Questions:

  1. is it possible that there is need to define multiple data contracts here?
  2. should it be possible to include the data contract as YAML inline object under the contract object?
kyyberi commented 4 months ago

Questions:

1. is it possible that there is need to define multiple data contracts here?

2. should it be possible to include the data contract as YAML inline object under the contract object?

To enable the inline YAML object mentioned in the question 2, one possibility is to add spec element under which the data contract code can be added as is. That would follow the pattern we have used in data quality and SLA.

product:
  details:
     contract:
        id:      # ID, like uuid in the system managing contracts  
        type:  # this can be ODCS or DCS 
        version:   # defines the version of the above type standard used
        spec: # under this the YAML formatted contract can be added directly. 
kyyberi commented 4 months ago

I am not sure should this be under the product details directly, or should we start a new root level object for data contract. We have data licensing object to which this might be related to later, but that is legally oriented while data contract is technically oriented.

kyyberi commented 4 months ago

Also our model has data access object separately. That is often part of the data contract.

kyyberi commented 4 months ago

One clearly tempting option is to rename existing data access to data contract and align the models if needed. ODPS data access object resembles in spirit and intention to some extent the data contract purpose

kyyberi commented 4 months ago

Another approach is to keep the data product and contract totally separated. Then only a link and/or reference to contract exists in the data product description. This is was also the initial idea.

kyyberi commented 3 months ago

After some considerations I propose that we add the data contract to the document level as optional element with URL linking and spec (inline) options. Some customers want to use this to define access and other details.

product:
     contract:
        id:      # ID, like uuid in the system managing contracts  
        type:  # this can be ODCS or DCS 
        version:   # defines the version of the above type standard used
        URL: # link to contract manager service
        spec: # under this the YAML formatted contract can be added directly. 

Other customers who do not want to use Data Contract can use Data Access object to define access related details. Refinement of Data Access object is already another item in the backlog #10

kyyberi commented 3 months ago

Details in the PR

kyyberi commented 3 months ago

Supported in TSC