noi-techpark / it.bz.opendatahub.databrowser

Explore and navigate through Open Data you need to build your next service.
https://databrowser.opendatahub.com
GNU Affero General Public License v3.0
8 stars 7 forks source link

As a Open Data Hub Manager I want the MetaData API extended with the fields Dataspace, Category and Data Provider to store more information about the Dataset Meta Data. #416

Closed sseppi closed 8 months ago

sseppi commented 11 months ago

As discussed in the meeting we need to add 3 more field at the Meta Data endpoint:

Since we want to populate the flitering options and the dropdown menu to input the data in the Data Browser with the already existing values, we probably need to extend the raw filter with a distinct/unique functionality. In that way we could get the values by using the fields functionality combined with the unique/distinct functionality on the same field selected.

In that way, for the input side at a Data Browser level we will extend the exixting dropdown component or creating a new one that allow the user either to:

sseppi commented 11 months ago

@mrabans @RudiThoeni feel free to integrate my description if I forgot or misunderstood something

RudiThoeni commented 11 months ago

I added the three fields

For extending the rawfilter if it is possible to integrate a Distinct i will discuss with Tobias, not sure if it can be implemented easily. Also it could be useful to add a contains Function.

sseppi commented 11 months ago

@RudiThoeni Thanks!

I will test everything and let you know if we can put it in production.

RudiThoeni commented 11 months ago

@sseppi I added a new Route to query the tourism data with a distinct function.... Integrating in the rawfilter was not that easy so i decided to add it as a a generic function ....

It is on Test and documented here https://github.com/noi-techpark/odh-docs/wiki/Distinct-Search-in-ODH-Tourism-api

I think to quick start here an example with Metadata Api

-give me the values of the string field OdhType unique https://api.tourism.testingmachine.eu/v1/Distinct?odhtype=odhmetadata&fields=OdhType&rawsort=OdhType

-give me the values of the Array Sources unique https://api.tourism.testingmachine.eu/v1/Distinct?odhtype=odhmetadata&fields=Sources.[*]&rawsort=Sources.[*]

by passing &pagenumber=1 at example https://api.tourism.testingmachine.eu/v1/Distinct?odhtype=odhmetadata&fields=Sources.[*]&rawsort=Sources.[*]&pagenumber=1 we get the result wrapped in our paging object........

RudiThoeni commented 11 months ago

maybe also this parameter makes the life easier ;) https://api.tourism.testingmachine.eu/v1/Distinct?odhtype=odhmetadata&fields=Sources.[*]&rawsort=Sources.%5B*%5D&getasarray=true

sseppi commented 11 months ago

Hi @MatteoBiasi ,

we added in testing to the Metadata API the new fields Dataspace, Category and Data Provider so you can now implement it in the visualization and use it to filter the datasets as defined in the Figma files. We implemented also the Distinct funtion, to get all values only one time. In that way it should be easier for you to populate the multiple choiche functions.

Moreover can you please add the fileds to the configuration of the MetaData API, so that the user can fill it out? the best way to go it should be that for each field the user has the possibility to choose one of the existing values and, it the value he is looking for isn't there, he can add it as simple string. @gapp and @pkritzinger do we already have similar components, as I remember not...

The next steps are:

pkritzinger commented 11 months ago

Hi @sseppi Not sure if I got your request correctly but I think that our proposal for editing the "Published on" attribute could meet your requirements pretty well. Please have a look at the 3 screens in the section: "As an Open Data Hub manager I want to see the filed "Published on" in the Configured View, to allow the user to see and configure where the data are used"

https://www.figma.com/file/DmuP6Dbv5LzkCNOXrDnWIL/2023?type=design&node-id=68%3A2374&mode=design&t=V6SdicRYCaTr8HnI-1

sseppi commented 11 months ago

Hi @sseppi Not sure if I got your request correctly but I think that our proposal for editing the "Published on" attribute could meet your requirements pretty well. Please have a look at the 3 screens in the section: "As an Open Data Hub manager I want to see the filed "Published on" in the Configured View, to allow the user to see and configure where the data are used"

