You can translate the question and the replies:

Connect to embedded Denodo database (Apache Derby) using REST API (required metadata view_custom_property.json, localviews.json).

Hello all, I would like to connect to the "live data" of the files view_custom_property.json and localviews.json. And afterwards I would like to create these as a base view. Unfortunately I can't find the right schema to access it via REST API: http://<host>/denodo-data-catalog/public/api/views Unfortunately this does not work Thanks a lot
user
07-03-2022 07:35:49 -0500

5 Answers

Hi, In general, the export file of the Data Catalog consists of files such as view_custom_property.json, localviews.json and it will be stored in the local storage. At the moment,in order to access the Data Catalog Metadata files via REST API I would do the following steps: * Create a [JSON](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/json_sources/json_sources) data source by pointing to the exported metadata folder. * Then, create the corresponding base views on top of that to access those exported files. * Finally, publish those views as a web service([REST API](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/publication_of_web_services/publishing_rest_web_services/publishing_rest_web_services)). Hope this helps!
Denodo Team
09-03-2022 06:09:25 -0500
Thank you very much for the information. Regarding point 1, do you mean this file path: "/opt/denodo/denodo-platform/metadata/data-catalog-database" (Edit local Connection)? I can't find the json files (view_custom_property.json, localviews.json) here. Regarding point 3, I have read the article and already have access to the views in the data catalogue, but I am trying to access all the data (custom_property_group etc.) here. https://<host>/denodo-restfulws/<database>/views/<view_name>/?$format=JSON
user
09-03-2022 07:08:12 -0500
Hi, 1, Regarding your question 1, in general the exported metadata file will be saved in a ZIP format. After unzipping the file, there will be a folder which contains all the metadata files in JSON format. You could also specify the path along with the file name in the -f in [export](https://community.denodo.com/docs/html/browse/8.0/en/vdp/data_catalog/appendix/scripts/export_metadata_script) script , so that the export file will be saved in the specified path.You could also refer to the Data Catalog [Export Metadata Script](https://community.denodo.com/docs/html/browse/8.0/en/vdp/data_catalog/appendix/scripts/export_metadata_script) section from the Data Catalog Guide. 2, Regarding your question 2, the exported files will be saved in a one folder. Then in order to access all the JSON files within a folder, I would perform the following steps : * Create a JSON data source and provide the path in Data Route along with file name as interpolation variable. - eg: /home/dc-metadata-1646916353189/@filename.json * Now create the base view (eg: bv_datacatalog) and while executing the base view, the VDP server prompts the user to specify the filename that needs to be accessed. * Publish this base view as REST API or access this base view from a Restful webservice. For example, if I want to access the file ‘localviews.json’ by using the API, I would use the following url : ``` http://<host>/<port>/denodo-restfulws/admin/views/bv_datacatalog?$filter=filejson_0='localviews.json'&$format=json ``` Similarly, If I want to access the ‘custom_property_group.json’, then I would replace the file name in the filter condition of the above specified URL. For more information, you could refer to the [Paths and Other Values with Interpolation Variables](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/path_types_in_virtual_dataport#paths-and-other-values-with-interpolation-variables) and [Input Parameters of the RESTful Web Service](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/restful_architecture/restful_web_service/input_parameters_of_the_restful_web_service) sections of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
14-03-2022 03:21:16 -0400
Hello, 2. do I have to store the files (view_custom_property.json, localviews.json) locally (e.g.: /home/dc-metadata...) somewhere? I wanted to access this data directly without having to export it first and then store it somewhere.
user
14-03-2022 09:51:54 -0400
Hi, The files such as view_custom_property.json, localviews.json, custom_property_group etc. are the exported files of the Data Catalog metadata and it will be generated only after exporting the metadata of the Data Catalog. You could save the exported file in any path of the local system by specifying the path in -f in [Export](https://community.denodo.com/docs/html/browse/8.0/en/vdp/data_catalog/appendix/scripts/export_metadata_script) Script. Hope this helps!
Denodo Team
15-03-2022 08:29:04 -0400
You must sign in to add an answer. If you do not have an account, you can register here