Open innovation contributions from RSC resulting from the Open Phacts project
Using the Open PHACTS API with KNIME Daniela Digles [email protected] Open PHACTS Community...
-
Upload
damian-powers -
Category
Documents
-
view
222 -
download
0
Transcript of Using the Open PHACTS API with KNIME Daniela Digles [email protected] Open PHACTS Community...
![Page 1: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/1.jpg)
Using the Open PHACTS API with KNIME
Daniela Digles
Open PHACTS Community Workshop
![Page 2: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/2.jpg)
KNIME
Konstanz Information Miner
Available from www.knime.org
Open source data analytics, reporting and integration platform
Workflows can be built by connecting „Nodes“
![Page 3: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/3.jpg)
OPS-Knime nodes
OPS_Swagger:
– creates the API call
– Swagger file is used to automatically provide available API calls and parameters
OPS_JSON:
– executes the API call
– transforms the output into a flattened spreadsheet format
alpha version available from https://github.com/openphacts/OPS-Knime
![Page 4: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/4.jpg)
Swagger
Structured format for the generation of API documentation. (https://helloreverb.com/developers/swagger)
https://raw.githubusercontent.com/openphacts/OPS_LinkedDataApi/1.3.1/api-config-files/swagger.json
…
![Page 5: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/5.jpg)
…
https://dev.openphacts.org/docs/1.3
![Page 6: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/6.jpg)
OPS_Swagger details
Knime node where the user provides a url to a Swagger file (default: current Open PHACTS API)
File is parsed and provides a list of the available API calls.
Parameters tab is updated to the available parameters.
Parameters can be set in the parameters tab or in the input table.
Output of the node is an executable API call.
Advantages– Updates to Swagger file are automatically shown in the node interface.– Descriptions of the parameters are available.– Nodes remember the configuration and can be re-used and shared. – Can be used for any API which uses Swagger.
Disadvantage– Some familiarity with the Open PHACTS API necessary.
![Page 7: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/7.jpg)
OPS_Swagger details
![Page 8: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/8.jpg)
OPS_Swagger details
![Page 9: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/9.jpg)
OPS_JSON details
Executes API call
Hierarchical json structure is flattened:
– Traverse recursively through JSON hierarchy
– Concatenate the JSON keys which become column headers for the tables
– The cells are the values from the current JSON key in the path
An example API call is used to fetch the available columns
User can select and rename the columns he is interested in
Output:
– table with user selected columns
– table with full flattened json output
![Page 10: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/10.jpg)
OPS_JSON details
…
![Page 11: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/11.jpg)
Example workflow
![Page 12: Using the Open PHACTS API with KNIME Daniela Digles support@openphacts.org Open PHACTS Community Workshop.](https://reader035.fdocuments.in/reader035/viewer/2022062222/5697bfba1a28abf838ca03aa/html5/thumbnails/12.jpg)
Acknowledgements
Ronald Siebes (VU Amsterdam)
Emiliano Cuadrado (USC)
Christine Chichester (SIB)