https://www.figma.com/file/DmuP6Dbv5LzkCNOXrDnWIL/2023?type=design&node-id=68%3A2374&mode=design&t=V6SdicRYCaTr8HnI-1

Hi @pkritzinger,

I tried the Published on functionality that has been implemented and, as you can see in the screenshot below, it is missing the possibility to add a new publisher as a string.

Screenshot from 2023-08-17 11-08-38

For the Publishers it is fine this behavior. But for the new fields we need to to provide to the user the possibility to add a new value as a string. This means that the steps the data manager will do are the following:

  1. use the drop-down menu and search in the existing values
  2. if he needs a need a new value selects the value "other" or "new"
  3. the fields becomes a string input filed
  4. the user input the new value and saves

The next time the user should find the new value in the drop-down menu.

Did I clarify what I meant? The Published on attribute you designed in the Figma file was intended so?

@MatteoBiasi Maybe the drop-down menu is already implemented like that and it must only be configured properly. Can you please check? @MatteoBiasi The drop-down menu should be populated by using the distinct function on the field we are populating.

pkritzinger commented 11 months ago

Hi @sseppi You are right, the published on functionality that is online does not include the features you requested since (as far as I remember) we implemented a more simple published on component. But the design in the figma-file should meet your needs (s. Screenshot below).

Let me know what you think.

image image

MatteoBiasi commented 11 months ago

Hi all, two questions:

  1. I don't see in testing the new fealds of the metadata API: https://api.tourism.testingmachine.eu/v1/MetaData?pagesize=1000. Maybe they still have to be deployed?
  2. @sseppi ok for implementing the new selector, but I suggest to implement this as a separate issue/release from #204, since we're touching different features of the platform.
sseppi commented 11 months ago

Hi @MatteoBiasi ,

Hi all, two questions:

  1. I don't see in testing the new fealds of the metadata API: https://api.tourism.testingmachine.eu/v1/MetaData?pagesize=1000. Maybe they still have to be deployed?

I had a look in swagger and, as you can see from the screenshot below, I see the values in the JSON Schema

Screenshot from 2023-08-17 17-40-44

https://api.tourism.testingmachine.eu/swagger/index.html#/MetaData/TourismApi

Can it be that you have removenullvalues set to true per default?

  1. @sseppi ok for implementing the new selector, but I suggest to implement this as a separate issue/release from As an Open data Hub manager I want a better and simpler navigation #204, since we're touching different features of the platform.

OK, fine for me... Will you create the new Issue or shall I do?

gappc commented 11 months ago

This issue gets a bit crowded with different features and discussions, I think we must separate it in order to keep the overview:

I kindly ask you all to hold the appropriate discussions in the relevant issues, thank you.

a-crea commented 9 months ago

Hi, I have a couple of questions about the implementation of the new fields (Dataspace, Category, Data Provider).

1) I see that metadata is obtained by making a paginated query and matching the ID with the params ID. Is there a direct access? 2) If they need to be made editable and the user can save them, to which endpoint should they be sent? Because the edit view makes a PUT call to the relevant entity, but it does not support that data. 3) Where, in the edit view page, should be added?

gappc commented 9 months ago

Hi @a-crea

  1. which params ID do you refer to? What do you mean by direct access?
  2. if I understand you correctly, you want to know to what endpoint you should send the updated data? If that's the case: it's just the MetaData endpoint, but be aware that the new properties are deployed at the moment on testing environment only (see https://api.tourism.testingmachine.eu/swagger/index.html#/MetaData/SingleMetaData), they do not appear in the production environment (https://tourism.api.opendatahub.com/swagger/index.html#/MetaData/SingleMetaData). I got confused in the beginning, too ;)
  3. this question is best answered by @sseppi, @pkritzinger and @Mazzolintis

Let me know if you have further questions

sseppi commented 8 months ago

@RudiThoeni Just to be 100% sure, this feature has been released already in production? If so, I think we can close this issue

Do I'm right?

RudiThoeni commented 8 months ago

Hi @sseppi yes it is all on production. You can always check the new fields if you look on the Datamodel on swagger https://tourism.api.opendatahub.com/swagger/index.html#/MetaData/TourismApi Issue can be closed.