From 87fe79bf39b94bc02431e5486de9658800774a9f Mon Sep 17 00:00:00 2001 From: bcogrel Date: Sat, 17 Aug 2024 10:10:16 +0000 Subject: [PATCH] deploy: ontop/ontop-website@b6d838be4e5681bce453ea758255df5b09f515ef --- 404.html | 4 ++-- assets/js/{13.9330117e.js => 13.38d39f86.js} | 2 +- assets/js/{14.cabf7cc1.js => 14.df34bc77.js} | 2 +- assets/js/{16.c4cef8b7.js => 16.6ea3c048.js} | 2 +- assets/js/{17.4d3bdb39.js => 17.23c168f3.js} | 2 +- assets/js/{18.1de16b6c.js => 18.6123e0fb.js} | 2 +- assets/js/{19.c55473af.js => 19.319c82ab.js} | 2 +- assets/js/{20.647b4013.js => 20.8c67cb7d.js} | 2 +- assets/js/{21.8e93c882.js => 21.101f0364.js} | 2 +- assets/js/{22.fea44003.js => 22.00571580.js} | 2 +- assets/js/{23.fccfc77c.js => 23.bfb85965.js} | 2 +- assets/js/{27.edf57888.js => 27.906526eb.js} | 2 +- assets/js/28.2770c070.js | 1 - assets/js/28.b36f0407.js | 1 + assets/js/{35.55d431a6.js => 35.9e166cc5.js} | 2 +- assets/js/{36.69b1ebb1.js => 36.0936af62.js} | 2 +- assets/js/{37.d9dcd129.js => 37.ae5d087b.js} | 2 +- assets/js/{38.71888562.js => 38.03ed20e0.js} | 2 +- assets/js/{42.605d70b3.js => 42.771e4cb4.js} | 2 +- assets/js/{43.c48fe62d.js => 43.c1abf395.js} | 2 +- assets/js/{44.b75f4588.js => 44.b45be0fb.js} | 2 +- assets/js/{45.2385a34b.js => 45.6782ae9a.js} | 2 +- assets/js/{47.ebcfd7a3.js => 47.386aad46.js} | 2 +- assets/js/{50.2e427b56.js => 50.a6d14188.js} | 2 +- assets/js/{51.55dfa97d.js => 51.12210249.js} | 2 +- assets/js/{53.baae48e1.js => 53.7504f725.js} | 2 +- assets/js/{54.ea19806d.js => 54.52883e2f.js} | 2 +- assets/js/{55.66e69ac0.js => 55.c0cbc631.js} | 2 +- assets/js/{56.e6b91c92.js => 56.4b4edba3.js} | 2 +- assets/js/{58.5d967bf0.js => 58.587c2188.js} | 2 +- assets/js/{59.73194a85.js => 59.c250e2f7.js} | 2 +- assets/js/{61.2fe5e65a.js => 61.ba6d8dd6.js} | 2 +- assets/js/{62.d2593334.js => 62.c00199c1.js} | 2 +- assets/js/{63.2c41f570.js => 63.ab25da0d.js} | 2 +- assets/js/{64.ef1c6023.js => 64.f9acda2c.js} | 2 +- assets/js/{65.637a5ac2.js => 65.3f7e48f4.js} | 2 +- assets/js/{66.31977579.js => 66.60d5b021.js} | 2 +- assets/js/{68.1f561b07.js => 68.5b14c426.js} | 2 +- assets/js/{69.acaa691c.js => 69.b83ed713.js} | 2 +- assets/js/{70.89ffe144.js => 70.390c1b51.js} | 2 +- assets/js/{71.122a990f.js => 71.828a156a.js} | 2 +- assets/js/{74.c5aa0789.js => 74.557f1c4c.js} | 2 +- assets/js/{75.5f9e9c52.js => 75.480169f5.js} | 2 +- assets/js/{78.6102aa0a.js => 78.8c0cdac5.js} | 2 +- assets/js/{79.367b0f4a.js => 79.28837695.js} | 2 +- assets/js/{82.110d224d.js => 82.e284c69b.js} | 2 +- assets/js/{83.62e77972.js => 83.4fccdf57.js} | 2 +- assets/js/{84.0fcb9ba5.js => 84.89d4f971.js} | 2 +- assets/js/{85.3fe9685f.js => 85.11adfea4.js} | 2 +- assets/js/{88.08a33ec4.js => 88.41f05188.js} | 2 +- assets/js/{89.0134e7e6.js => 89.bb41254d.js} | 2 +- assets/js/{90.70a0ab80.js => 90.ebfcdd76.js} | 2 +- assets/js/{91.2521efc8.js => 91.df2955b2.js} | 2 +- assets/js/{93.5961af36.js => 93.345dfe74.js} | 2 +- assets/js/{94.c2f356cb.js => 94.9b38d890.js} | 2 +- assets/js/{95.4647eb76.js => 95.e683cb7a.js} | 2 +- assets/js/{app.2ee71619.js => app.7148fdf7.js} | 4 ++-- community/contributing/bug-report.html | 6 +++--- community/contributing/documentation.html | 6 +++--- community/contributing/index.html | 6 +++--- community/contributing/pull-request.html | 6 +++--- community/index.html | 6 +++--- community/organizations.html | 6 +++--- community/support.html | 6 +++--- dev/build.html | 6 +++--- dev/db-adapter.html | 6 +++--- dev/debug-jetty.html | 6 +++--- dev/debug-protege.html | 6 +++--- dev/git.html | 6 +++--- dev/index.html | 6 +++--- dev/internals/guice.html | 6 +++--- dev/internals/iq.html | 6 +++--- dev/new-release.html | 6 +++--- dev/outdated/known-issues.html | 6 +++--- dev/stats.html | 6 +++--- guide/advanced/caching.html | 6 +++--- guide/advanced/configuration.html | 6 +++--- guide/advanced/lenses.html | 6 +++--- guide/advanced/logging.html | 6 +++--- guide/advanced/predefined.html | 6 +++--- guide/advanced/views.html | 6 +++--- guide/cli.html | 6 +++--- guide/compliance.html | 6 +++--- guide/concepts.html | 6 +++--- guide/databases/athena.html | 6 +++--- guide/databases/bigquery.html | 6 +++--- guide/databases/databricks.html | 6 +++--- guide/databases/db2.html | 6 +++--- guide/databases/denodo.html | 6 +++--- guide/databases/dremio.html | 6 +++--- guide/databases/duckdb.html | 6 +++--- guide/databases/dynamodb.html | 6 +++--- guide/databases/generic.html | 6 +++--- guide/databases/h2.html | 6 +++--- guide/databases/mariadb.html | 6 +++--- guide/databases/mssql.html | 6 +++--- guide/databases/mysql.html | 6 +++--- guide/databases/oracle.html | 6 +++--- guide/databases/postgres.html | 6 +++--- guide/databases/presto.html | 6 +++--- guide/databases/redshift.html | 6 +++--- guide/databases/snowflake.html | 6 +++--- guide/databases/spark.html | 6 +++--- guide/databases/trino.html | 6 +++--- guide/db.html | 6 +++--- guide/getting-started.html | 6 +++--- guide/glossary.html | 6 +++--- guide/index.html | 8 ++++---- guide/materialization.html | 6 +++--- guide/releases.html | 6 +++--- guide/troubleshooting/faq.html | 6 +++--- index.html | 4 ++-- jobs/index.html | 6 +++--- obda-pages/index.html | 6 +++--- research/index.html | 6 +++--- research/iq-formal.html | 6 +++--- research/notation.html | 6 +++--- research/optimization.html | 6 +++--- research/publications.html | 6 +++--- research/tutorials/cikm-2018.html | 6 +++--- tutorial/api/index.html | 6 +++--- tutorial/basic/setup.html | 6 +++--- tutorial/basic/university-1.html | 6 +++--- tutorial/basic/university-2.html | 6 +++--- tutorial/endpoint/endpoint-cli.html | 6 +++--- tutorial/endpoint/endpoint-docker.html | 6 +++--- tutorial/endpoint/endpoint-tomcat.html | 6 +++--- tutorial/endpoint/index.html | 6 +++--- tutorial/external-tutorials.html | 6 +++--- tutorial/federation/denodo/index.html | 6 +++--- tutorial/federation/dremio/index.html | 6 +++--- tutorial/federation/index.html | 6 +++--- tutorial/federation/teiid/index.html | 6 +++--- tutorial/index.html | 6 +++--- tutorial/interact/cli.html | 6 +++--- tutorial/interact/jupyter.html | 6 +++--- tutorial/lenses/basic-lens.html | 6 +++--- tutorial/lenses/flatten-lens.html | 6 +++--- tutorial/lenses/index.html | 6 +++--- tutorial/lenses/join-lens.html | 6 +++--- tutorial/lenses/setup.html | 6 +++--- tutorial/lenses/sql-lens.html | 6 +++--- tutorial/lenses/union-lens.html | 6 +++--- tutorial/mapping/existential.html | 6 +++--- tutorial/mapping/foreign-keys.html | 6 +++--- tutorial/mapping/index.html | 6 +++--- tutorial/mapping/primary-keys.html | 6 +++--- tutorial/mapping/uri-templates.html | 6 +++--- tutorial/materialization/materialization.html | 6 +++--- 149 files changed, 334 insertions(+), 334 deletions(-) rename assets/js/{13.9330117e.js => 13.38d39f86.js} (97%) rename assets/js/{14.cabf7cc1.js => 14.df34bc77.js} (97%) rename assets/js/{16.c4cef8b7.js => 16.6ea3c048.js} (96%) rename assets/js/{17.4d3bdb39.js => 17.23c168f3.js} (96%) rename assets/js/{18.1de16b6c.js => 18.6123e0fb.js} (99%) rename assets/js/{19.c55473af.js => 19.319c82ab.js} (99%) rename assets/js/{20.647b4013.js => 20.8c67cb7d.js} (97%) rename assets/js/{21.8e93c882.js => 21.101f0364.js} (99%) rename assets/js/{22.fea44003.js => 22.00571580.js} (96%) rename assets/js/{23.fccfc77c.js => 23.bfb85965.js} (98%) rename assets/js/{27.edf57888.js => 27.906526eb.js} (95%) delete mode 100644 assets/js/28.2770c070.js create mode 100644 assets/js/28.b36f0407.js rename assets/js/{35.55d431a6.js => 35.9e166cc5.js} (99%) rename assets/js/{36.69b1ebb1.js => 36.0936af62.js} (98%) rename assets/js/{37.d9dcd129.js => 37.ae5d087b.js} (98%) rename assets/js/{38.71888562.js => 38.03ed20e0.js} (99%) rename assets/js/{42.605d70b3.js => 42.771e4cb4.js} (98%) rename assets/js/{43.c48fe62d.js => 43.c1abf395.js} (98%) rename assets/js/{44.b75f4588.js => 44.b45be0fb.js} (98%) rename assets/js/{45.2385a34b.js => 45.6782ae9a.js} (97%) rename assets/js/{47.ebcfd7a3.js => 47.386aad46.js} (97%) rename assets/js/{50.2e427b56.js => 50.a6d14188.js} (98%) rename assets/js/{51.55dfa97d.js => 51.12210249.js} (98%) rename assets/js/{53.baae48e1.js => 53.7504f725.js} (98%) rename assets/js/{54.ea19806d.js => 54.52883e2f.js} (98%) rename assets/js/{55.66e69ac0.js => 55.c0cbc631.js} (98%) rename assets/js/{56.e6b91c92.js => 56.4b4edba3.js} (98%) rename assets/js/{58.5d967bf0.js => 58.587c2188.js} (98%) rename assets/js/{59.73194a85.js => 59.c250e2f7.js} (96%) rename assets/js/{61.2fe5e65a.js => 61.ba6d8dd6.js} (99%) rename assets/js/{62.d2593334.js => 62.c00199c1.js} (99%) rename assets/js/{63.2c41f570.js => 63.ab25da0d.js} (97%) rename assets/js/{64.ef1c6023.js => 64.f9acda2c.js} (89%) rename assets/js/{65.637a5ac2.js => 65.3f7e48f4.js} (99%) rename assets/js/{66.31977579.js => 66.60d5b021.js} (99%) rename assets/js/{68.1f561b07.js => 68.5b14c426.js} (99%) rename assets/js/{69.acaa691c.js => 69.b83ed713.js} (99%) rename assets/js/{70.89ffe144.js => 70.390c1b51.js} (98%) rename assets/js/{71.122a990f.js => 71.828a156a.js} (98%) rename assets/js/{74.c5aa0789.js => 74.557f1c4c.js} (99%) rename assets/js/{75.5f9e9c52.js => 75.480169f5.js} (99%) rename assets/js/{78.6102aa0a.js => 78.8c0cdac5.js} (99%) rename assets/js/{79.367b0f4a.js => 79.28837695.js} (99%) rename assets/js/{82.110d224d.js => 82.e284c69b.js} (99%) rename assets/js/{83.62e77972.js => 83.4fccdf57.js} (99%) rename assets/js/{84.0fcb9ba5.js => 84.89d4f971.js} (99%) rename assets/js/{85.3fe9685f.js => 85.11adfea4.js} (98%) rename assets/js/{88.08a33ec4.js => 88.41f05188.js} (99%) rename assets/js/{89.0134e7e6.js => 89.bb41254d.js} (99%) rename assets/js/{90.70a0ab80.js => 90.ebfcdd76.js} (99%) rename assets/js/{91.2521efc8.js => 91.df2955b2.js} (99%) rename assets/js/{93.5961af36.js => 93.345dfe74.js} (99%) rename assets/js/{94.c2f356cb.js => 94.9b38d890.js} (94%) rename assets/js/{95.4647eb76.js => 95.e683cb7a.js} (98%) rename assets/js/{app.2ee71619.js => app.7148fdf7.js} (82%) diff --git a/404.html b/404.html index bcaf3f51a..1dcc8467f 100644 --- a/404.html +++ b/404.html @@ -6,11 +6,11 @@ Ontop - +
- + diff --git a/assets/js/13.9330117e.js b/assets/js/13.38d39f86.js similarity index 97% rename from assets/js/13.9330117e.js rename to assets/js/13.38d39f86.js index d88f221ae..8db9563e1 100644 --- a/assets/js/13.9330117e.js +++ b/assets/js/13.38d39f86.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{390:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"documentation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[t._v("#")]),t._v(" Documentation")]),t._v(" "),n("p",[t._v("The source code of the documentation is on "),n("a",{attrs:{href:"https://github.com/ontop/ontop-website",target:"_blank",rel:"noopener"}},[t._v("Github"),n("OutboundLink")],1),t._v(" and is powered by "),n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(".")]),t._v(" "),n("p",[t._v("Once a commit is pushed to the Github repository, this public documentation is automatically rebuilt by Travis CI.")]),t._v(" "),n("h2",{attrs:{id:"small-improvements"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#small-improvements"}},[t._v("#")]),t._v(" Small improvements")]),t._v(" "),n("p",[t._v("Have you found a typo, a broken URL or another small problem? Please propose a fix immediately (before forgetting it), by clicking on the link "),n("code",[t._v("Edit this page")]),t._v(" at the bottom of the page.")]),t._v(" "),n("h2",{attrs:{id:"testing-the-documentation-locally"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#testing-the-documentation-locally"}},[t._v("#")]),t._v(" Testing the documentation locally")]),t._v(" "),n("p",[t._v("For a more involved work on the documentation, we recommend you to test your changes on your local machine before pushing them to Github.")]),t._v(" "),n("div",{staticClass:"language-bash extra-class"},[n("pre",{pre:!0,attrs:{class:"language-bash"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone git@github.com:ontop/ontop-website.git\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ontop-website\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the dependencies (e.g. vuepress)")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start the local server")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" docs:dev\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# commit your changes and push them back to Github")]),t._v("\n")])])]),n("p",[n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(" requires Node.js >= 8.6.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{391:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"documentation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[t._v("#")]),t._v(" Documentation")]),t._v(" "),n("p",[t._v("The source code of the documentation is on "),n("a",{attrs:{href:"https://github.com/ontop/ontop-website",target:"_blank",rel:"noopener"}},[t._v("Github"),n("OutboundLink")],1),t._v(" and is powered by "),n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(".")]),t._v(" "),n("p",[t._v("Once a commit is pushed to the Github repository, this public documentation is automatically rebuilt by Travis CI.")]),t._v(" "),n("h2",{attrs:{id:"small-improvements"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#small-improvements"}},[t._v("#")]),t._v(" Small improvements")]),t._v(" "),n("p",[t._v("Have you found a typo, a broken URL or another small problem? Please propose a fix immediately (before forgetting it), by clicking on the link "),n("code",[t._v("Edit this page")]),t._v(" at the bottom of the page.")]),t._v(" "),n("h2",{attrs:{id:"testing-the-documentation-locally"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#testing-the-documentation-locally"}},[t._v("#")]),t._v(" Testing the documentation locally")]),t._v(" "),n("p",[t._v("For a more involved work on the documentation, we recommend you to test your changes on your local machine before pushing them to Github.")]),t._v(" "),n("div",{staticClass:"language-bash extra-class"},[n("pre",{pre:!0,attrs:{class:"language-bash"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone git@github.com:ontop/ontop-website.git\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ontop-website\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the dependencies (e.g. vuepress)")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start the local server")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" docs:dev\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# commit your changes and push them back to Github")]),t._v("\n")])])]),n("p",[n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(" requires Node.js >= 8.6.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/14.cabf7cc1.js b/assets/js/14.df34bc77.js similarity index 97% rename from assets/js/14.cabf7cc1.js rename to assets/js/14.df34bc77.js index 21094e725..dbc339ef5 100644 --- a/assets/js/14.cabf7cc1.js +++ b/assets/js/14.df34bc77.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{391:function(e,t,o){"use strict";o.r(t);var r=o(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"pull-request"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#pull-request"}},[e._v("#")]),e._v(" Pull request")]),e._v(" "),o("p",[e._v("Contributions to the project are welcome and encouraged. You can propose some Pull Requests (PR) on Github. By making a PR on the Github platform, you declare to agree with the standard "),o("em",[e._v('"inbound = outbound"')]),e._v(" licensing practice, as foreseen by the "),o("a",{attrs:{href:"https://help.github.com/en/github/site-policy/github-terms-of-service#6-contributions-under-repository-license",target:"_blank",rel:"noopener"}},[e._v("Github terms"),o("OutboundLink")],1),e._v(". There is no need anymore for regular contributors to sign a CLA.")]),e._v(" "),o("p",[e._v("If you are thinking about implementing a new feature, feel free to engage a discussion with the team through the mailing list or through another medium.")]),e._v(" "),o("h2",{attrs:{id:"contribution-license-agreement-for-core-developers"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#contribution-license-agreement-for-core-developers"}},[e._v("#")]),e._v(" Contribution License Agreement (for core developers)")]),e._v(" "),o("p",[e._v("Core developers should sign a Contribution License Agreement (CLA) that allows FUB and the Ontop team to redistribute their work under the terms of the Apache 2.0 license. If the contributor works for an institution that owns the work being contributed by the contributor, then a corporate CLA must be additionally signed. The CLAs are available for download below, once signed please email a scanned copy of them.")]),e._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"https://raw.github.com/ontop/ontop/master/documentation/ontop-cla-2013-11-04.txt",target:"_blank",rel:"noopener"}},[e._v("Individual Contributor License Agreement (CLA)"),o("OutboundLink")],1)]),e._v(" "),o("li",[o("a",{attrs:{href:"https://raw.github.com/ontop/ontop/master/documentation/ontop-cla-corporate-2013-11-04.txt",target:"_blank",rel:"noopener"}},[e._v("Corporate License Agreement"),o("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{390:function(e,t,o){"use strict";o.r(t);var r=o(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"pull-request"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#pull-request"}},[e._v("#")]),e._v(" Pull request")]),e._v(" "),o("p",[e._v("Contributions to the project are welcome and encouraged. You can propose some Pull Requests (PR) on Github. By making a PR on the Github platform, you declare to agree with the standard "),o("em",[e._v('"inbound = outbound"')]),e._v(" licensing practice, as foreseen by the "),o("a",{attrs:{href:"https://help.github.com/en/github/site-policy/github-terms-of-service#6-contributions-under-repository-license",target:"_blank",rel:"noopener"}},[e._v("Github terms"),o("OutboundLink")],1),e._v(". There is no need anymore for regular contributors to sign a CLA.")]),e._v(" "),o("p",[e._v("If you are thinking about implementing a new feature, feel free to engage a discussion with the team through the mailing list or through another medium.")]),e._v(" "),o("h2",{attrs:{id:"contribution-license-agreement-for-core-developers"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#contribution-license-agreement-for-core-developers"}},[e._v("#")]),e._v(" Contribution License Agreement (for core developers)")]),e._v(" "),o("p",[e._v("Core developers should sign a Contribution License Agreement (CLA) that allows FUB and the Ontop team to redistribute their work under the terms of the Apache 2.0 license. If the contributor works for an institution that owns the work being contributed by the contributor, then a corporate CLA must be additionally signed. The CLAs are available for download below, once signed please email a scanned copy of them.")]),e._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"https://raw.github.com/ontop/ontop/master/documentation/ontop-cla-2013-11-04.txt",target:"_blank",rel:"noopener"}},[e._v("Individual Contributor License Agreement (CLA)"),o("OutboundLink")],1)]),e._v(" "),o("li",[o("a",{attrs:{href:"https://raw.github.com/ontop/ontop/master/documentation/ontop-cla-corporate-2013-11-04.txt",target:"_blank",rel:"noopener"}},[e._v("Corporate License Agreement"),o("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/16.c4cef8b7.js b/assets/js/16.6ea3c048.js similarity index 96% rename from assets/js/16.c4cef8b7.js rename to assets/js/16.6ea3c048.js index 1bf5e1950..b0d7688e1 100644 --- a/assets/js/16.c4cef8b7.js +++ b/assets/js/16.6ea3c048.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{394:function(t,a,r){"use strict";r.r(a);var s=r(51),e=Object(s.a)({},(function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[t._v("#")]),t._v(" Support")]),t._v(" "),r("h2",{attrs:{id:"faq"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[t._v("#")]),t._v(" FAQ")]),t._v(" "),r("p",[t._v("Please visit our pages about "),r("a",{attrs:{href:"/guide/troubleshooting/faq"}},[t._v("Frequently Asked Questions")]),t._v(".")]),t._v(" "),r("h2",{attrs:{id:"mailing-list-google-group"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#mailing-list-google-group"}},[t._v("#")]),t._v(" Mailing list (Google group)")]),t._v(" "),r("p",[t._v("We have a "),r("a",{attrs:{href:"https://groups.google.com/d/forum/ontop4obda",target:"_blank",rel:"noopener"}},[t._v("mailing list (Google group)"),r("OutboundLink")],1),t._v(" for anything related to support, discussion and announcements. Please join for any inquiry.")]),t._v(" "),r("h2",{attrs:{id:"bug-tracking-system"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#bug-tracking-system"}},[t._v("#")]),t._v(" Bug tracking system")]),t._v(" "),r("p",[t._v("To see the list of open issues/bugs, visit "),r("a",{attrs:{href:"https://github.com/ontop/ontop/issues?state=open",target:"_blank",rel:"noopener"}},[t._v("our GitHub tracker"),r("OutboundLink")],1)]),t._v(" "),r("h2",{attrs:{id:"commercial-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#commercial-support"}},[t._v("#")]),t._v(" Commercial support")]),t._v(" "),r("p",[r("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[t._v("Ontopic"),r("OutboundLink")],1),t._v(" is offering commercial support for Ontop.")])])}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{393:function(t,a,r){"use strict";r.r(a);var s=r(51),e=Object(s.a)({},(function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[t._v("#")]),t._v(" Support")]),t._v(" "),r("h2",{attrs:{id:"faq"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[t._v("#")]),t._v(" FAQ")]),t._v(" "),r("p",[t._v("Please visit our pages about "),r("a",{attrs:{href:"/guide/troubleshooting/faq"}},[t._v("Frequently Asked Questions")]),t._v(".")]),t._v(" "),r("h2",{attrs:{id:"mailing-list-google-group"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#mailing-list-google-group"}},[t._v("#")]),t._v(" Mailing list (Google group)")]),t._v(" "),r("p",[t._v("We have a "),r("a",{attrs:{href:"https://groups.google.com/d/forum/ontop4obda",target:"_blank",rel:"noopener"}},[t._v("mailing list (Google group)"),r("OutboundLink")],1),t._v(" for anything related to support, discussion and announcements. Please join for any inquiry.")]),t._v(" "),r("h2",{attrs:{id:"bug-tracking-system"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#bug-tracking-system"}},[t._v("#")]),t._v(" Bug tracking system")]),t._v(" "),r("p",[t._v("To see the list of open issues/bugs, visit "),r("a",{attrs:{href:"https://github.com/ontop/ontop/issues?state=open",target:"_blank",rel:"noopener"}},[t._v("our GitHub tracker"),r("OutboundLink")],1)]),t._v(" "),r("h2",{attrs:{id:"commercial-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#commercial-support"}},[t._v("#")]),t._v(" Commercial support")]),t._v(" "),r("p",[r("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[t._v("Ontopic"),r("OutboundLink")],1),t._v(" is offering commercial support for Ontop.")])])}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/17.4d3bdb39.js b/assets/js/17.23c168f3.js similarity index 96% rename from assets/js/17.4d3bdb39.js rename to assets/js/17.23c168f3.js index ba70adfbc..2e925a253 100644 --- a/assets/js/17.4d3bdb39.js +++ b/assets/js/17.23c168f3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{393:function(t,e,a){"use strict";a.r(e);var r=a(51),s=Object(r.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"overview"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[t._v("#")]),t._v(" Overview")]),t._v(" "),a("p",[t._v("The development chapter is targeted to those interested in the development of the Ontop framework.")]),t._v(" "),a("h2",{attrs:{id:"how-tos"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-tos"}},[t._v("#")]),t._v(" How-tos")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"/dev/git"}},[t._v("Conventions for Git")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/build"}},[t._v("Build Ontop")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/new-release"}},[t._v("Make a new release")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/db-adapter"}},[t._v("Extend Ontop to support a new database system")])]),t._v(" "),a("li",[t._v("Debug:\n"),a("ul",[a("li",[a("a",{attrs:{href:"/dev/debug-protege"}},[t._v("Protégé")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/debug-jetty"}},[t._v("Jetty with RDF4J workbench")])])])])]),t._v(" "),a("h2",{attrs:{id:"internals"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#internals"}},[t._v("#")]),t._v(" Internals")]),t._v(" "),a("p",[t._v("Information about the internals of Ontop")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"/dev/internals/iq"}},[t._v("Intermediate Query")]),t._v(" data structure")]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/internals/guice"}},[t._v("Guice Conventions")])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{394:function(t,e,a){"use strict";a.r(e);var r=a(51),s=Object(r.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"overview"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[t._v("#")]),t._v(" Overview")]),t._v(" "),a("p",[t._v("The development chapter is targeted to those interested in the development of the Ontop framework.")]),t._v(" "),a("h2",{attrs:{id:"how-tos"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-tos"}},[t._v("#")]),t._v(" How-tos")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"/dev/git"}},[t._v("Conventions for Git")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/build"}},[t._v("Build Ontop")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/new-release"}},[t._v("Make a new release")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/db-adapter"}},[t._v("Extend Ontop to support a new database system")])]),t._v(" "),a("li",[t._v("Debug:\n"),a("ul",[a("li",[a("a",{attrs:{href:"/dev/debug-protege"}},[t._v("Protégé")])]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/debug-jetty"}},[t._v("Jetty with RDF4J workbench")])])])])]),t._v(" "),a("h2",{attrs:{id:"internals"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#internals"}},[t._v("#")]),t._v(" Internals")]),t._v(" "),a("p",[t._v("Information about the internals of Ontop")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"/dev/internals/iq"}},[t._v("Intermediate Query")]),t._v(" data structure")]),t._v(" "),a("li",[a("a",{attrs:{href:"/dev/internals/guice"}},[t._v("Guice Conventions")])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/18.1de16b6c.js b/assets/js/18.6123e0fb.js similarity index 99% rename from assets/js/18.1de16b6c.js rename to assets/js/18.6123e0fb.js index a64909e47..0dee721fb 100644 --- a/assets/js/18.1de16b6c.js +++ b/assets/js/18.6123e0fb.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{395:function(e,o,t){"use strict";t.r(o);var n=t(51),i=Object(n.a)({},(function(){var e=this,o=e.$createElement,t=e._self._c||o;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"build-ontop-bundles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-ontop-bundles"}},[e._v("#")]),e._v(" Build Ontop Bundles")]),e._v(" "),t("h3",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("a Linux, Mac OS X or Windows machine;")])]),e._v(" "),t("li",[t("p",[e._v("git, for checking out Ontop code (refer to installation instructions for your OS/distribution);")])]),e._v(" "),t("li",[t("p",[e._v("Java 11 (JDK, not JRE, refer to installation instructions for your OS/distribution);")])]),e._v(" "),t("li",[t("p",[e._v("JAVA_HOME environment variable correctly set up and pointing to a Java 11 JDK.\nRun "),t("code",[e._v("echo $JAVA_HOME")]),e._v(" (on Windows: "),t("code",[e._v("echo %JAVA_HOME%")]),e._v(") and check the path printed (if any).\nIf the variable is unset, you can set it temporarily in the terminal session using "),t("code",[e._v("export JAVA_HOME=[path]")]),e._v(" (on Windows: "),t("code",[e._v('setx JAVA_HOME -m "[path]"')]),e._v("), where [path] points to the JDK installation (the directory containing bin, lib, etc).\nThis setting may be made persistent by editing your "),t("code",[e._v("~/.bash_profile")]),e._v(" (on Windows, edit System and Security > System > Advanced System Settings > Environment Variables). In particular, for Mac OS X")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ vim ~/.bash_profile\nAdd this line: export JAVA_HOME=$(/usr/libexec/java_home)\n$ source ~/.bash_profile\n")])])])]),e._v(" "),t("li",[t("p",[e._v("Maven 3.6.0 or later, with "),t("code",[e._v("mvn")]),e._v(" command available on "),t("code",[e._v("PATH")]),e._v(". Run")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('$ mvn -v\nApache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)\nMaven home: /opt/maven/current\nJava version: 11.0.17, vendor: Debian, runtime: /usr/lib/jvm/java-11-openjdk-amd64\nDefault locale: en_US, platform encoding: UTF-8\nOS name: "linux", version: "6.1.0-3-amd64", arch: "amd64", family: "unix"\n')])])]),t("p",[e._v("Check the versions of Maven (3.9.0 > 3.6.0 in the example) and Java (11.0.17, i.e. Java 11).")])])]),e._v(" "),t("h3",{attrs:{id:"checkout-ontop-source-code"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#checkout-ontop-source-code"}},[e._v("#")]),e._v(" Checkout Ontop source code")]),e._v(" "),t("p",[e._v("In a terminal, move to the parent directory where you want to checkout Ontop, and run")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ git clone https://github.com/ontop/ontop.git\n$ cd ontop\n")])])]),t("h3",{attrs:{id:"build-all-bundles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-all-bundles"}},[e._v("#")]),e._v(" Build all bundles")]),e._v(" "),t("p",[e._v("Starting from Ontop 4.1, from the root directory of Ontop source code tree, run")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Prelease\n")])])]),t("p",[e._v("The command compiles Ontop modules and generates the Ontop bundles distributed on GitHub, whose files are written in two directories.")]),e._v(" "),t("p",[e._v("Under "),t("code",[e._v("build/distribution/target/")]),e._v(":")]),e._v(" "),t("ul",[t("li",[t("strong",[t("code",[e._v("ontop-cli-[ontop-version].zip")])]),e._v(" - libraries/scripts to use ontop from the command line and setup a SPARQL endpoint;")])]),e._v(" "),t("p",[e._v("Under "),t("code",[e._v("protege/distribution/target/")]),e._v(":")]),e._v(" "),t("ul",[t("li",[t("strong",[t("code",[e._v("it.unibz.inf.ontop.protege-[ontop-version].jar")])]),e._v(" - plugin for Protégé 5.x installation files (drop it in Protégé’s plugins folder);")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-platform-independent-[ontop-version].zip")])]),e._v(" - Protégé 5.x bundled with Ontop plugin and ready to run (just unzip and use the "),t("code",[e._v("run.sh")]),e._v(" or "),t("code",[e._v("run.bat")]),e._v(" scripts);")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-linux-[ontop-version].zip")])]),e._v(" - as above, for Linux;")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-os-x-[ontop-version].zip")])]),e._v(" - as above, for Mac OS X;")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-win-[ontop-version].zip")])]),e._v(" - as above, for Windows.")])]),e._v(" "),t("p",[e._v("Notes:")]),e._v(" "),t("ul",[t("li",[e._v("profile activation "),t("code",[e._v("-Prelease")]),e._v(" enables the generation of all the Ontop bundles as well as source code and Javadoc JARs needed for publishing on Maven Central (if this profile is omitted, only JAR files for Ontop binaries are created);")]),e._v(" "),t("li",[e._v("option "),t("code",[e._v("-Dmaven.test.skip")]),e._v(" disables the compiling and execution of unit and integration tests (generally performed at release time) to speed up the process - omit it to enable tests, e.g., for testing changes to source code (note: may also use "),t("code",[e._v("-DskipTests")]),e._v(" that disables executing tests, but still compiles them);")]),e._v(" "),t("li",[e._v("the build may be performed also by running script "),t("code",[e._v("build-release.sh")]),e._v(" ("),t("code",[e._v("build-release.cmd")]),e._v(" on Windows), which works also in older Ontop versions (4.0.3 or earlier). In these older versions, the script generates bundles in sub-directories "),t("code",[e._v("ontop-cli")]),e._v(", "),t("code",[e._v("ontop-protege")]),e._v(", and "),t("code",[e._v("ontop-webapps")]),e._v(" of directory "),t("code",[e._v("build/distribution")]),e._v(", and also generates bundles for Jetty 9 + RDF4J workbench + Ontop and for Tomcat 8 + RDF4J workbench + Ontop. These bundles have been "),t("a",{attrs:{href:"https://ontop-vkg.org/guide/releases.html#_4-0-0-rc-1-july-8-2020",target:"_blank",rel:"noopener"}},[e._v("deprecated in Ontop 4"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://ontop-vkg.org/guide/releases.html#_5-0-0-december-31-2022",target:"_blank",rel:"noopener"}},[e._v("completely removed since Ontop 5"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("h3",{attrs:{id:"build-specific-bundles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-specific-bundles"}},[e._v("#")]),e._v(" Build specific bundles")]),e._v(" "),t("p",[e._v("Starting from version "),t("code",[e._v("4.1")]),e._v(" and further revised in version "),t("code",[e._v("5.0.2")]),e._v(", we provide Maven profiles to build specific Ontop bundles as quickly as possible (with respect to using the above 'build all' command), which may come in handy when modifying Ontop source code. Specifically:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("to build the Ontop command line tool only, i.e., "),t("code",[e._v("ontop-cli-[ontop-version].zip")]),e._v(" (note: up to version "),t("code",[e._v("5.0.1")]),e._v(", "),t("code",[e._v("asset-cli")]),e._v(" was "),t("code",[e._v("cli")]),e._v(" and tests were disabled by default)")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Passet-cli\n")])])])]),e._v(" "),t("li",[t("p",[e._v("to build the Ontop Protégé plugin, i.e., "),t("code",[e._v("it.unibz.inf.ontop.protege-[ontop-version].jar")]),e._v(" (profile available since version "),t("code",[e._v("5.0.2")]),e._v(")")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Passet-plugin\n")])])])]),e._v(" "),t("li",[t("p",[e._v("to build the Ontop Protégé plugin "),t("code",[e._v("it.unibz.inf.ontop.protege-[ontop-version].jar")]),e._v(" as well as the "),t("code",[e._v("ontop-protege-bundle-[platform]-[ontop-version].zip")]),e._v(" Protégé bundles including it (note: up to version "),t("code",[e._v("5.0.1")]),e._v(", "),t("code",[e._v("asset-protege")]),e._v(" was "),t("code",[e._v("protege")]),e._v(" and tests were disabled by default)")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Passet-protege\n")])])])])]),e._v(" "),t("p",[e._v("The Maven profiles "),t("code",[e._v("asset-cli")]),e._v(", "),t("code",[e._v("asset-plugin")]),e._v(", "),t("code",[e._v("asset-protege")]),e._v(" employed in the commands above exclude unneeded artifacts from the build, which is thus faster. These profiles can be arbitrarily combined to produce multiple bundles, e.g., "),t("code",[e._v("mvn -Passet-cli,asset-protege")]),e._v(" to generate both command line tool and Protégé bundles (from version 4.1 up to version 5 excluded, it was possible to build the RDF4 workbench + Ontop files by enabling profile "),t("code",[e._v("webapps")]),e._v(", now removed).")]),e._v(" "),t("h3",{attrs:{id:"compiling-the-ontop-protege-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compiling-the-ontop-protege-plugin"}},[e._v("#")]),e._v(" Compiling the Ontop Protégé plugin")]),e._v(" "),t("p",[e._v("Starting from version "),t("code",[e._v("5.0.2")]),e._v(", it is necessary to enable profile "),t("code",[e._v("plugin")]),e._v(" (or a profile depending on it, such as "),t("code",[e._v("asset-plugin")]),e._v(", "),t("code",[e._v("asset-protege")]),e._v(", or "),t("code",[e._v("release")]),e._v(") in order to compile "),t("code",[e._v("ontop-protege-plugin")]),e._v(". Note that "),t("strong",[e._v("commands "),t("code",[e._v("mvn compile")]),e._v(" and "),t("code",[e._v("mvn test")]),e._v(" will not work with profile "),t("code",[e._v("plugin")])]),e._v(" (or a depending profile) since compiling/testing "),t("code",[e._v("ontop-protege-plugin")]),e._v(" requires building "),t("code",[e._v("ontop-protege-dependencies:shaded")]),e._v(" first to "),t("a",{attrs:{href:"https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html",target:"_blank",rel:"noopener"}},[e._v("relocate Guava via the Maven shade plugin"),t("OutboundLink")],1),e._v(", but this happens only during the "),t("code",[e._v("package")]),e._v(" lifecycle phase of Maven, i.e., starting from "),t("code",[e._v("mvn package")]),e._v(" or later phase. Unfortunately, relocating Guava is needed to avoid conflicts with the older Guava version used in Protégé and cannot be avoided, and doing that before the "),t("code",[e._v("package")]),e._v(" phase is not feasible. Therefore, developers should "),t("strong",[e._v("always use "),t("code",[e._v("mvn package -Pplugin")]),e._v(" or later phase when working with "),t("code",[e._v("ontop-protege-plugin")])]),e._v(", even when just compiling or testing is intended.")]),e._v(" "),t("h3",{attrs:{id:"other-useful-maven-commands"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#other-useful-maven-commands"}},[e._v("#")]),e._v(" Other useful Maven commands")]),e._v(" "),t("p",[e._v("The following Maven commands can be used to facilitate some build-related development tasks, the involved plugins (e.g., "),t("code",[e._v("license-maven-plugin")]),e._v(") being already configured in Ontop root "),t("code",[e._v("pom.xml")]),e._v(" file:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("mvn license:add-third-party")]),e._v(" - produces a report file "),t("code",[e._v("build/distribution/THIRD-PARTY.txt")]),e._v(" useful to verify the use of Java libraries with compatible licenses")]),e._v(" "),t("li",[t("code",[e._v("mvn org.codehaus.mojo:versions-maven-plugin:display-plugin-updates")]),e._v(" - check for Maven plugins that can be updated")]),e._v(" "),t("li",[t("code",[e._v("mvn org.codehaus.mojo:versions-maven-plugin:display-dependency-updates")]),e._v(" - check for dependencies that can be updated")]),e._v(" "),t("li",[t("code",[e._v("mvn dependency:analyze-duplicate")]),e._v(" - check there are no duplicate dependencies declared in "),t("code",[e._v("pom.xml")]),e._v(" files")]),e._v(" "),t("li",[t("code",[e._v("mvn dependency:analyze-dep-mgt")]),e._v(" - check that dependency versions under centralized "),t("code",[e._v("")]),e._v(" sections are not overridden in child "),t("code",[e._v("pom.xml")]),e._v(" files")]),e._v(" "),t("li",[t("code",[e._v("mvn dependency:analyze")]),e._v(" - check for "),t("em",[e._v("used and undeclared")]),e._v(" dependencies and for "),t("em",[e._v("unused and declared")]),e._v(" dependencies (both situations that should be avoided)")]),e._v(" "),t("li",[t("code",[e._v("mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort")]),e._v(" - sorts section of "),t("code",[e._v("pom.xml")]),e._v(" files, to improve consistency")]),e._v(" "),t("li",[t("code",[e._v("mvn net.revelc.code.formatter:formatter-maven-plugin:format")]),e._v(" - auto-formats the "),t("code",[e._v("pom.xml")]),e._v(" files, to improve consistency")])])])}),[],!1,null,null,null);o.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{396:function(e,o,t){"use strict";t.r(o);var n=t(51),i=Object(n.a)({},(function(){var e=this,o=e.$createElement,t=e._self._c||o;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"build-ontop-bundles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-ontop-bundles"}},[e._v("#")]),e._v(" Build Ontop Bundles")]),e._v(" "),t("h3",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("a Linux, Mac OS X or Windows machine;")])]),e._v(" "),t("li",[t("p",[e._v("git, for checking out Ontop code (refer to installation instructions for your OS/distribution);")])]),e._v(" "),t("li",[t("p",[e._v("Java 11 (JDK, not JRE, refer to installation instructions for your OS/distribution);")])]),e._v(" "),t("li",[t("p",[e._v("JAVA_HOME environment variable correctly set up and pointing to a Java 11 JDK.\nRun "),t("code",[e._v("echo $JAVA_HOME")]),e._v(" (on Windows: "),t("code",[e._v("echo %JAVA_HOME%")]),e._v(") and check the path printed (if any).\nIf the variable is unset, you can set it temporarily in the terminal session using "),t("code",[e._v("export JAVA_HOME=[path]")]),e._v(" (on Windows: "),t("code",[e._v('setx JAVA_HOME -m "[path]"')]),e._v("), where [path] points to the JDK installation (the directory containing bin, lib, etc).\nThis setting may be made persistent by editing your "),t("code",[e._v("~/.bash_profile")]),e._v(" (on Windows, edit System and Security > System > Advanced System Settings > Environment Variables). In particular, for Mac OS X")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ vim ~/.bash_profile\nAdd this line: export JAVA_HOME=$(/usr/libexec/java_home)\n$ source ~/.bash_profile\n")])])])]),e._v(" "),t("li",[t("p",[e._v("Maven 3.6.0 or later, with "),t("code",[e._v("mvn")]),e._v(" command available on "),t("code",[e._v("PATH")]),e._v(". Run")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('$ mvn -v\nApache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)\nMaven home: /opt/maven/current\nJava version: 11.0.17, vendor: Debian, runtime: /usr/lib/jvm/java-11-openjdk-amd64\nDefault locale: en_US, platform encoding: UTF-8\nOS name: "linux", version: "6.1.0-3-amd64", arch: "amd64", family: "unix"\n')])])]),t("p",[e._v("Check the versions of Maven (3.9.0 > 3.6.0 in the example) and Java (11.0.17, i.e. Java 11).")])])]),e._v(" "),t("h3",{attrs:{id:"checkout-ontop-source-code"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#checkout-ontop-source-code"}},[e._v("#")]),e._v(" Checkout Ontop source code")]),e._v(" "),t("p",[e._v("In a terminal, move to the parent directory where you want to checkout Ontop, and run")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ git clone https://github.com/ontop/ontop.git\n$ cd ontop\n")])])]),t("h3",{attrs:{id:"build-all-bundles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-all-bundles"}},[e._v("#")]),e._v(" Build all bundles")]),e._v(" "),t("p",[e._v("Starting from Ontop 4.1, from the root directory of Ontop source code tree, run")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Prelease\n")])])]),t("p",[e._v("The command compiles Ontop modules and generates the Ontop bundles distributed on GitHub, whose files are written in two directories.")]),e._v(" "),t("p",[e._v("Under "),t("code",[e._v("build/distribution/target/")]),e._v(":")]),e._v(" "),t("ul",[t("li",[t("strong",[t("code",[e._v("ontop-cli-[ontop-version].zip")])]),e._v(" - libraries/scripts to use ontop from the command line and setup a SPARQL endpoint;")])]),e._v(" "),t("p",[e._v("Under "),t("code",[e._v("protege/distribution/target/")]),e._v(":")]),e._v(" "),t("ul",[t("li",[t("strong",[t("code",[e._v("it.unibz.inf.ontop.protege-[ontop-version].jar")])]),e._v(" - plugin for Protégé 5.x installation files (drop it in Protégé’s plugins folder);")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-platform-independent-[ontop-version].zip")])]),e._v(" - Protégé 5.x bundled with Ontop plugin and ready to run (just unzip and use the "),t("code",[e._v("run.sh")]),e._v(" or "),t("code",[e._v("run.bat")]),e._v(" scripts);")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-linux-[ontop-version].zip")])]),e._v(" - as above, for Linux;")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-os-x-[ontop-version].zip")])]),e._v(" - as above, for Mac OS X;")]),e._v(" "),t("li",[t("strong",[t("code",[e._v("ontop-protege-bundle-win-[ontop-version].zip")])]),e._v(" - as above, for Windows.")])]),e._v(" "),t("p",[e._v("Notes:")]),e._v(" "),t("ul",[t("li",[e._v("profile activation "),t("code",[e._v("-Prelease")]),e._v(" enables the generation of all the Ontop bundles as well as source code and Javadoc JARs needed for publishing on Maven Central (if this profile is omitted, only JAR files for Ontop binaries are created);")]),e._v(" "),t("li",[e._v("option "),t("code",[e._v("-Dmaven.test.skip")]),e._v(" disables the compiling and execution of unit and integration tests (generally performed at release time) to speed up the process - omit it to enable tests, e.g., for testing changes to source code (note: may also use "),t("code",[e._v("-DskipTests")]),e._v(" that disables executing tests, but still compiles them);")]),e._v(" "),t("li",[e._v("the build may be performed also by running script "),t("code",[e._v("build-release.sh")]),e._v(" ("),t("code",[e._v("build-release.cmd")]),e._v(" on Windows), which works also in older Ontop versions (4.0.3 or earlier). In these older versions, the script generates bundles in sub-directories "),t("code",[e._v("ontop-cli")]),e._v(", "),t("code",[e._v("ontop-protege")]),e._v(", and "),t("code",[e._v("ontop-webapps")]),e._v(" of directory "),t("code",[e._v("build/distribution")]),e._v(", and also generates bundles for Jetty 9 + RDF4J workbench + Ontop and for Tomcat 8 + RDF4J workbench + Ontop. These bundles have been "),t("a",{attrs:{href:"https://ontop-vkg.org/guide/releases.html#_4-0-0-rc-1-july-8-2020",target:"_blank",rel:"noopener"}},[e._v("deprecated in Ontop 4"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://ontop-vkg.org/guide/releases.html#_5-0-0-december-31-2022",target:"_blank",rel:"noopener"}},[e._v("completely removed since Ontop 5"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("h3",{attrs:{id:"build-specific-bundles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-specific-bundles"}},[e._v("#")]),e._v(" Build specific bundles")]),e._v(" "),t("p",[e._v("Starting from version "),t("code",[e._v("4.1")]),e._v(" and further revised in version "),t("code",[e._v("5.0.2")]),e._v(", we provide Maven profiles to build specific Ontop bundles as quickly as possible (with respect to using the above 'build all' command), which may come in handy when modifying Ontop source code. Specifically:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("to build the Ontop command line tool only, i.e., "),t("code",[e._v("ontop-cli-[ontop-version].zip")]),e._v(" (note: up to version "),t("code",[e._v("5.0.1")]),e._v(", "),t("code",[e._v("asset-cli")]),e._v(" was "),t("code",[e._v("cli")]),e._v(" and tests were disabled by default)")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Passet-cli\n")])])])]),e._v(" "),t("li",[t("p",[e._v("to build the Ontop Protégé plugin, i.e., "),t("code",[e._v("it.unibz.inf.ontop.protege-[ontop-version].jar")]),e._v(" (profile available since version "),t("code",[e._v("5.0.2")]),e._v(")")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Passet-plugin\n")])])])]),e._v(" "),t("li",[t("p",[e._v("to build the Ontop Protégé plugin "),t("code",[e._v("it.unibz.inf.ontop.protege-[ontop-version].jar")]),e._v(" as well as the "),t("code",[e._v("ontop-protege-bundle-[platform]-[ontop-version].zip")]),e._v(" Protégé bundles including it (note: up to version "),t("code",[e._v("5.0.1")]),e._v(", "),t("code",[e._v("asset-protege")]),e._v(" was "),t("code",[e._v("protege")]),e._v(" and tests were disabled by default)")]),e._v(" "),t("div",{staticClass:"language-console extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("$ mvn -Dmaven.test.skip -Passet-protege\n")])])])])]),e._v(" "),t("p",[e._v("The Maven profiles "),t("code",[e._v("asset-cli")]),e._v(", "),t("code",[e._v("asset-plugin")]),e._v(", "),t("code",[e._v("asset-protege")]),e._v(" employed in the commands above exclude unneeded artifacts from the build, which is thus faster. These profiles can be arbitrarily combined to produce multiple bundles, e.g., "),t("code",[e._v("mvn -Passet-cli,asset-protege")]),e._v(" to generate both command line tool and Protégé bundles (from version 4.1 up to version 5 excluded, it was possible to build the RDF4 workbench + Ontop files by enabling profile "),t("code",[e._v("webapps")]),e._v(", now removed).")]),e._v(" "),t("h3",{attrs:{id:"compiling-the-ontop-protege-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compiling-the-ontop-protege-plugin"}},[e._v("#")]),e._v(" Compiling the Ontop Protégé plugin")]),e._v(" "),t("p",[e._v("Starting from version "),t("code",[e._v("5.0.2")]),e._v(", it is necessary to enable profile "),t("code",[e._v("plugin")]),e._v(" (or a profile depending on it, such as "),t("code",[e._v("asset-plugin")]),e._v(", "),t("code",[e._v("asset-protege")]),e._v(", or "),t("code",[e._v("release")]),e._v(") in order to compile "),t("code",[e._v("ontop-protege-plugin")]),e._v(". Note that "),t("strong",[e._v("commands "),t("code",[e._v("mvn compile")]),e._v(" and "),t("code",[e._v("mvn test")]),e._v(" will not work with profile "),t("code",[e._v("plugin")])]),e._v(" (or a depending profile) since compiling/testing "),t("code",[e._v("ontop-protege-plugin")]),e._v(" requires building "),t("code",[e._v("ontop-protege-dependencies:shaded")]),e._v(" first to "),t("a",{attrs:{href:"https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html",target:"_blank",rel:"noopener"}},[e._v("relocate Guava via the Maven shade plugin"),t("OutboundLink")],1),e._v(", but this happens only during the "),t("code",[e._v("package")]),e._v(" lifecycle phase of Maven, i.e., starting from "),t("code",[e._v("mvn package")]),e._v(" or later phase. Unfortunately, relocating Guava is needed to avoid conflicts with the older Guava version used in Protégé and cannot be avoided, and doing that before the "),t("code",[e._v("package")]),e._v(" phase is not feasible. Therefore, developers should "),t("strong",[e._v("always use "),t("code",[e._v("mvn package -Pplugin")]),e._v(" or later phase when working with "),t("code",[e._v("ontop-protege-plugin")])]),e._v(", even when just compiling or testing is intended.")]),e._v(" "),t("h3",{attrs:{id:"other-useful-maven-commands"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#other-useful-maven-commands"}},[e._v("#")]),e._v(" Other useful Maven commands")]),e._v(" "),t("p",[e._v("The following Maven commands can be used to facilitate some build-related development tasks, the involved plugins (e.g., "),t("code",[e._v("license-maven-plugin")]),e._v(") being already configured in Ontop root "),t("code",[e._v("pom.xml")]),e._v(" file:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("mvn license:add-third-party")]),e._v(" - produces a report file "),t("code",[e._v("build/distribution/THIRD-PARTY.txt")]),e._v(" useful to verify the use of Java libraries with compatible licenses")]),e._v(" "),t("li",[t("code",[e._v("mvn org.codehaus.mojo:versions-maven-plugin:display-plugin-updates")]),e._v(" - check for Maven plugins that can be updated")]),e._v(" "),t("li",[t("code",[e._v("mvn org.codehaus.mojo:versions-maven-plugin:display-dependency-updates")]),e._v(" - check for dependencies that can be updated")]),e._v(" "),t("li",[t("code",[e._v("mvn dependency:analyze-duplicate")]),e._v(" - check there are no duplicate dependencies declared in "),t("code",[e._v("pom.xml")]),e._v(" files")]),e._v(" "),t("li",[t("code",[e._v("mvn dependency:analyze-dep-mgt")]),e._v(" - check that dependency versions under centralized "),t("code",[e._v("")]),e._v(" sections are not overridden in child "),t("code",[e._v("pom.xml")]),e._v(" files")]),e._v(" "),t("li",[t("code",[e._v("mvn dependency:analyze")]),e._v(" - check for "),t("em",[e._v("used and undeclared")]),e._v(" dependencies and for "),t("em",[e._v("unused and declared")]),e._v(" dependencies (both situations that should be avoided)")]),e._v(" "),t("li",[t("code",[e._v("mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort")]),e._v(" - sorts section of "),t("code",[e._v("pom.xml")]),e._v(" files, to improve consistency")]),e._v(" "),t("li",[t("code",[e._v("mvn net.revelc.code.formatter:formatter-maven-plugin:format")]),e._v(" - auto-formats the "),t("code",[e._v("pom.xml")]),e._v(" files, to improve consistency")])])])}),[],!1,null,null,null);o.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/19.c55473af.js b/assets/js/19.319c82ab.js similarity index 99% rename from assets/js/19.c55473af.js rename to assets/js/19.319c82ab.js index f57033d97..2de9d57cd 100644 --- a/assets/js/19.c55473af.js +++ b/assets/js/19.319c82ab.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{396:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"support-a-new-database-system"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-a-new-database-system"}},[t._v("#")]),t._v(" Support a new database system")]),t._v(" "),s("p",[t._v("This page describes how Ontop can be extended to support a novel relational database system (RDBMS).")]),t._v(" "),s("p",[t._v("The following RDBMSs are currently supported:")]),t._v(" "),s("ul",[s("li",[t._v("DB2")]),t._v(" "),s("li",[t._v("MySQL / MariaDB")]),t._v(" "),s("li",[t._v("Oracle")]),t._v(" "),s("li",[t._v("PostgreSQL")]),t._v(" "),s("li",[t._v("SQL server")]),t._v(" "),s("li",[t._v("H2")]),t._v(" "),s("li",[t._v("Denodo")]),t._v(" "),s("li",[t._v("Dremio")]),t._v(" "),s("li",[t._v("Apache Spark SQL & Databricks")]),t._v(" "),s("li",[t._v("Teiid")]),t._v(" "),s("li",[t._v("Snowflake")]),t._v(" "),s("li",[t._v("Trino")]),t._v(" "),s("li",[t._v("Presto")]),t._v(" "),s("li",[t._v("Athena")]),t._v(" "),s("li",[t._v("Redshift")]),t._v(" "),s("li",[t._v("DuckDB")])]),t._v(" "),s("p",[t._v("It is relatively easy though to extend Ontop's source code in order to support an additional RDBMS, thanks to dependency injection.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("New: Guided Implementation")]),t._v(" "),s("p",[t._v("Ontop also provides a "),s("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[t._v("python tool"),s("OutboundLink")],1),t._v(" that automatically generates a large part of the required code end simplifies the process of developing support for new SQL dialects.")]),t._v(" "),s("p",[t._v("Using it minimizes the overhead for the implementation of new dialect support and allows you to test your code easily right away.")])]),t._v(" "),s("p",[s("em",[t._v("This page provides a detailed explanation of the key concepts that need to be implemented, and was updated with Ontop 5.0.2. For newer versions of Ontop, it may no longer be up-to-date.")])]),t._v(" "),s("h2",{attrs:{id:"required-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#required-implementations"}},[t._v("#")]),t._v(" Required implementations")]),t._v(" "),s("p",[t._v("Two implementations must be provided, each for a different interface that already has a default (abstract) implementation.")]),t._v(" "),s("p",[t._v("These implementations dictate what the datatypes of the RDBMS are and how certain function symbols can be translated into the SQL dialect supported by the RDBMS.")]),t._v(" "),s("p",[t._v("The default implementation of each of these interfaces is often sufficient to handle many query operators and functions. As a result, only a few methods generally need to be overwritten,\nto account for specificities of the new SQL dialect.")]),t._v(" "),s("p",[t._v("The 2 required implementations are the DB function symbol factory and the DB datatype factory.")]),t._v(" "),s("h3",{attrs:{id:"db-function-symbol-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-function-symbol-factory"}},[t._v("#")]),t._v(" DB function symbol factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB function symbol factory")]),t._v(" provides function symbols\nwhich can be directly serialized into the target SQL dialect (e.g. "),s("code",[t._v("LENGTH")]),t._v(" or "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v("). This factory has methods for common operations with precise semantics (e.g. concatenating 3 string arguments in a null-rejecting manner).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the DB function symbol factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("This interface should not be confused with the "),s("code",[t._v("FunctionSymbolFactory")]),t._v(", which is in charge of constructing\nSPARQL function symbols and other function symbols that cannot be directly serialized into SQL.")])]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DuckDBDBFunctionSymbolFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTypeFactory")]),t._v(" dbTypeFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),t._v(" abstractRootDBType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAbstractRootDBType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Table")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" table "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashBasedTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Changed Function Symbols -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("table"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Implementations -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, two code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"changed-function-symbols"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#changed-function-symbols"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Changed Function Symbols")])]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("regular function table")]),t._v(" is a dictionary, that maps from function names to the function symbol instance it corresponds to. The abstract base classes we inherit from already define a default function symbol table that includes all commonly used SQL functions. In some cases, however, some of these default function symbols need to be changed. For these cases, new entries can be created in this block, to override existing, bad entries.")]),t._v(" "),s("p",[t._v("A popular example is the "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function symbol. By default, it is created as a simple function with arity 0 of the form "),s("code",[t._v("CURRENT_TIMESTAMP()")]),t._v(". In some dialects, however, the current time is called without parentheses, simply in the form "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(". In this case, we need to override the function symbol created by the default implementation, to not include parentheses:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),t._v(" nowFunctionSymbol "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbolImpl")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBDateTimestampType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ntable"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" nowFunctionSymbol"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function is now a "),s("code",[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbol")]),t._v(", so when generating SQL queries, ontop will not include the parentheses. By putting this new function symbol into the table at the key "),s("code",[t._v("CURRENT_TIMESTAMP_STR")]),t._v(", we override the default behaviour that was put into the table by the default method.")]),t._v(" "),s("h4",{attrs:{id:"implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Implementations")])]),t._v(" "),s("p",[t._v("A set of serialization methods have been left abstract by the base classes. These "),s("em",[t._v("always")]),t._v(" have to be implemented for each new dialect.")]),t._v(" "),s("p",[t._v("All such methods share the same structure:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" serialize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("FUNCTION_NAME"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Here, "),s("code",[t._v("terms")]),t._v(" is the list of arguments that were passed to the function, "),s("code",[t._v("termConverter")]),t._v(" ist a function that can be used to transform any given term into its SQL equivalent, and termFactory can be used to generate new terms that may be required for some functions.")]),t._v(" "),s("p",[t._v("We will now go through each of them and provide example implementations.")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Contains")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns a boolean value, indicating whether a given string (argument 2) is included in a different string (argument 1). While some dialects have their own "),s("code",[t._v("CONTAINS")]),t._v(" functions, for others it may have to be implemented through a string search, like in this example:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeContains")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"(POSITION(%s IN %s) > 0)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrBefore")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns the section of a given string (argument 1) before the first appearance of a given search string (argument 2). If the searched string is not contained in the base string, an empty string is returned instead. In many languages, this can be implemented using string search and substring methods.")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s,1,POSITION(%s IN %s)-1)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" before"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrAfter")])]),t._v(":")]),t._v(" "),s("p",[t._v("The opposite of "),s("code",[t._v("STRBEFORE")]),t._v(", this function returns the section of a given string (argument 1) "),s("em",[t._v("after")]),t._v(" the first appearance of a search string (argument 2). This function can be implemented similarly:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s, IF(POSITION(%s IN %s) != 0, POSITION(%s IN %s) + LENGTH(%s), 0))"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Tz")])]),t._v(":\nThis function extracts the timezone part of a given timestamp. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeTz")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(LPAD(EXTRACT(TIMEZONE_HOUR FROM %s)::text,2,'0') || ':' || LPAD(EXTRACT(TIMEZONE_MINUTE FROM %s)::text,2,'0'))\"")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("DateTimeNorm")])]),t._v(":\nThis function converts a given timestamp to the standardized "),s("code",[t._v("ISO 8601")]),t._v(" format. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeDateTimeNorm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TO_ISO8601(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Hashing Functions")])]),t._v(":")]),t._v(" "),s("p",[t._v("Ontop supports a set of hasing functions:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("MD5")])]),t._v(" "),s("li",[s("code",[t._v("SHA1")])]),t._v(" "),s("li",[s("code",[t._v("SHA256")])]),t._v(" "),s("li",[s("code",[t._v("SHA384")])]),t._v(" "),s("li",[s("code",[t._v("SHA512")])])]),t._v(" "),s("p",[t._v("For each of them, the implementation of a serialization method is required. An example implementation of the "),s("code",[t._v("MD5")]),t._v(" function may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeMD5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MD5(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p"),t._v(" "),s("p",[t._v("Other than the serialization methods, four additional methods must be implemented by the subclass:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUUIDNameInDialect")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"[UUID_FUNCTION_NAME]"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("returns the string that represents the name of the UUID in the SQL dialect.")]),t._v(" "),s("p",[t._v("The methods "),s("code",[t._v("createNullRejectingDBConcat(int arity)")]),t._v(", "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(", and "),s("code",[t._v("createRegularDBConcat(int arity)")]),t._v(" need to be implemented to define the concat function symbols. The "),s("code",[t._v("DBConcat")]),t._v(" methods define function symbols that represent "),s("code",[t._v("CONCAT")]),t._v(" function calls of a given arity. Sample implementations for them may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createRegularDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullToleratingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNullRejectingDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT_NO_NULL"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(" method represents a concat operation executed through a concat operator (often "),s("code",[t._v("+")]),t._v(" or "),s("code",[t._v("||")]),t._v("). It may be implemented like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDBConcatOperator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Serializers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getOperatorSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"db-datatype-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-datatype-factory"}},[t._v("#")]),t._v(" DB Datatype factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB datatype factory")]),t._v(" declares the hierarchy of DB datatypes used by the DBMS, and specifies their correspondence with datatypes used in the RDF graphs (such as xsd datatypes).")]),t._v(" "),s("p",[t._v("The interface to implement (for SQL dialects) is "),s("code",[t._v("SQLDBTypeFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSQLDBTypeFactory")]),t._v(" .")]),t._v(" "),s("p",[t._v("For instance, the datatype factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBTypeFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Definitions -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AssistedInject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Code Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Support Flags -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, four code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"type-definitions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-definitions"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Type Definitions")])]),t._v(" "),s("p",[t._v("In this section, we define a set of "),s("code",[t._v("String")]),t._v(" constants that represent the names of datatypes in our SQL dialect. These constants are then used in other code blocks. An excerpt of the "),s("em",[t._v("type definitions")]),t._v(" part in an implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" BIT_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BIT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT2_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"type-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("TYPE MAP")])]),t._v(" "),s("p",[t._v("In this method, we define the contents of the type map for our dialect. We create "),s("code",[t._v("DBTermType")]),t._v(" instances for each supported type and store them in a "),s("code",[t._v("Map")]),t._v(" object, that matches their identifiers to the "),s("code",[t._v("DBTermType")]),t._v(". The base class we extend from already generates an extensive type map for many popular types, such as "),s("code",[t._v("VARCHAR")]),t._v(", "),s("code",[t._v("INTEGER")]),t._v(", "),s("code",[t._v("REAL")]),t._v(", "),s("code",[t._v("DOUBLE")]),t._v(", and more in the method "),s("code",[t._v("createDefaultSQLTypeMap(...)")]),t._v(". New types can be added to the map in the subclass, and, alternatively, we can override existing entries in the map here. An example implementation of this method may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermTypeAncestry")]),t._v(" rootAncestry "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAncestry")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"code-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#code-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("CODE MAP")])]),t._v(" "),s("p",[t._v('The code map is a dictionary, that maps different type codes to their "default type" for the SQL dialect. This includes the following type codes:')]),t._v(" "),s("ul",[s("li",[s("code",[t._v("STRING")])]),t._v(" "),s("li",[s("code",[t._v("HEXBINARY")])]),t._v(" "),s("li",[s("code",[t._v("LARGE_INTEGER")])]),t._v(" "),s("li",[s("code",[t._v("DECIMAL")])]),t._v(" "),s("li",[s("code",[t._v("DOUBLE")])]),t._v(" "),s("li",[s("code",[t._v("BOOLEAN")])]),t._v(" "),s("li",[s("code",[t._v("DATE")])]),t._v(" "),s("li",[s("code",[t._v("TIME")])]),t._v(" "),s("li",[s("code",[t._v("DATETIMESTAMP")])]),t._v(" "),s("li",[s("code",[t._v("GEOMETRY")])]),t._v(" "),s("li",[s("code",[t._v("GEOGRAPHY")])]),t._v(" "),s("li",[s("code",[t._v("ARRAY")])]),t._v(" "),s("li",[s("code",[t._v("JSON")])])]),t._v(" "),s("p",[t._v("The default implementation already maps many of these to the name of the corresponding data type. To support additional ones, or to override existing mappings, this method can be implemented. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("JSON"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" JSONB_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"support-flags"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-flags"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Support Flags")])]),t._v(" "),s("p",[t._v("An instance of "),s("code",[t._v("DBTypeFactory")]),t._v(" supports a set of methods that, when called, return a flag indicating if a certain SQL feature is supported by the dialect. These methods are")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("supportsDBGeometryType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBGeographyType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBDistanceSphere()")])]),t._v(" "),s("li",[s("code",[t._v("supportsJson()")])]),t._v(" "),s("li",[s("code",[t._v("supportsArrayType()")])])]),t._v(" "),s("p",[t._v("Any of these functions can be overridden by the "),s("code",[t._v("DBTypeFactory")]),t._v(" sub-class to return a boolean constant indicating if the type is supported.")]),t._v(" "),s("h4",{attrs:{id:"other-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Other Implementations")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("DBTypeFactory")]),t._v(" base-class supports further methods that can be included in sub-classes for fine-tuning. One popular set of such methods are the "),s("code",[t._v("LexicalValue")]),t._v(" methods. These return a "),s("code",[t._v("String")]),t._v(" constant that represents the lexical value the corresponding literal may assume. For instance, by default, the method "),s("code",[t._v("getDBFalseLexicalValue()")]),t._v(" returns the string "),s("code",[t._v('"FALSE"')]),t._v(", as this is a common representation of the boolean "),s("code",[t._v("false")]),t._v(" value in many SQL dialects. To implement the "),s("code",[t._v("DBTypeFactory")]),t._v(" for a dialect that instead uses the digit "),s("code",[t._v("0")]),t._v(" for "),s("code",[t._v("false")]),t._v(" literals, we could override the method like so:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBFalseLexicalValue")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"optional-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#optional-implementations"}},[t._v("#")]),t._v(" Optional implementations")]),t._v(" "),s("p",[t._v("Additional implementations can be optionally provided in replacement of the default implementation.")]),t._v(" "),s("h3",{attrs:{id:"serializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#serializer"}},[t._v("#")]),t._v(" Serializer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("serializer")]),t._v(" dictates the general shape (SELECT-FROM-WHERE) of the SQL query.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("SelectFromWhereSerializer")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the serializer for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgresSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"normalizer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normalizer"}},[t._v("#")]),t._v(" Normalizer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("normalizer")]),t._v(" addresses limitations of certain DBMSs (such as a non-canonical evaluation of the ORDER BY clause).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DialectExtraNormalizer")]),t._v("."),s("br"),t._v("\nAnd several implementations are already available, some of which are used by several DBMS.")]),t._v(" "),s("p",[t._v("For instance, the normalizer associated to PostgreSQL within Ontop is "),s("code",[t._v("OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"metadata-provider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#metadata-provider"}},[t._v("#")]),t._v(" Metadata provider")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("metadata provider")]),t._v(" specifies how schema and integrity constraints (for instance primary keys) are retrieved from the DBMS.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("MetadataProvider")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultDBMetadataProvider")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the metadata provider for PostgreSQL within Ontop is "),s("code",[t._v("PostgreSQLDBMetadataProvider")]),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"declaring-an-implementation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#declaring-an-implementation"}},[t._v("#")]),t._v(" Declaring an implementation")]),t._v(" "),s("p",[t._v("All the implementations mentioned above can be declared in the property file "),s("code",[t._v("sql-default.properties")]),t._v(" (which can be found in the directory "),s("code",[t._v("it/unibz/inf/ontop/injection/")]),t._v(" of the "),s("code",[t._v("ontop-rdb")]),t._v(" module).")]),t._v(" "),s("p",[t._v("A key-value pair must be added for each of these implementations, where the key indicates the type of the implementation (serializer, function symbol factory, etc.), and the value is the implementation.")]),t._v(" "),s("p",[t._v("The naming scheme for the keys is the following."),s("br"),t._v("\nLet "),s("code",[t._v("")]),t._v(" be the name of the JDBC driver for the RDBMS (for instance, the JDBC driver for PostgreSQL is "),s("code",[t._v("org.postgresql.Driver")]),t._v("."),s("br"),t._v("\nThen the keys are:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("-serializer")]),t._v(" for a serializer")]),t._v(" "),s("li",[s("code",[t._v("-symbolFactory")]),t._v(" for a DB function symbol factory")]),t._v(" "),s("li",[s("code",[t._v("-typeFactory")]),t._v(" for a DB datatype factory")]),t._v(" "),s("li",[s("code",[t._v("-normalizer")]),t._v(" for a normalizer")]),t._v(" "),s("li",[s("code",[t._v("-metadataProvider")]),t._v(" for a metadata provider")])]),t._v(" "),s("p",[t._v("For instance, the key-value pairs declared for PostgreSQL are:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.PostgresSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.PostgreSQLDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.PostgreSQLDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.PostgreSQLDBMetadataProvider")]),t._v("\n")])])]),s("p",[t._v("A basic set of key-value pairs may be:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.DefaultSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.NewDialectDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.NewDialectDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.DefaultSchemaCatalogDBMetadataProvider")]),t._v("\n")])])]),s("h2",{attrs:{id:"preparing-and-running-the-testcases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-and-running-the-testcases"}},[t._v("#")]),t._v(" Preparing and Running the Testcases")]),t._v(" "),s("p",[t._v("Ontop currently uses a set of tests called "),s("code",[t._v("lightweight-tests")]),t._v(" to test all main ontop language support features on minimal databases. A simple way of testing the correctness of newly implemented dialect support is to run the same tests a database that uses the corresponding dialect.")]),t._v(" "),s("p",[t._v("This consists of the following steps:")]),t._v(" "),s("ol",[s("li",[t._v("Set up a database with the required testing conditions")]),t._v(" "),s("li",[t._v("Prepare files that assist the connection to the database")]),t._v(" "),s("li",[t._v("Implement sub-classes of the abstract lightweight test classes and run them")])]),t._v(" "),s("p",[t._v("In the following sections, we will discuss each of these steps.")]),t._v(" "),s("h3",{attrs:{id:"setting-up-the-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-the-database"}},[t._v("#")]),t._v(" Setting up the Database")]),t._v(" "),s("p",[t._v("The exact procedure of the database preparation depends on the database system. In ontop, we generally use docker images that reproduce the exact same database state for each test run so we can test the different dialects automatically.")]),t._v(" "),s("p",[t._v("Each directory inside "),s("code",[t._v("test/lightweight-tests/lightweight-db-test-images/")]),t._v(" corresponds to one docker image, and many of them contain table definitions in "),s("code",[t._v(".sql")]),t._v(" file. For instance, the "),s("code",[t._v("mysql")]),t._v(" directory contains the exact definitions of the three databases that are used for testing, "),s("code",[t._v("books")]),t._v(", "),s("code",[t._v("dbconstraints")]),t._v(", and "),s("code",[t._v("university")]),t._v(".")]),t._v(" "),s("p",[t._v("To prepare the required testing conditions, you can take these "),s("code",[t._v(".sql")]),t._v(" files and run their queries on your database. Should any of the features not be supported, you will be required to either use alternative equivalent features to reach the same final database state, or disable the corresponding test cases.")]),t._v(" "),s("h3",{attrs:{id:"preparing-connection-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-connection-files"}},[t._v("#")]),t._v(" Preparing Connection Files")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/resources/")]),t._v(" contains files that are used for setting up an ontop connection with different databases, including "),s("code",[t._v(".obda")]),t._v(" files for the VKG creation and "),s("code",[t._v(".property")]),t._v(" files for JDBC connections. While the "),s("code",[t._v(".obda")]),t._v(" files can usually be reused for different systems, the "),s("code",[t._v(".property")]),t._v(" files must be included for each database system. The directories "),s("code",[t._v("books")]),t._v(" and "),s("code",[t._v("prof")]),t._v(" inside the test resources contain one sub directory for each dialect, where each sub directory in turn includes one "),s("code",[t._v(".properties")]),t._v(" file for the JDBC connection. The "),s("code",[t._v("dbconstraints")]),t._v(" and "),s("code",[t._v("university")]),t._v(" directories, on the other hand, directly contain "),s("code",[t._v(".property")]),t._v(" files for each dialect.")]),t._v(" "),s("p",[t._v("To run all lightweight tests for a new dialect, the corresponding files and directories have to be creates for its JDBC connection. In particular, the connection files should be created in such a way, that the corresponding database/schema of the test is selected as the default database/schema, as the "),s("code",[t._v(".obda")]),t._v(" files access the tables through relative paths.")]),t._v(" "),s("h3",{attrs:{id:"implementing-the-lightweight-test-classes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementing-the-lightweight-test-classes"}},[t._v("#")]),t._v(" Implementing the Lightweight Test Classes")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/java/")]),t._v(" contains the test cases that have to run successfully for each new dialect. They are defined in the four abstract classes "),s("code",[t._v("AbstractBindTestWithFunctions")]),t._v(", "),s("code",[t._v("AbstractConstraintTest")]),t._v(", "),s("code",[t._v("AbstractDistinctInAggregateTest")]),t._v(", and "),s("code",[t._v("AbstractLeftJoinProfTest")]),t._v(".")]),t._v(" "),s("p",[t._v("For each new dialect, a new package has to be created at this location, containing the implementations of sub-classes for each of these abstract base classes.")]),t._v(" "),s("h4",{attrs:{id:"bindtestwithfunctions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bindtestwithfunctions"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("BindTestWithFunctions")])])]),t._v(" "),s("p",[t._v("This test class tests all main SQL functions that are supported by ontop. It uses the "),s("code",[t._v("books")]),t._v(" database, as well as directly generated data through the SPARQL "),s("code",[t._v("BIND")]),t._v(" function. An example implementation of this class may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("BindWithFunctionsNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractBindTestWithFunctions")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/books/new-dialect/books-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@BeforeAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("before")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IOException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("initOBDA")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("OBDA_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" OWL_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AfterAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("after")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("release")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Result Definitions -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Using the "),s("code",[t._v("@NewDialectLightweightTest")]),t._v(" annotation requires the definition of the annotation in the same package, similarly to how it was defined for other dialects.")])]),t._v(" "),s("p",[t._v('The code block "Result Definitions" is commented out in the above example. This code block may contain redefinitions of expected results that are tested in the base class. To do this, override the '),s("code",[t._v("get[TEST-NAME]ExpectedValues()")]),t._v(" method here. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getConstantIntegerDivideExpectedResults")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("of")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"0.500\\"^^xsd:decimal"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Should any of the functionalities not be supported by the SQL dialect, then the corresponding test case may simply be disabled with an exaplanation as to why it is not supported. An example for that may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Disabled")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New Dialect does not support SHA384"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Test")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Some test cases are disabled by default.")]),t._v(" "),s("h4",{attrs:{id:"constraint"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#constraint"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("Constraint")])])]),t._v(" "),s("p",[t._v("This set of test cases tests for the correct interpretation of integrity constraints in the data. It uses the "),s("code",[t._v("dbconstraints")]),t._v(" database. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractConstraintTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/dbconstraints/dbconstraints-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Once again, specific tests may be disabled if they are not supported. For database systems that do not support integrity constraints, this class can be ignored.")]),t._v(" "),s("h4",{attrs:{id:"distinctinaggregate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#distinctinaggregate"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DistinctInAggregate")])])]),t._v(" "),s("p",[t._v("This set of test cases runs queries containing aggregate functions that include the "),s("code",[t._v("DISTINCT")]),t._v(" keyword. It can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("h4",{attrs:{id:"leftjoinprof"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#leftjoinprof"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("LeftJoinProf")])])]),t._v(" "),s("p",[t._v("This set of test cases runs on the "),s("code",[t._v("university")]),t._v(" database. It accesses items that have to be taken from the database through "),s("code",[t._v("JOIN")]),t._v("s. Furthermore, it tests the optimization procedures employed by ontop to minimize the required number of joins. Once again, it can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("p",[t._v("If the database management system does not support integrity constraints, many of these test cases will fail because the optimizations will not be performed.")]),t._v(" "),s("h2",{attrs:{id:"further-implementations-and-troubleshooting"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#further-implementations-and-troubleshooting"}},[t._v("#")]),t._v(" Further Implementations and Troubleshooting")]),t._v(" "),s("p",[t._v("Once the basic features and lightweight test cases have been implemented for a dialect, the tests can be run to determine which features still do not work correctly.")]),t._v(" "),s("p",[t._v("If a test case fails, its corresponding feature is likely not yet supported by the current implementation. In these cases, changes need to be applied to the implemented "),s("code",[t._v("DBTypeFactory")]),t._v(" or "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v(" to solve the issue.")]),t._v(" "),s("p",[t._v("In some situations, however, issues may be caused by problems not related to database types or functions. In these cases, one of the following default implementations may also be extended for the new dialect.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("New implementations of these classes have to be linked to the driver through the "),s("code",[t._v("sql-default.properties")]),t._v(" file.")])]),t._v(" "),s("h3",{attrs:{id:"defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DefaultSchemaCatalogDBMetadataProvider")])]),t._v(", "),s("strong",[s("code",[t._v("DefaultSchemaDBMetadataProvider")])]),t._v(", or "),s("strong",[s("code",[t._v("DefaultDBMetadataProvider")])])]),t._v(" "),s("p",[t._v("If the "),s("code",[t._v("DBMetadataProvider")]),t._v(" assigned to the dialect is not able to perform its expected actions through its default implementation, it may have to be extended with a new sub-class that is particularly tailored for this dialect.")]),t._v(" "),s("p",[t._v("In that case, its methods may be overridden to change the default behavious. Commong targets include:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("insertIntegrityConstraints(...)")]),t._v(" if the dialect does not support integrity constraints.")]),t._v(" "),s("li",[s("code",[t._v("getRelationId(...)")]),t._v(" to return the ID of a given relation.")])]),t._v(" "),s("p",[t._v("Additionally, the constructor may be implemented to determine the default schema or default catalog names if they cannot be accessed directly throug the JDBC, or a different "),s("code",[t._v("QuotedIDFactory")]),t._v(" instance can be passed to the super-class to force ontop to generate quoted identifiers in a specific way.")]),t._v(" "),s("h3",{attrs:{id:"selectfromwhereserializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#selectfromwhereserializer"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("SelectFromWhereSerializer")])])]),t._v(" "),s("p",[t._v("This class is responsible for the serialization of the SQL query frame. Different SQL dialects have different rules as to how the general shape of an SQL query have to be defined. For instance, some dialects allow users to combine "),s("code",[t._v("LIMIT")]),t._v(" and "),s("code",[t._v("OFFSET")]),t._v(" clauses as "),s("code",[t._v("LIMIT ,")]),t._v(", while others require the form "),s("code",[t._v("OFFSET LIMIT ")]),t._v(". The following shows a default implementation of a "),s("code",[t._v("SelectFromWhereSerializer")]),t._v(" to achieve the latter behaviour:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Singleton")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("implements")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLTermSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("QuerySerialization")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serialize")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereWithModifiers")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBParameters")]),t._v(" dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("acceptVisitor")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultRelationVisitingSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getQuotedIDFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeLimitOffset")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("boolean")]),t._v(" noSortCondition"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"OFFSET %d LIMIT %d"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{395:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"support-a-new-database-system"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-a-new-database-system"}},[t._v("#")]),t._v(" Support a new database system")]),t._v(" "),s("p",[t._v("This page describes how Ontop can be extended to support a novel relational database system (RDBMS).")]),t._v(" "),s("p",[t._v("The following RDBMSs are currently supported:")]),t._v(" "),s("ul",[s("li",[t._v("DB2")]),t._v(" "),s("li",[t._v("MySQL / MariaDB")]),t._v(" "),s("li",[t._v("Oracle")]),t._v(" "),s("li",[t._v("PostgreSQL")]),t._v(" "),s("li",[t._v("SQL server")]),t._v(" "),s("li",[t._v("H2")]),t._v(" "),s("li",[t._v("Denodo")]),t._v(" "),s("li",[t._v("Dremio")]),t._v(" "),s("li",[t._v("Apache Spark SQL & Databricks")]),t._v(" "),s("li",[t._v("Teiid")]),t._v(" "),s("li",[t._v("Snowflake")]),t._v(" "),s("li",[t._v("Trino")]),t._v(" "),s("li",[t._v("Presto")]),t._v(" "),s("li",[t._v("Athena")]),t._v(" "),s("li",[t._v("Redshift")]),t._v(" "),s("li",[t._v("DuckDB")])]),t._v(" "),s("p",[t._v("It is relatively easy though to extend Ontop's source code in order to support an additional RDBMS, thanks to dependency injection.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("New: Guided Implementation")]),t._v(" "),s("p",[t._v("Ontop also provides a "),s("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[t._v("python tool"),s("OutboundLink")],1),t._v(" that automatically generates a large part of the required code end simplifies the process of developing support for new SQL dialects.")]),t._v(" "),s("p",[t._v("Using it minimizes the overhead for the implementation of new dialect support and allows you to test your code easily right away.")])]),t._v(" "),s("p",[s("em",[t._v("This page provides a detailed explanation of the key concepts that need to be implemented, and was updated with Ontop 5.0.2. For newer versions of Ontop, it may no longer be up-to-date.")])]),t._v(" "),s("h2",{attrs:{id:"required-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#required-implementations"}},[t._v("#")]),t._v(" Required implementations")]),t._v(" "),s("p",[t._v("Two implementations must be provided, each for a different interface that already has a default (abstract) implementation.")]),t._v(" "),s("p",[t._v("These implementations dictate what the datatypes of the RDBMS are and how certain function symbols can be translated into the SQL dialect supported by the RDBMS.")]),t._v(" "),s("p",[t._v("The default implementation of each of these interfaces is often sufficient to handle many query operators and functions. As a result, only a few methods generally need to be overwritten,\nto account for specificities of the new SQL dialect.")]),t._v(" "),s("p",[t._v("The 2 required implementations are the DB function symbol factory and the DB datatype factory.")]),t._v(" "),s("h3",{attrs:{id:"db-function-symbol-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-function-symbol-factory"}},[t._v("#")]),t._v(" DB function symbol factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB function symbol factory")]),t._v(" provides function symbols\nwhich can be directly serialized into the target SQL dialect (e.g. "),s("code",[t._v("LENGTH")]),t._v(" or "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v("). This factory has methods for common operations with precise semantics (e.g. concatenating 3 string arguments in a null-rejecting manner).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the DB function symbol factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("This interface should not be confused with the "),s("code",[t._v("FunctionSymbolFactory")]),t._v(", which is in charge of constructing\nSPARQL function symbols and other function symbols that cannot be directly serialized into SQL.")])]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DuckDBDBFunctionSymbolFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTypeFactory")]),t._v(" dbTypeFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),t._v(" abstractRootDBType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAbstractRootDBType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Table")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" table "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashBasedTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Changed Function Symbols -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("table"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Implementations -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, two code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"changed-function-symbols"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#changed-function-symbols"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Changed Function Symbols")])]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("regular function table")]),t._v(" is a dictionary, that maps from function names to the function symbol instance it corresponds to. The abstract base classes we inherit from already define a default function symbol table that includes all commonly used SQL functions. In some cases, however, some of these default function symbols need to be changed. For these cases, new entries can be created in this block, to override existing, bad entries.")]),t._v(" "),s("p",[t._v("A popular example is the "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function symbol. By default, it is created as a simple function with arity 0 of the form "),s("code",[t._v("CURRENT_TIMESTAMP()")]),t._v(". In some dialects, however, the current time is called without parentheses, simply in the form "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(". In this case, we need to override the function symbol created by the default implementation, to not include parentheses:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),t._v(" nowFunctionSymbol "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbolImpl")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBDateTimestampType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ntable"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" nowFunctionSymbol"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function is now a "),s("code",[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbol")]),t._v(", so when generating SQL queries, ontop will not include the parentheses. By putting this new function symbol into the table at the key "),s("code",[t._v("CURRENT_TIMESTAMP_STR")]),t._v(", we override the default behaviour that was put into the table by the default method.")]),t._v(" "),s("h4",{attrs:{id:"implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Implementations")])]),t._v(" "),s("p",[t._v("A set of serialization methods have been left abstract by the base classes. These "),s("em",[t._v("always")]),t._v(" have to be implemented for each new dialect.")]),t._v(" "),s("p",[t._v("All such methods share the same structure:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" serialize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("FUNCTION_NAME"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Here, "),s("code",[t._v("terms")]),t._v(" is the list of arguments that were passed to the function, "),s("code",[t._v("termConverter")]),t._v(" ist a function that can be used to transform any given term into its SQL equivalent, and termFactory can be used to generate new terms that may be required for some functions.")]),t._v(" "),s("p",[t._v("We will now go through each of them and provide example implementations.")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Contains")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns a boolean value, indicating whether a given string (argument 2) is included in a different string (argument 1). While some dialects have their own "),s("code",[t._v("CONTAINS")]),t._v(" functions, for others it may have to be implemented through a string search, like in this example:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeContains")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"(POSITION(%s IN %s) > 0)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrBefore")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns the section of a given string (argument 1) before the first appearance of a given search string (argument 2). If the searched string is not contained in the base string, an empty string is returned instead. In many languages, this can be implemented using string search and substring methods.")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s,1,POSITION(%s IN %s)-1)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" before"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrAfter")])]),t._v(":")]),t._v(" "),s("p",[t._v("The opposite of "),s("code",[t._v("STRBEFORE")]),t._v(", this function returns the section of a given string (argument 1) "),s("em",[t._v("after")]),t._v(" the first appearance of a search string (argument 2). This function can be implemented similarly:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s, IF(POSITION(%s IN %s) != 0, POSITION(%s IN %s) + LENGTH(%s), 0))"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Tz")])]),t._v(":\nThis function extracts the timezone part of a given timestamp. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeTz")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(LPAD(EXTRACT(TIMEZONE_HOUR FROM %s)::text,2,'0') || ':' || LPAD(EXTRACT(TIMEZONE_MINUTE FROM %s)::text,2,'0'))\"")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("DateTimeNorm")])]),t._v(":\nThis function converts a given timestamp to the standardized "),s("code",[t._v("ISO 8601")]),t._v(" format. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeDateTimeNorm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TO_ISO8601(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Hashing Functions")])]),t._v(":")]),t._v(" "),s("p",[t._v("Ontop supports a set of hasing functions:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("MD5")])]),t._v(" "),s("li",[s("code",[t._v("SHA1")])]),t._v(" "),s("li",[s("code",[t._v("SHA256")])]),t._v(" "),s("li",[s("code",[t._v("SHA384")])]),t._v(" "),s("li",[s("code",[t._v("SHA512")])])]),t._v(" "),s("p",[t._v("For each of them, the implementation of a serialization method is required. An example implementation of the "),s("code",[t._v("MD5")]),t._v(" function may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeMD5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MD5(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p"),t._v(" "),s("p",[t._v("Other than the serialization methods, four additional methods must be implemented by the subclass:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUUIDNameInDialect")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"[UUID_FUNCTION_NAME]"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("returns the string that represents the name of the UUID in the SQL dialect.")]),t._v(" "),s("p",[t._v("The methods "),s("code",[t._v("createNullRejectingDBConcat(int arity)")]),t._v(", "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(", and "),s("code",[t._v("createRegularDBConcat(int arity)")]),t._v(" need to be implemented to define the concat function symbols. The "),s("code",[t._v("DBConcat")]),t._v(" methods define function symbols that represent "),s("code",[t._v("CONCAT")]),t._v(" function calls of a given arity. Sample implementations for them may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createRegularDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullToleratingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNullRejectingDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT_NO_NULL"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(" method represents a concat operation executed through a concat operator (often "),s("code",[t._v("+")]),t._v(" or "),s("code",[t._v("||")]),t._v("). It may be implemented like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDBConcatOperator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Serializers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getOperatorSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"db-datatype-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-datatype-factory"}},[t._v("#")]),t._v(" DB Datatype factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB datatype factory")]),t._v(" declares the hierarchy of DB datatypes used by the DBMS, and specifies their correspondence with datatypes used in the RDF graphs (such as xsd datatypes).")]),t._v(" "),s("p",[t._v("The interface to implement (for SQL dialects) is "),s("code",[t._v("SQLDBTypeFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSQLDBTypeFactory")]),t._v(" .")]),t._v(" "),s("p",[t._v("For instance, the datatype factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBTypeFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Definitions -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AssistedInject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Code Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Support Flags -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, four code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"type-definitions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-definitions"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Type Definitions")])]),t._v(" "),s("p",[t._v("In this section, we define a set of "),s("code",[t._v("String")]),t._v(" constants that represent the names of datatypes in our SQL dialect. These constants are then used in other code blocks. An excerpt of the "),s("em",[t._v("type definitions")]),t._v(" part in an implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" BIT_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BIT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT2_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"type-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("TYPE MAP")])]),t._v(" "),s("p",[t._v("In this method, we define the contents of the type map for our dialect. We create "),s("code",[t._v("DBTermType")]),t._v(" instances for each supported type and store them in a "),s("code",[t._v("Map")]),t._v(" object, that matches their identifiers to the "),s("code",[t._v("DBTermType")]),t._v(". The base class we extend from already generates an extensive type map for many popular types, such as "),s("code",[t._v("VARCHAR")]),t._v(", "),s("code",[t._v("INTEGER")]),t._v(", "),s("code",[t._v("REAL")]),t._v(", "),s("code",[t._v("DOUBLE")]),t._v(", and more in the method "),s("code",[t._v("createDefaultSQLTypeMap(...)")]),t._v(". New types can be added to the map in the subclass, and, alternatively, we can override existing entries in the map here. An example implementation of this method may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermTypeAncestry")]),t._v(" rootAncestry "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAncestry")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"code-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#code-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("CODE MAP")])]),t._v(" "),s("p",[t._v('The code map is a dictionary, that maps different type codes to their "default type" for the SQL dialect. This includes the following type codes:')]),t._v(" "),s("ul",[s("li",[s("code",[t._v("STRING")])]),t._v(" "),s("li",[s("code",[t._v("HEXBINARY")])]),t._v(" "),s("li",[s("code",[t._v("LARGE_INTEGER")])]),t._v(" "),s("li",[s("code",[t._v("DECIMAL")])]),t._v(" "),s("li",[s("code",[t._v("DOUBLE")])]),t._v(" "),s("li",[s("code",[t._v("BOOLEAN")])]),t._v(" "),s("li",[s("code",[t._v("DATE")])]),t._v(" "),s("li",[s("code",[t._v("TIME")])]),t._v(" "),s("li",[s("code",[t._v("DATETIMESTAMP")])]),t._v(" "),s("li",[s("code",[t._v("GEOMETRY")])]),t._v(" "),s("li",[s("code",[t._v("GEOGRAPHY")])]),t._v(" "),s("li",[s("code",[t._v("ARRAY")])]),t._v(" "),s("li",[s("code",[t._v("JSON")])])]),t._v(" "),s("p",[t._v("The default implementation already maps many of these to the name of the corresponding data type. To support additional ones, or to override existing mappings, this method can be implemented. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("JSON"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" JSONB_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"support-flags"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-flags"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Support Flags")])]),t._v(" "),s("p",[t._v("An instance of "),s("code",[t._v("DBTypeFactory")]),t._v(" supports a set of methods that, when called, return a flag indicating if a certain SQL feature is supported by the dialect. These methods are")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("supportsDBGeometryType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBGeographyType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBDistanceSphere()")])]),t._v(" "),s("li",[s("code",[t._v("supportsJson()")])]),t._v(" "),s("li",[s("code",[t._v("supportsArrayType()")])])]),t._v(" "),s("p",[t._v("Any of these functions can be overridden by the "),s("code",[t._v("DBTypeFactory")]),t._v(" sub-class to return a boolean constant indicating if the type is supported.")]),t._v(" "),s("h4",{attrs:{id:"other-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Other Implementations")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("DBTypeFactory")]),t._v(" base-class supports further methods that can be included in sub-classes for fine-tuning. One popular set of such methods are the "),s("code",[t._v("LexicalValue")]),t._v(" methods. These return a "),s("code",[t._v("String")]),t._v(" constant that represents the lexical value the corresponding literal may assume. For instance, by default, the method "),s("code",[t._v("getDBFalseLexicalValue()")]),t._v(" returns the string "),s("code",[t._v('"FALSE"')]),t._v(", as this is a common representation of the boolean "),s("code",[t._v("false")]),t._v(" value in many SQL dialects. To implement the "),s("code",[t._v("DBTypeFactory")]),t._v(" for a dialect that instead uses the digit "),s("code",[t._v("0")]),t._v(" for "),s("code",[t._v("false")]),t._v(" literals, we could override the method like so:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBFalseLexicalValue")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"optional-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#optional-implementations"}},[t._v("#")]),t._v(" Optional implementations")]),t._v(" "),s("p",[t._v("Additional implementations can be optionally provided in replacement of the default implementation.")]),t._v(" "),s("h3",{attrs:{id:"serializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#serializer"}},[t._v("#")]),t._v(" Serializer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("serializer")]),t._v(" dictates the general shape (SELECT-FROM-WHERE) of the SQL query.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("SelectFromWhereSerializer")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the serializer for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgresSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"normalizer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normalizer"}},[t._v("#")]),t._v(" Normalizer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("normalizer")]),t._v(" addresses limitations of certain DBMSs (such as a non-canonical evaluation of the ORDER BY clause).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DialectExtraNormalizer")]),t._v("."),s("br"),t._v("\nAnd several implementations are already available, some of which are used by several DBMS.")]),t._v(" "),s("p",[t._v("For instance, the normalizer associated to PostgreSQL within Ontop is "),s("code",[t._v("OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"metadata-provider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#metadata-provider"}},[t._v("#")]),t._v(" Metadata provider")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("metadata provider")]),t._v(" specifies how schema and integrity constraints (for instance primary keys) are retrieved from the DBMS.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("MetadataProvider")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultDBMetadataProvider")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the metadata provider for PostgreSQL within Ontop is "),s("code",[t._v("PostgreSQLDBMetadataProvider")]),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"declaring-an-implementation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#declaring-an-implementation"}},[t._v("#")]),t._v(" Declaring an implementation")]),t._v(" "),s("p",[t._v("All the implementations mentioned above can be declared in the property file "),s("code",[t._v("sql-default.properties")]),t._v(" (which can be found in the directory "),s("code",[t._v("it/unibz/inf/ontop/injection/")]),t._v(" of the "),s("code",[t._v("ontop-rdb")]),t._v(" module).")]),t._v(" "),s("p",[t._v("A key-value pair must be added for each of these implementations, where the key indicates the type of the implementation (serializer, function symbol factory, etc.), and the value is the implementation.")]),t._v(" "),s("p",[t._v("The naming scheme for the keys is the following."),s("br"),t._v("\nLet "),s("code",[t._v("")]),t._v(" be the name of the JDBC driver for the RDBMS (for instance, the JDBC driver for PostgreSQL is "),s("code",[t._v("org.postgresql.Driver")]),t._v("."),s("br"),t._v("\nThen the keys are:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("-serializer")]),t._v(" for a serializer")]),t._v(" "),s("li",[s("code",[t._v("-symbolFactory")]),t._v(" for a DB function symbol factory")]),t._v(" "),s("li",[s("code",[t._v("-typeFactory")]),t._v(" for a DB datatype factory")]),t._v(" "),s("li",[s("code",[t._v("-normalizer")]),t._v(" for a normalizer")]),t._v(" "),s("li",[s("code",[t._v("-metadataProvider")]),t._v(" for a metadata provider")])]),t._v(" "),s("p",[t._v("For instance, the key-value pairs declared for PostgreSQL are:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.PostgresSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.PostgreSQLDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.PostgreSQLDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.PostgreSQLDBMetadataProvider")]),t._v("\n")])])]),s("p",[t._v("A basic set of key-value pairs may be:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.DefaultSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.NewDialectDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.NewDialectDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.DefaultSchemaCatalogDBMetadataProvider")]),t._v("\n")])])]),s("h2",{attrs:{id:"preparing-and-running-the-testcases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-and-running-the-testcases"}},[t._v("#")]),t._v(" Preparing and Running the Testcases")]),t._v(" "),s("p",[t._v("Ontop currently uses a set of tests called "),s("code",[t._v("lightweight-tests")]),t._v(" to test all main ontop language support features on minimal databases. A simple way of testing the correctness of newly implemented dialect support is to run the same tests a database that uses the corresponding dialect.")]),t._v(" "),s("p",[t._v("This consists of the following steps:")]),t._v(" "),s("ol",[s("li",[t._v("Set up a database with the required testing conditions")]),t._v(" "),s("li",[t._v("Prepare files that assist the connection to the database")]),t._v(" "),s("li",[t._v("Implement sub-classes of the abstract lightweight test classes and run them")])]),t._v(" "),s("p",[t._v("In the following sections, we will discuss each of these steps.")]),t._v(" "),s("h3",{attrs:{id:"setting-up-the-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-the-database"}},[t._v("#")]),t._v(" Setting up the Database")]),t._v(" "),s("p",[t._v("The exact procedure of the database preparation depends on the database system. In ontop, we generally use docker images that reproduce the exact same database state for each test run so we can test the different dialects automatically.")]),t._v(" "),s("p",[t._v("Each directory inside "),s("code",[t._v("test/lightweight-tests/lightweight-db-test-images/")]),t._v(" corresponds to one docker image, and many of them contain table definitions in "),s("code",[t._v(".sql")]),t._v(" file. For instance, the "),s("code",[t._v("mysql")]),t._v(" directory contains the exact definitions of the three databases that are used for testing, "),s("code",[t._v("books")]),t._v(", "),s("code",[t._v("dbconstraints")]),t._v(", and "),s("code",[t._v("university")]),t._v(".")]),t._v(" "),s("p",[t._v("To prepare the required testing conditions, you can take these "),s("code",[t._v(".sql")]),t._v(" files and run their queries on your database. Should any of the features not be supported, you will be required to either use alternative equivalent features to reach the same final database state, or disable the corresponding test cases.")]),t._v(" "),s("h3",{attrs:{id:"preparing-connection-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-connection-files"}},[t._v("#")]),t._v(" Preparing Connection Files")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/resources/")]),t._v(" contains files that are used for setting up an ontop connection with different databases, including "),s("code",[t._v(".obda")]),t._v(" files for the VKG creation and "),s("code",[t._v(".property")]),t._v(" files for JDBC connections. While the "),s("code",[t._v(".obda")]),t._v(" files can usually be reused for different systems, the "),s("code",[t._v(".property")]),t._v(" files must be included for each database system. The directories "),s("code",[t._v("books")]),t._v(" and "),s("code",[t._v("prof")]),t._v(" inside the test resources contain one sub directory for each dialect, where each sub directory in turn includes one "),s("code",[t._v(".properties")]),t._v(" file for the JDBC connection. The "),s("code",[t._v("dbconstraints")]),t._v(" and "),s("code",[t._v("university")]),t._v(" directories, on the other hand, directly contain "),s("code",[t._v(".property")]),t._v(" files for each dialect.")]),t._v(" "),s("p",[t._v("To run all lightweight tests for a new dialect, the corresponding files and directories have to be creates for its JDBC connection. In particular, the connection files should be created in such a way, that the corresponding database/schema of the test is selected as the default database/schema, as the "),s("code",[t._v(".obda")]),t._v(" files access the tables through relative paths.")]),t._v(" "),s("h3",{attrs:{id:"implementing-the-lightweight-test-classes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementing-the-lightweight-test-classes"}},[t._v("#")]),t._v(" Implementing the Lightweight Test Classes")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/java/")]),t._v(" contains the test cases that have to run successfully for each new dialect. They are defined in the four abstract classes "),s("code",[t._v("AbstractBindTestWithFunctions")]),t._v(", "),s("code",[t._v("AbstractConstraintTest")]),t._v(", "),s("code",[t._v("AbstractDistinctInAggregateTest")]),t._v(", and "),s("code",[t._v("AbstractLeftJoinProfTest")]),t._v(".")]),t._v(" "),s("p",[t._v("For each new dialect, a new package has to be created at this location, containing the implementations of sub-classes for each of these abstract base classes.")]),t._v(" "),s("h4",{attrs:{id:"bindtestwithfunctions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bindtestwithfunctions"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("BindTestWithFunctions")])])]),t._v(" "),s("p",[t._v("This test class tests all main SQL functions that are supported by ontop. It uses the "),s("code",[t._v("books")]),t._v(" database, as well as directly generated data through the SPARQL "),s("code",[t._v("BIND")]),t._v(" function. An example implementation of this class may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("BindWithFunctionsNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractBindTestWithFunctions")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/books/new-dialect/books-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@BeforeAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("before")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IOException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("initOBDA")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("OBDA_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" OWL_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AfterAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("after")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("release")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Result Definitions -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Using the "),s("code",[t._v("@NewDialectLightweightTest")]),t._v(" annotation requires the definition of the annotation in the same package, similarly to how it was defined for other dialects.")])]),t._v(" "),s("p",[t._v('The code block "Result Definitions" is commented out in the above example. This code block may contain redefinitions of expected results that are tested in the base class. To do this, override the '),s("code",[t._v("get[TEST-NAME]ExpectedValues()")]),t._v(" method here. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getConstantIntegerDivideExpectedResults")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("of")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"0.500\\"^^xsd:decimal"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Should any of the functionalities not be supported by the SQL dialect, then the corresponding test case may simply be disabled with an exaplanation as to why it is not supported. An example for that may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Disabled")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New Dialect does not support SHA384"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Test")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Some test cases are disabled by default.")]),t._v(" "),s("h4",{attrs:{id:"constraint"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#constraint"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("Constraint")])])]),t._v(" "),s("p",[t._v("This set of test cases tests for the correct interpretation of integrity constraints in the data. It uses the "),s("code",[t._v("dbconstraints")]),t._v(" database. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractConstraintTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/dbconstraints/dbconstraints-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Once again, specific tests may be disabled if they are not supported. For database systems that do not support integrity constraints, this class can be ignored.")]),t._v(" "),s("h4",{attrs:{id:"distinctinaggregate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#distinctinaggregate"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DistinctInAggregate")])])]),t._v(" "),s("p",[t._v("This set of test cases runs queries containing aggregate functions that include the "),s("code",[t._v("DISTINCT")]),t._v(" keyword. It can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("h4",{attrs:{id:"leftjoinprof"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#leftjoinprof"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("LeftJoinProf")])])]),t._v(" "),s("p",[t._v("This set of test cases runs on the "),s("code",[t._v("university")]),t._v(" database. It accesses items that have to be taken from the database through "),s("code",[t._v("JOIN")]),t._v("s. Furthermore, it tests the optimization procedures employed by ontop to minimize the required number of joins. Once again, it can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("p",[t._v("If the database management system does not support integrity constraints, many of these test cases will fail because the optimizations will not be performed.")]),t._v(" "),s("h2",{attrs:{id:"further-implementations-and-troubleshooting"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#further-implementations-and-troubleshooting"}},[t._v("#")]),t._v(" Further Implementations and Troubleshooting")]),t._v(" "),s("p",[t._v("Once the basic features and lightweight test cases have been implemented for a dialect, the tests can be run to determine which features still do not work correctly.")]),t._v(" "),s("p",[t._v("If a test case fails, its corresponding feature is likely not yet supported by the current implementation. In these cases, changes need to be applied to the implemented "),s("code",[t._v("DBTypeFactory")]),t._v(" or "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v(" to solve the issue.")]),t._v(" "),s("p",[t._v("In some situations, however, issues may be caused by problems not related to database types or functions. In these cases, one of the following default implementations may also be extended for the new dialect.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("New implementations of these classes have to be linked to the driver through the "),s("code",[t._v("sql-default.properties")]),t._v(" file.")])]),t._v(" "),s("h3",{attrs:{id:"defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DefaultSchemaCatalogDBMetadataProvider")])]),t._v(", "),s("strong",[s("code",[t._v("DefaultSchemaDBMetadataProvider")])]),t._v(", or "),s("strong",[s("code",[t._v("DefaultDBMetadataProvider")])])]),t._v(" "),s("p",[t._v("If the "),s("code",[t._v("DBMetadataProvider")]),t._v(" assigned to the dialect is not able to perform its expected actions through its default implementation, it may have to be extended with a new sub-class that is particularly tailored for this dialect.")]),t._v(" "),s("p",[t._v("In that case, its methods may be overridden to change the default behavious. Commong targets include:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("insertIntegrityConstraints(...)")]),t._v(" if the dialect does not support integrity constraints.")]),t._v(" "),s("li",[s("code",[t._v("getRelationId(...)")]),t._v(" to return the ID of a given relation.")])]),t._v(" "),s("p",[t._v("Additionally, the constructor may be implemented to determine the default schema or default catalog names if they cannot be accessed directly throug the JDBC, or a different "),s("code",[t._v("QuotedIDFactory")]),t._v(" instance can be passed to the super-class to force ontop to generate quoted identifiers in a specific way.")]),t._v(" "),s("h3",{attrs:{id:"selectfromwhereserializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#selectfromwhereserializer"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("SelectFromWhereSerializer")])])]),t._v(" "),s("p",[t._v("This class is responsible for the serialization of the SQL query frame. Different SQL dialects have different rules as to how the general shape of an SQL query have to be defined. For instance, some dialects allow users to combine "),s("code",[t._v("LIMIT")]),t._v(" and "),s("code",[t._v("OFFSET")]),t._v(" clauses as "),s("code",[t._v("LIMIT ,")]),t._v(", while others require the form "),s("code",[t._v("OFFSET LIMIT ")]),t._v(". The following shows a default implementation of a "),s("code",[t._v("SelectFromWhereSerializer")]),t._v(" to achieve the latter behaviour:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Singleton")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("implements")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLTermSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("QuerySerialization")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serialize")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereWithModifiers")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBParameters")]),t._v(" dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("acceptVisitor")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultRelationVisitingSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getQuotedIDFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeLimitOffset")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("boolean")]),t._v(" noSortCondition"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"OFFSET %d LIMIT %d"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/20.647b4013.js b/assets/js/20.8c67cb7d.js similarity index 97% rename from assets/js/20.647b4013.js rename to assets/js/20.8c67cb7d.js index 684d15b89..2d042127c 100644 --- a/assets/js/20.647b4013.js +++ b/assets/js/20.8c67cb7d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{398:function(e,t,n){"use strict";n.r(t);var i=n(51),r=Object(i.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"debug-jetty"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#debug-jetty"}},[e._v("#")]),e._v(" Debug Jetty")]),e._v(" "),n("p",[e._v("This page describe debug Jetty with RDF4J workbench plugin in IntelliJ Idea")]),e._v(" "),n("h2",{attrs:{id:"start-the-jetty-in-debug-mode"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#start-the-jetty-in-debug-mode"}},[e._v("#")]),e._v(" Start the Jetty in Debug mode")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[e._v("$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar\n")])])]),n("h2",{attrs:{id:"linking-with-intellij"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#linking-with-intellij"}},[e._v("#")]),e._v(" Linking with IntelliJ")]),e._v(" "),n("p",[e._v("Next we need to link the IntelliJ project with the deployed webapp.")]),e._v(" "),n("ol",[n("li",[n("p",[e._v('Within IntelliJ, open the project containing the webapp deployed into jetty that you want to debug. SelectRun -> Edit Configurations. Add a new configuration by clicking the "+" icon. Choose Remote. Make sure the port you choose is the same as the one you added in Enable remote debugging.')])]),e._v(" "),n("li",[n("p",[e._v("Next in your webapp you can set a breakpoint within a servlet which when it is tripped will halt the remote jvm's processing thread to await for debugging commands from your IntelliJ instance. To set a breakpoint, simply open the servlet or any other class you want to debug and click left to the line you want to set the breakpoint at (where the red dot is on the next screenshot). The red dot and red background on the line mark the breakpoint.")])]),e._v(" "),n("li",[n("p",[e._v("Accessing that servlet within your browser, pointed at your remote debug configurated jetty-distribution, should transition your IntelliJ instance to the standard debugger view.")])])]),e._v(" "),n("h2",{attrs:{id:"references"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#references"}},[e._v("#")]),e._v(" References")]),e._v(" "),n("ol",[n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{397:function(e,t,n){"use strict";n.r(t);var i=n(51),r=Object(i.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"debug-jetty"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#debug-jetty"}},[e._v("#")]),e._v(" Debug Jetty")]),e._v(" "),n("p",[e._v("This page describe debug Jetty with RDF4J workbench plugin in IntelliJ Idea")]),e._v(" "),n("h2",{attrs:{id:"start-the-jetty-in-debug-mode"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#start-the-jetty-in-debug-mode"}},[e._v("#")]),e._v(" Start the Jetty in Debug mode")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[e._v("$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar\n")])])]),n("h2",{attrs:{id:"linking-with-intellij"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#linking-with-intellij"}},[e._v("#")]),e._v(" Linking with IntelliJ")]),e._v(" "),n("p",[e._v("Next we need to link the IntelliJ project with the deployed webapp.")]),e._v(" "),n("ol",[n("li",[n("p",[e._v('Within IntelliJ, open the project containing the webapp deployed into jetty that you want to debug. SelectRun -> Edit Configurations. Add a new configuration by clicking the "+" icon. Choose Remote. Make sure the port you choose is the same as the one you added in Enable remote debugging.')])]),e._v(" "),n("li",[n("p",[e._v("Next in your webapp you can set a breakpoint within a servlet which when it is tripped will halt the remote jvm's processing thread to await for debugging commands from your IntelliJ instance. To set a breakpoint, simply open the servlet or any other class you want to debug and click left to the line you want to set the breakpoint at (where the red dot is on the next screenshot). The red dot and red background on the line mark the breakpoint.")])]),e._v(" "),n("li",[n("p",[e._v("Accessing that servlet within your browser, pointed at your remote debug configurated jetty-distribution, should transition your IntelliJ instance to the standard debugger view.")])])]),e._v(" "),n("h2",{attrs:{id:"references"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#references"}},[e._v("#")]),e._v(" References")]),e._v(" "),n("ol",[n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/21.8e93c882.js b/assets/js/21.101f0364.js similarity index 99% rename from assets/js/21.8e93c882.js rename to assets/js/21.101f0364.js index 7ba635b36..20bb77115 100644 --- a/assets/js/21.8e93c882.js +++ b/assets/js/21.101f0364.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{397:function(e,t,o){"use strict";o.r(t);var n=o(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"debug-protege"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#debug-protege"}},[e._v("#")]),e._v(" Debug Protégé")]),e._v(" "),o("p",[e._v("This page describes how to debug the Protégé Plugin of Ontop from IntelliJ.")]),e._v(" "),o("p",[e._v("If you just want to test the plugin (without debugging), you only need to follow the step of building the Protégé plugin, and then run Protégé as usual (use "),o("code",[e._v("run.bat")]),e._v(" on Windows)")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ Protege-[protege-version]/run.sh\n")])])]),o("h2",{attrs:{id:"build-the-protege-plugin"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#build-the-protege-plugin"}},[e._v("#")]),e._v(" Build the Protégé plugin")]),e._v(" "),o("h3",{attrs:{id:"requirements"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),o("p",[e._v("Checkout and build Ontop source code as described "),o("a",{attrs:{href:"/dev/build"}},[e._v("here")]),e._v(".\nWe assume all commands listed below are issued from the root directory of Ontop source tree.")]),e._v(" "),o("h3",{attrs:{id:"first-time-build"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#first-time-build"}},[e._v("#")]),e._v(" First time build")]),e._v(" "),o("p",[e._v("Unzip the Ontop Protégé bundle (obtained by previously building Ontop source code), which contains Protégé preconfigured with the Ontop Protégé plugin")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ unzip protege/distribution/target/ontop-protege-bundle-platform-independent-[ontop-version].zip\n")])])]),o("p",[e._v("Notes:")]),e._v(" "),o("ul",[o("li",[e._v("for older versions of Ontop (before 5.0.0) the bundle to unzip is located either in "),o("code",[e._v("build/distribution/ontop-protege")]),e._v(" (up to 4.0.3) or in "),o("code",[e._v("build/distribution/target")]),e._v(" (up to 5.0.0 excluded);")]),e._v(" "),o("li",[e._v("you may also reuse a (platform independent) Protégé distribution obtained directly from Protégé web site and already installed locally. In this case make sure that the Protégé version matches the one used during Ontop build, that Protégé directory contains a "),o("code",[e._v("plugins")]),e._v(" sub-directory (create it if missing), and run the commands below to deploy the Ontop Protégé plugin (adapting paths accordingly).")])]),e._v(" "),o("h3",{attrs:{id:"subsequent-builds"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#subsequent-builds"}},[e._v("#")]),e._v(" Subsequent builds")]),e._v(" "),o("p",[o("strong",[e._v("Each time you modify the code, you need to recompile and build the Ontop distribution.")])]),e._v(" "),o("p",[e._v("The fastest command to re-compile the Ontop Protégé plugin and the code it depends on is")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ mvn clean package -Dmaven.test.skip -Passet-plugin -pl protege/distribution -am\n")])])]),o("p",[e._v("Where:")]),e._v(" "),o("ul",[o("li",[o("code",[e._v("clean package")]),e._v(" forces a full re-build and may be generally omitted (which defaults to running "),o("code",[e._v("package")]),e._v(") unless you encounter build errors, in which case "),o("code",[e._v("clean")]),e._v(" helps ruling out they stem from incremental builds;")]),e._v(" "),o("li",[o("code",[e._v("-Dmaven.test.skip")]),e._v(" disables compiling and executing unit tests;")]),e._v(" "),o("li",[o("code",[e._v("-Passet-plugin")]),e._v(" activates the generation of the Ontop Protégé plugin (OSGI bundle with all its dependencies), without including other uneeded artifacts (e.g., full ZIP/tar.gz Protégé bundles, source and Javadoc JARs, etc);")]),e._v(" "),o("li",[o("code",[e._v("-pl protege/distribution -am")]),e._v(" (optional) tells Maven to only build the Ontop Protégé module located in "),o("code",[e._v("protege/distribution")]),e._v(" and all the other Ontop modules it depends on, saving another couple of seconds.")])]),e._v(" "),o("p",[e._v("Notes:")]),e._v(" "),o("ul",[o("li",[e._v("in Ontop versions 4.1 to 5.0.0 excluded, the command above should be replaced by "),o("code",[e._v("mvn clean package -Dmaven.test.skip -Pprotege -pl client/protege -am")]),e._v(";")]),e._v(" "),o("li",[e._v("in Ontop version 4.0.3 or earlier, the command above should be replaced by "),o("code",[e._v("mvn clean install -pl client/protege -am -DskipTests")]),e._v(" to compile code and install it in local maven repository, followed by "),o("code",[e._v("mvn bundle:bundle -pl client/protege")]),e._v(" to package the plugin.")])]),e._v(" "),o("p",[e._v("Once the Ontop Protégé plugin is built, it must be copied to the Protégé plugin directory via")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ cp protege/distribution/target/it.unibz.inf.ontop.protege-[ontop-version].jar Protege-[protege-version]/plugins/\n")])])]),o("p",[e._v("The command above should replace any previous Ontop Protégé plugin in the "),o("code",[e._v("plugins")]),e._v(" directory. In any case, "),o("strong",[e._v("make sure that there is only one Protégé plugin in "),o("code",[e._v("Protege-[protege-version]/plugins/")])])]),e._v(" "),o("h2",{attrs:{id:"debug-in-intellij-using-the-remote-debugger"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#debug-in-intellij-using-the-remote-debugger"}},[e._v("#")]),e._v(" Debug in IntelliJ using the Remote debugger")]),e._v(" "),o("h3",{attrs:{id:"intellij-configuration"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#intellij-configuration"}},[e._v("#")]),e._v(" IntelliJ configuration")]),e._v(" "),o("p",[e._v("Create a remote configuration:")]),e._v(" "),o("ul",[o("li",[e._v("select 'Edit configurations', click '+', then select 'Remote'")]),e._v(" "),o("li",[e._v("Host: "),o("code",[e._v("localhost")])]),e._v(" "),o("li",[e._v("Port: choose a port number ("),o("code",[e._v("5005")]),e._v(" in what follows)")])]),e._v(" "),o("h3",{attrs:{id:"protege-run-options"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#protege-run-options"}},[e._v("#")]),e._v(" Protégé run options")]),e._v(" "),o("p",[e._v("Edit the script "),o("code",[e._v("Protege-[protege-version]/run.sh")]),e._v(" (on Windows: "),o("code",[e._v("run.bat")]),e._v("), adding the following JVM option (note that parameter "),o("code",[e._v("suspend")]),e._v(" is set to "),o("code",[e._v("y")]),e._v(")")]),e._v(" "),o("div",{staticClass:"language- extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005\n")])])]),o("h3",{attrs:{id:"run-debug"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#run-debug"}},[e._v("#")]),e._v(" Run / Debug")]),e._v(" "),o("p",[e._v("Execute "),o("code",[e._v("Protege-[protege-version]/run.sh")]),e._v(" (on Windows: "),o("code",[e._v("run.bat")]),e._v(").\nThen, from IntelliJ, click on the Debug button (or Shift+F9).")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{398:function(e,t,o){"use strict";o.r(t);var n=o(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"debug-protege"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#debug-protege"}},[e._v("#")]),e._v(" Debug Protégé")]),e._v(" "),o("p",[e._v("This page describes how to debug the Protégé Plugin of Ontop from IntelliJ.")]),e._v(" "),o("p",[e._v("If you just want to test the plugin (without debugging), you only need to follow the step of building the Protégé plugin, and then run Protégé as usual (use "),o("code",[e._v("run.bat")]),e._v(" on Windows)")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ Protege-[protege-version]/run.sh\n")])])]),o("h2",{attrs:{id:"build-the-protege-plugin"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#build-the-protege-plugin"}},[e._v("#")]),e._v(" Build the Protégé plugin")]),e._v(" "),o("h3",{attrs:{id:"requirements"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),o("p",[e._v("Checkout and build Ontop source code as described "),o("a",{attrs:{href:"/dev/build"}},[e._v("here")]),e._v(".\nWe assume all commands listed below are issued from the root directory of Ontop source tree.")]),e._v(" "),o("h3",{attrs:{id:"first-time-build"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#first-time-build"}},[e._v("#")]),e._v(" First time build")]),e._v(" "),o("p",[e._v("Unzip the Ontop Protégé bundle (obtained by previously building Ontop source code), which contains Protégé preconfigured with the Ontop Protégé plugin")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ unzip protege/distribution/target/ontop-protege-bundle-platform-independent-[ontop-version].zip\n")])])]),o("p",[e._v("Notes:")]),e._v(" "),o("ul",[o("li",[e._v("for older versions of Ontop (before 5.0.0) the bundle to unzip is located either in "),o("code",[e._v("build/distribution/ontop-protege")]),e._v(" (up to 4.0.3) or in "),o("code",[e._v("build/distribution/target")]),e._v(" (up to 5.0.0 excluded);")]),e._v(" "),o("li",[e._v("you may also reuse a (platform independent) Protégé distribution obtained directly from Protégé web site and already installed locally. In this case make sure that the Protégé version matches the one used during Ontop build, that Protégé directory contains a "),o("code",[e._v("plugins")]),e._v(" sub-directory (create it if missing), and run the commands below to deploy the Ontop Protégé plugin (adapting paths accordingly).")])]),e._v(" "),o("h3",{attrs:{id:"subsequent-builds"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#subsequent-builds"}},[e._v("#")]),e._v(" Subsequent builds")]),e._v(" "),o("p",[o("strong",[e._v("Each time you modify the code, you need to recompile and build the Ontop distribution.")])]),e._v(" "),o("p",[e._v("The fastest command to re-compile the Ontop Protégé plugin and the code it depends on is")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ mvn clean package -Dmaven.test.skip -Passet-plugin -pl protege/distribution -am\n")])])]),o("p",[e._v("Where:")]),e._v(" "),o("ul",[o("li",[o("code",[e._v("clean package")]),e._v(" forces a full re-build and may be generally omitted (which defaults to running "),o("code",[e._v("package")]),e._v(") unless you encounter build errors, in which case "),o("code",[e._v("clean")]),e._v(" helps ruling out they stem from incremental builds;")]),e._v(" "),o("li",[o("code",[e._v("-Dmaven.test.skip")]),e._v(" disables compiling and executing unit tests;")]),e._v(" "),o("li",[o("code",[e._v("-Passet-plugin")]),e._v(" activates the generation of the Ontop Protégé plugin (OSGI bundle with all its dependencies), without including other uneeded artifacts (e.g., full ZIP/tar.gz Protégé bundles, source and Javadoc JARs, etc);")]),e._v(" "),o("li",[o("code",[e._v("-pl protege/distribution -am")]),e._v(" (optional) tells Maven to only build the Ontop Protégé module located in "),o("code",[e._v("protege/distribution")]),e._v(" and all the other Ontop modules it depends on, saving another couple of seconds.")])]),e._v(" "),o("p",[e._v("Notes:")]),e._v(" "),o("ul",[o("li",[e._v("in Ontop versions 4.1 to 5.0.0 excluded, the command above should be replaced by "),o("code",[e._v("mvn clean package -Dmaven.test.skip -Pprotege -pl client/protege -am")]),e._v(";")]),e._v(" "),o("li",[e._v("in Ontop version 4.0.3 or earlier, the command above should be replaced by "),o("code",[e._v("mvn clean install -pl client/protege -am -DskipTests")]),e._v(" to compile code and install it in local maven repository, followed by "),o("code",[e._v("mvn bundle:bundle -pl client/protege")]),e._v(" to package the plugin.")])]),e._v(" "),o("p",[e._v("Once the Ontop Protégé plugin is built, it must be copied to the Protégé plugin directory via")]),e._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("$ cp protege/distribution/target/it.unibz.inf.ontop.protege-[ontop-version].jar Protege-[protege-version]/plugins/\n")])])]),o("p",[e._v("The command above should replace any previous Ontop Protégé plugin in the "),o("code",[e._v("plugins")]),e._v(" directory. In any case, "),o("strong",[e._v("make sure that there is only one Protégé plugin in "),o("code",[e._v("Protege-[protege-version]/plugins/")])])]),e._v(" "),o("h2",{attrs:{id:"debug-in-intellij-using-the-remote-debugger"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#debug-in-intellij-using-the-remote-debugger"}},[e._v("#")]),e._v(" Debug in IntelliJ using the Remote debugger")]),e._v(" "),o("h3",{attrs:{id:"intellij-configuration"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#intellij-configuration"}},[e._v("#")]),e._v(" IntelliJ configuration")]),e._v(" "),o("p",[e._v("Create a remote configuration:")]),e._v(" "),o("ul",[o("li",[e._v("select 'Edit configurations', click '+', then select 'Remote'")]),e._v(" "),o("li",[e._v("Host: "),o("code",[e._v("localhost")])]),e._v(" "),o("li",[e._v("Port: choose a port number ("),o("code",[e._v("5005")]),e._v(" in what follows)")])]),e._v(" "),o("h3",{attrs:{id:"protege-run-options"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#protege-run-options"}},[e._v("#")]),e._v(" Protégé run options")]),e._v(" "),o("p",[e._v("Edit the script "),o("code",[e._v("Protege-[protege-version]/run.sh")]),e._v(" (on Windows: "),o("code",[e._v("run.bat")]),e._v("), adding the following JVM option (note that parameter "),o("code",[e._v("suspend")]),e._v(" is set to "),o("code",[e._v("y")]),e._v(")")]),e._v(" "),o("div",{staticClass:"language- extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[e._v("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005\n")])])]),o("h3",{attrs:{id:"run-debug"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#run-debug"}},[e._v("#")]),e._v(" Run / Debug")]),e._v(" "),o("p",[e._v("Execute "),o("code",[e._v("Protege-[protege-version]/run.sh")]),e._v(" (on Windows: "),o("code",[e._v("run.bat")]),e._v(").\nThen, from IntelliJ, click on the Debug button (or Shift+F9).")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/22.fea44003.js b/assets/js/22.00571580.js similarity index 96% rename from assets/js/22.fea44003.js rename to assets/js/22.00571580.js index ea100d099..6e344b2c6 100644 --- a/assets/js/22.fea44003.js +++ b/assets/js/22.00571580.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{401:function(e,t,o){"use strict";o.r(t);var r=o(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"git-workflow"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#git-workflow"}},[e._v("#")]),e._v(" Git workflow")]),e._v(" "),o("p",[e._v("In the development of Ontop project, we follow the "),o("code",[e._v("git-workflow")]),e._v(": "),o("a",{attrs:{href:"http://nvie.com/posts/a-successful-git-branching-model/",target:"_blank",rel:"noopener"}},[e._v("http://nvie.com/posts/a-successful-git-branching-model/"),o("OutboundLink")],1)]),e._v(" "),o("p",[e._v("A few points:")]),e._v(" "),o("ul",[o("li",[o("p",[e._v("Main development branch: "),o("code",[e._v("versionX")]),e._v(". Every commit in this branch is expected to be shipped with the next X.Y.Z release.")])]),e._v(" "),o("li",[o("p",[e._v("Names of the branches:")]),e._v(" "),o("ul",[o("li",[e._v("feature branches: "),o("code",[e._v("feature/featurename")])]),e._v(" "),o("li",[e._v("bug fix branches: "),o("code",[e._v("bugfix/bugname")]),e._v(".\n"),o("ul",[o("li",[e._v("If there a corresponding GitHub page, use name "),o("code",[e._v("bugfix/bugname-issue-number")]),e._v(" or "),o("code",[e._v("bugfix/issue-number")])])])]),e._v(" "),o("li",[e._v("Maintenance branches for releases: "),o("code",[e._v("releasing/vX.Y")]),e._v(" (e.g. "),o("code",[e._v("releasing/v5.0")]),e._v(")")])])]),e._v(" "),o("li",[o("p",[e._v("Use "),o("code",[e._v("--no-ff")]),e._v(" option for merging, especially for merging the feature or bugfix branches to "),o("code",[e._v("versionX")])])])]),e._v(" "),o("blockquote",[o("p",[e._v("The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature.")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{399:function(e,t,o){"use strict";o.r(t);var r=o(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"git-workflow"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#git-workflow"}},[e._v("#")]),e._v(" Git workflow")]),e._v(" "),o("p",[e._v("In the development of Ontop project, we follow the "),o("code",[e._v("git-workflow")]),e._v(": "),o("a",{attrs:{href:"http://nvie.com/posts/a-successful-git-branching-model/",target:"_blank",rel:"noopener"}},[e._v("http://nvie.com/posts/a-successful-git-branching-model/"),o("OutboundLink")],1)]),e._v(" "),o("p",[e._v("A few points:")]),e._v(" "),o("ul",[o("li",[o("p",[e._v("Main development branch: "),o("code",[e._v("versionX")]),e._v(". Every commit in this branch is expected to be shipped with the next X.Y.Z release.")])]),e._v(" "),o("li",[o("p",[e._v("Names of the branches:")]),e._v(" "),o("ul",[o("li",[e._v("feature branches: "),o("code",[e._v("feature/featurename")])]),e._v(" "),o("li",[e._v("bug fix branches: "),o("code",[e._v("bugfix/bugname")]),e._v(".\n"),o("ul",[o("li",[e._v("If there a corresponding GitHub page, use name "),o("code",[e._v("bugfix/bugname-issue-number")]),e._v(" or "),o("code",[e._v("bugfix/issue-number")])])])]),e._v(" "),o("li",[e._v("Maintenance branches for releases: "),o("code",[e._v("releasing/vX.Y")]),e._v(" (e.g. "),o("code",[e._v("releasing/v5.0")]),e._v(")")])])]),e._v(" "),o("li",[o("p",[e._v("Use "),o("code",[e._v("--no-ff")]),e._v(" option for merging, especially for merging the feature or bugfix branches to "),o("code",[e._v("versionX")])])])]),e._v(" "),o("blockquote",[o("p",[e._v("The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature.")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/23.fccfc77c.js b/assets/js/23.bfb85965.js similarity index 98% rename from assets/js/23.fccfc77c.js rename to assets/js/23.bfb85965.js index 189f42f54..6e14e7be3 100644 --- a/assets/js/23.fccfc77c.js +++ b/assets/js/23.bfb85965.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{399:function(t,e,n){"use strict";n.r(e);var a=n(51),i=Object(a.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"guice-conventions"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#guice-conventions"}},[t._v("#")]),t._v(" Guice Conventions")]),t._v(" "),n("p",[t._v("Each module contains a folder "),n("code",[t._v("src/main/java/")]),t._v(" and a module "),n("code",[t._v("it.unibz.inf.ontop.injection/filename.properties")]),t._v(" (e.g., "),n("code",[t._v("mapping-default.properties")]),t._v(").")]),t._v(" "),n("p",[t._v("The file specifies to which implementation each interface needs to be instantiated. For instance, "),n("code",[t._v("mapping-default.properties")]),t._v(" contains the following lines")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("##########################################\n# Default implementations\n##########################################\n\nit.unibz.inf.ontop.spec.OBDASpecificationExtractor = it.unibz.inf.ontop.spec.impl.DefaultOBDASpecificationExtractor\nit.unibz.inf.ontop.spec.mapping.transformer.MappingTransformer = it.unibz.inf.ontop.spec.mapping.transformer.impl.DefaultMappingTransformer\n...\n")])])]),n("p",[n("code",[t._v("DefaultOBDASpecificationExtractor")]),t._v(" is an implementation for the interface "),n("code",[t._v("OBDASpecificationExtractor")]),t._v(". The constructor, private, is injected, that is it has the "),n("code",[t._v("@Inject")]),t._v(" tag at its beginning.")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("@Inject\n private DefaultOBDASpecificationExtractor(MappingExtractor mappingExtractor, MappingTransformer mappingTransformer,\n OntopMappingSettings settings) {\n this.mappingExtractor = mappingExtractor;\n this.mappingTransformer = mappingTransformer;\n }\n}\n")])])]),n("p",[t._v("The "),n("code",[t._v("@Inject")]),t._v(" means that the arguments to the constructor will be provided by the injection mechanism. For instance, the constructor for the second parameter is:")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("@Inject\n private DefaultMappingTransformer(MappingVariableNameNormalizer mappingNormalizer,\n MappingSaturator mappingSaturator,\n ABoxFactIntoMappingConverter inserter,\n MappingMerger mappingMerger,\n OntopMappingSettings settings,\n MappingSameAsInverseRewriter sameAsInverseRewriter,\n SpecificationFactory specificationFactory,\n RDF rdfFactory,\n MappingDistinctTransformer mappingDistinctTransformer) {\n this.mappingNormalizer = mappingNormalizer;\n this.mappingSaturator = mappingSaturator;\n this.factConverter = inserter;\n this.mappingMerger = mappingMerger;\n this.settings = settings;\n this.sameAsInverseRewriter = sameAsInverseRewriter;\n this.specificationFactory = specificationFactory;\n this.rdfFactory = rdfFactory;\n this.mappingDistinctTransformer = mappingDistinctTransformer;\n }\n")])])]),n("p",[t._v("And a constructor, let's say, for "),n("code",[t._v("RDFFactory")]),t._v(" is")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("public class SimpleRDF implements RDF {\n\n public SimpleRDF() {\n }\n ...\n")])])]),n("p",[t._v("As you see, in the end we reach a constructor without parameters.")]),t._v(" "),n("p",[t._v("In "),n("code",[t._v("IntelliJ")]),t._v(", the name of the properties file binding a specific interface can also be retrieved through the "),n("code",[t._v("find usages")]),t._v(" functionality.")])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{401:function(t,e,n){"use strict";n.r(e);var a=n(51),i=Object(a.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"guice-conventions"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#guice-conventions"}},[t._v("#")]),t._v(" Guice Conventions")]),t._v(" "),n("p",[t._v("Each module contains a folder "),n("code",[t._v("src/main/java/")]),t._v(" and a module "),n("code",[t._v("it.unibz.inf.ontop.injection/filename.properties")]),t._v(" (e.g., "),n("code",[t._v("mapping-default.properties")]),t._v(").")]),t._v(" "),n("p",[t._v("The file specifies to which implementation each interface needs to be instantiated. For instance, "),n("code",[t._v("mapping-default.properties")]),t._v(" contains the following lines")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("##########################################\n# Default implementations\n##########################################\n\nit.unibz.inf.ontop.spec.OBDASpecificationExtractor = it.unibz.inf.ontop.spec.impl.DefaultOBDASpecificationExtractor\nit.unibz.inf.ontop.spec.mapping.transformer.MappingTransformer = it.unibz.inf.ontop.spec.mapping.transformer.impl.DefaultMappingTransformer\n...\n")])])]),n("p",[n("code",[t._v("DefaultOBDASpecificationExtractor")]),t._v(" is an implementation for the interface "),n("code",[t._v("OBDASpecificationExtractor")]),t._v(". The constructor, private, is injected, that is it has the "),n("code",[t._v("@Inject")]),t._v(" tag at its beginning.")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("@Inject\n private DefaultOBDASpecificationExtractor(MappingExtractor mappingExtractor, MappingTransformer mappingTransformer,\n OntopMappingSettings settings) {\n this.mappingExtractor = mappingExtractor;\n this.mappingTransformer = mappingTransformer;\n }\n}\n")])])]),n("p",[t._v("The "),n("code",[t._v("@Inject")]),t._v(" means that the arguments to the constructor will be provided by the injection mechanism. For instance, the constructor for the second parameter is:")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("@Inject\n private DefaultMappingTransformer(MappingVariableNameNormalizer mappingNormalizer,\n MappingSaturator mappingSaturator,\n ABoxFactIntoMappingConverter inserter,\n MappingMerger mappingMerger,\n OntopMappingSettings settings,\n MappingSameAsInverseRewriter sameAsInverseRewriter,\n SpecificationFactory specificationFactory,\n RDF rdfFactory,\n MappingDistinctTransformer mappingDistinctTransformer) {\n this.mappingNormalizer = mappingNormalizer;\n this.mappingSaturator = mappingSaturator;\n this.factConverter = inserter;\n this.mappingMerger = mappingMerger;\n this.settings = settings;\n this.sameAsInverseRewriter = sameAsInverseRewriter;\n this.specificationFactory = specificationFactory;\n this.rdfFactory = rdfFactory;\n this.mappingDistinctTransformer = mappingDistinctTransformer;\n }\n")])])]),n("p",[t._v("And a constructor, let's say, for "),n("code",[t._v("RDFFactory")]),t._v(" is")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("public class SimpleRDF implements RDF {\n\n public SimpleRDF() {\n }\n ...\n")])])]),n("p",[t._v("As you see, in the end we reach a constructor without parameters.")]),t._v(" "),n("p",[t._v("In "),n("code",[t._v("IntelliJ")]),t._v(", the name of the properties file binding a specific interface can also be retrieved through the "),n("code",[t._v("find usages")]),t._v(" functionality.")])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/27.edf57888.js b/assets/js/27.906526eb.js similarity index 95% rename from assets/js/27.edf57888.js rename to assets/js/27.906526eb.js index 092f26c68..c1a7d7e88 100644 --- a/assets/js/27.edf57888.js +++ b/assets/js/27.906526eb.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{405:function(t,s,a){"use strict";a.r(s);var e=a(51),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"statistics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#statistics"}},[t._v("#")]),t._v(" Statistics")]),t._v(" "),a("h2",{attrs:{id:"downloads"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#downloads"}},[t._v("#")]),t._v(" Downloads")]),t._v(" "),a("h3",{attrs:{id:"github-releases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#github-releases"}},[t._v("#")]),t._v(" Github releases")]),t._v(" "),a("p",[t._v("For all the versions 4.x:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Accept: application/vnd.github.v3+json"')]),t._v(" https://api.github.com/repos/ontop/ontop/releases "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" jq "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'[.[] | select((.tag_name | startswith(\"ontop-4.\"))) | .assets[] | .download_count ] | add'")]),t._v(" \n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{404:function(t,s,a){"use strict";a.r(s);var e=a(51),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"statistics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#statistics"}},[t._v("#")]),t._v(" Statistics")]),t._v(" "),a("h2",{attrs:{id:"downloads"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#downloads"}},[t._v("#")]),t._v(" Downloads")]),t._v(" "),a("h3",{attrs:{id:"github-releases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#github-releases"}},[t._v("#")]),t._v(" Github releases")]),t._v(" "),a("p",[t._v("For all the versions 4.x:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Accept: application/vnd.github.v3+json"')]),t._v(" https://api.github.com/repos/ontop/ontop/releases "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" jq "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'[.[] | select((.tag_name | startswith(\"ontop-4.\"))) | .assets[] | .download_count ] | add'")]),t._v(" \n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/28.2770c070.js b/assets/js/28.2770c070.js deleted file mode 100644 index cf225554c..000000000 --- a/assets/js/28.2770c070.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{404:function(e,a,t){"use strict";t.r(a);var r=t(51),n=Object(r.a)({},(function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("Ontop is a Virtual Knowledge Graph system.\nIt exposes the content of arbitrary relational databases as knowledge graphs. These graphs are virtual, which means that data remains in the data sources instead of being moved to another database.")]),e._v(" "),t("p",[e._v("Ontop translates "),t("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL queries"),t("OutboundLink")],1),e._v(" expressed over the knowledge graphs into SQL queries executed by the relational data sources. It relies on "),t("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML mappings"),t("OutboundLink")],1),e._v(" and can take advantage of lightweight ontologies.")]),e._v(" "),t("h2",{attrs:{id:"versions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#versions"}},[e._v("#")]),e._v(" Versions")]),e._v(" "),t("p",[e._v("This documentation is for Ontop 3.0 and more recent versions.")]),e._v(" "),t("p",[e._v("For earlier versions, please refer to "),t("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("our previous Wiki"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Most recent version:")]),e._v(" "),t("ul",[t("li",[e._v("Stable: Ontop 5.1.2, released on January 17, 2024.")])]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"/guide/releases"}},[e._v("release notes")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"main-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#main-features"}},[e._v("#")]),e._v(" Main features")]),e._v(" "),t("ul",[t("li",[e._v("Uses "),t("a",{attrs:{href:"/guide/compliance#rdf-1-1"}},[e._v("RDF 1.1")]),e._v(" as graph data model")]),e._v(" "),t("li",[e._v("Supports RDFS and OWL 2 QL ontologies")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#r2rml"}},[e._v("R2RML")]),e._v(" and Ontop mappings")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#sparql-1-1"}},[e._v("the majority of SPARQL 1.1 features")]),e._v(", including the main SPARQL aggregation functions (since 4.0.0) and "),t("a",{attrs:{href:"/guide/compliance#geosparql-1-0"}},[e._v("GeoSPARQL functions")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Can be deployed as "),t("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[e._v("a SPARQL endpoint")]),e._v(" and as "),t("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("a predefined query endpoint")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Produces efficient SQL queries by applying many optimizations")]),e._v(" "),t("li",[e._v("Supports the main database systems: "),t("a",{attrs:{href:"/guide/databases/postgres"}},[e._v("PostgreSQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mysql"}},[e._v("MySQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mariadb"}},[e._v("MariaDB")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/mssql"}},[e._v("SQL Server")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/oracle"}},[e._v("Oracle")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/db2"}},[e._v("DB2")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/snowflake"}},[e._v("Snowflake")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/databricks"}},[e._v("Databricks")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/bigquery"}},[e._v("Google BigQuery")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/redshift"}},[e._v("AWS Redshift")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/duckdb"}},[e._v("DuckDB")]),e._v(" (since 5.0.2), and "),t("a",{attrs:{href:"/guide/databases/dynamodb"}},[e._v("AWS DynamoDB")]),e._v(" (since 5.1.0)")]),e._v(" "),t("li",[e._v("Supports database federators such as "),t("a",{attrs:{href:"/guide/databases/denodo"}},[e._v("Denodo")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/dremio"}},[e._v("Dremio")]),e._v(" (since 4.1.0), Teiid (since 4.1.1), "),t("a",{attrs:{href:"/guide/databases/spark"}},[e._v("Apache Spark")]),e._v(" (since 4.2.0) and "),t("a",{attrs:{href:"/guide/databases/trino"}},[e._v("Trino")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/presto"}},[e._v("PrestoDB")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/athena"}},[e._v("AWS Athena")]),e._v(" (since 5.0.2)")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(' which are "virtual views" specified outside of the data sources (since 4.2.0)')]),e._v(" "),t("li",[e._v("Can "),t("a",{attrs:{href:"/guide/cli#ontop-materialize"}},[e._v("materialize")]),e._v(" virtual graphs into RDF files")]),e._v(" "),t("li",[e._v("Provides a plugin for editing and testing mappings in the "),t("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[e._v("Protégé ontology editor"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"organizations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#organizations"}},[e._v("#")]),e._v(" Organizations")]),e._v(" "),t("p",[e._v("Ontop is backed by the "),t("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[e._v("Free University of Bozen-Bolzano"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic s.r.l."),t("OutboundLink")],1),e._v(". It also receives regular important contributions from "),t("a",{attrs:{href:"https://www.uib.no",target:"_blank",rel:"noopener"}},[e._v("University of Bergen"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"http://www.bbk.ac.uk/",target:"_blank",rel:"noopener"}},[e._v("Birkbeck, University of London"),t("OutboundLink")],1),e._v(". See the "),t("a",{attrs:{href:"/community"}},[e._v("community section")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"licenses"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#licenses"}},[e._v("#")]),e._v(" Licenses")]),e._v(" "),t("p",[e._v("Ontop is available under the "),t("a",{attrs:{href:"https://www.apache.org/licenses/LICENSE-2.0",target:"_blank",rel:"noopener"}},[e._v("Apache 2.0"),t("OutboundLink")],1),e._v(" license.")]),e._v(" "),t("p",[e._v("All the documentation is licensed under the\n"),t("a",{attrs:{href:"http://creativecommons.org/licenses/by/4.0/",target:"_blank",rel:"noopener"}},[e._v("Creative Commons (Attribution)"),t("OutboundLink")],1),e._v("\nlicense.")]),e._v(" "),t("h2",{attrs:{id:"social"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#social"}},[e._v("#")]),e._v(" Social")]),e._v(" "),t("p",[e._v("You can find us on the following social platforms:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://twitter.com/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Twitter (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{rel:"me",href:"https://fosstodon.org/@ontop"}},[e._v("Mastodon (@ontop@fosstodon.org)")])]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.facebook.com/obdaontop/",target:"_blank",rel:"noopener"}},[e._v("Facebook (obdaontop)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://groups.google.com/forum/#!forum/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Google Group (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/ontop/ontop/",target:"_blank",rel:"noopener"}},[e._v("GitHub (ontop/ontop)"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"citations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#citations"}},[e._v("#")]),e._v(" Citations")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If you use Ontop in your work, please cite one of the following articles describing the system.")]),e._v(" "),t("ul",[t("li",[e._v("Guohui Xiao, Davide Lanti, Roman Kontchakov, Sarah Komla-Ebri, Elem Güzel-Kalayci, Linfang Ding, Julien Corman, Benjamin Cogrel, Diego Calvanese, and Elena Botoeva. "),t("a",{attrs:{href:"https://research.bcgl.fr/pdfs/ontop-iswc20.pdf",target:"_blank",rel:"noopener"}},[e._v("The Virtual Knowledge Graph System Ontop"),t("OutboundLink")],1),e._v(". In: International Semantic Web Conference (Resource Track), 2020.")]),e._v(" "),t("li",[e._v("Diego Calvanese, Benjamin Cogrel, Sarah Komla-Ebri, Roman Kontchakov, Davide Lanti, Martin Rezk, Mariano Rodriguez-Muro, and Guohui Xiao. "),t("a",{attrs:{href:"http://www.semantic-web-journal.net/content/ontop-answering-sparql-queries-over-relational-databases-1",target:"_blank",rel:"noopener"}},[e._v("Ontop: Answering SPARQL Queries over Relational Databases"),t("OutboundLink")],1),e._v(". In: Semantic Web Journal 8.3 (2017), pp. 471–487.")])])]),e._v(" "),t("li",[t("p",[e._v("If you want to cite the techniques behind Ontop, check "),t("a",{attrs:{href:"/research/publications"}},[e._v("our publications")]),e._v(".")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/28.b36f0407.js b/assets/js/28.b36f0407.js new file mode 100644 index 000000000..335767681 --- /dev/null +++ b/assets/js/28.b36f0407.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{405:function(e,a,t){"use strict";t.r(a);var r=t(51),n=Object(r.a)({},(function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("Ontop is a Virtual Knowledge Graph system.\nIt exposes the content of arbitrary relational databases as knowledge graphs. These graphs are virtual, which means that data remains in the data sources instead of being moved to another database.")]),e._v(" "),t("p",[e._v("Ontop translates "),t("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL queries"),t("OutboundLink")],1),e._v(" expressed over the knowledge graphs into SQL queries executed by the relational data sources. It relies on "),t("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML mappings"),t("OutboundLink")],1),e._v(" and can take advantage of lightweight ontologies.")]),e._v(" "),t("h2",{attrs:{id:"versions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#versions"}},[e._v("#")]),e._v(" Versions")]),e._v(" "),t("p",[e._v("This documentation is for Ontop 3.0 and more recent versions.")]),e._v(" "),t("p",[e._v("For earlier versions, please refer to "),t("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("our previous Wiki"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Most recent version:")]),e._v(" "),t("ul",[t("li",[e._v("Stable: Ontop 5.2.0, released on August 16, 2024.")])]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"/guide/releases"}},[e._v("release notes")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"main-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#main-features"}},[e._v("#")]),e._v(" Main features")]),e._v(" "),t("ul",[t("li",[e._v("Uses "),t("a",{attrs:{href:"/guide/compliance#rdf-1-1"}},[e._v("RDF 1.1")]),e._v(" as graph data model")]),e._v(" "),t("li",[e._v("Supports RDFS and OWL 2 QL ontologies")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#r2rml"}},[e._v("R2RML")]),e._v(" and Ontop mappings")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#sparql-1-1"}},[e._v("the majority of SPARQL 1.1 features")]),e._v(", including the main SPARQL aggregation functions (since 4.0.0) and "),t("a",{attrs:{href:"/guide/compliance#geosparql-1-0"}},[e._v("GeoSPARQL functions")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Can be deployed as "),t("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[e._v("a SPARQL endpoint")]),e._v(" and as "),t("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("a predefined query endpoint")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Produces efficient SQL queries by applying many optimizations")]),e._v(" "),t("li",[e._v("Supports the main database systems: "),t("a",{attrs:{href:"/guide/databases/postgres"}},[e._v("PostgreSQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mysql"}},[e._v("MySQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mariadb"}},[e._v("MariaDB")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/mssql"}},[e._v("SQL Server")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/oracle"}},[e._v("Oracle")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/db2"}},[e._v("DB2")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/snowflake"}},[e._v("Snowflake")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/databricks"}},[e._v("Databricks")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/bigquery"}},[e._v("Google BigQuery")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/redshift"}},[e._v("AWS Redshift")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/duckdb"}},[e._v("DuckDB")]),e._v(" (since 5.0.2), and "),t("a",{attrs:{href:"/guide/databases/dynamodb"}},[e._v("AWS DynamoDB")]),e._v(" (since 5.1.0)")]),e._v(" "),t("li",[e._v("Supports database federators such as "),t("a",{attrs:{href:"/guide/databases/denodo"}},[e._v("Denodo")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/dremio"}},[e._v("Dremio")]),e._v(" (since 4.1.0), Teiid (since 4.1.1), "),t("a",{attrs:{href:"/guide/databases/spark"}},[e._v("Apache Spark")]),e._v(" (since 4.2.0) and "),t("a",{attrs:{href:"/guide/databases/trino"}},[e._v("Trino")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/presto"}},[e._v("PrestoDB")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/athena"}},[e._v("AWS Athena")]),e._v(" (since 5.0.2)")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(' which are "virtual views" specified outside of the data sources (since 4.2.0)')]),e._v(" "),t("li",[e._v("Can "),t("a",{attrs:{href:"/guide/cli#ontop-materialize"}},[e._v("materialize")]),e._v(" virtual graphs into RDF files")]),e._v(" "),t("li",[e._v("Provides a plugin for editing and testing mappings in the "),t("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[e._v("Protégé ontology editor"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"organizations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#organizations"}},[e._v("#")]),e._v(" Organizations")]),e._v(" "),t("p",[e._v("Ontop is backed by the "),t("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[e._v("Free University of Bozen-Bolzano"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic s.r.l."),t("OutboundLink")],1),e._v(". It also receives regular important contributions from "),t("a",{attrs:{href:"https://www.uib.no",target:"_blank",rel:"noopener"}},[e._v("University of Bergen"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"http://www.bbk.ac.uk/",target:"_blank",rel:"noopener"}},[e._v("Birkbeck, University of London"),t("OutboundLink")],1),e._v(". See the "),t("a",{attrs:{href:"/community"}},[e._v("community section")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"licenses"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#licenses"}},[e._v("#")]),e._v(" Licenses")]),e._v(" "),t("p",[e._v("Ontop is available under the "),t("a",{attrs:{href:"https://www.apache.org/licenses/LICENSE-2.0",target:"_blank",rel:"noopener"}},[e._v("Apache 2.0"),t("OutboundLink")],1),e._v(" license.")]),e._v(" "),t("p",[e._v("All the documentation is licensed under the\n"),t("a",{attrs:{href:"http://creativecommons.org/licenses/by/4.0/",target:"_blank",rel:"noopener"}},[e._v("Creative Commons (Attribution)"),t("OutboundLink")],1),e._v("\nlicense.")]),e._v(" "),t("h2",{attrs:{id:"social"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#social"}},[e._v("#")]),e._v(" Social")]),e._v(" "),t("p",[e._v("You can find us on the following social platforms:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://twitter.com/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Twitter (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{rel:"me",href:"https://fosstodon.org/@ontop"}},[e._v("Mastodon (@ontop@fosstodon.org)")])]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.facebook.com/obdaontop/",target:"_blank",rel:"noopener"}},[e._v("Facebook (obdaontop)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://groups.google.com/forum/#!forum/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Google Group (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/ontop/ontop/",target:"_blank",rel:"noopener"}},[e._v("GitHub (ontop/ontop)"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"citations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#citations"}},[e._v("#")]),e._v(" Citations")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If you use Ontop in your work, please cite one of the following articles describing the system.")]),e._v(" "),t("ul",[t("li",[e._v("Guohui Xiao, Davide Lanti, Roman Kontchakov, Sarah Komla-Ebri, Elem Güzel-Kalayci, Linfang Ding, Julien Corman, Benjamin Cogrel, Diego Calvanese, and Elena Botoeva. "),t("a",{attrs:{href:"https://research.bcgl.fr/pdfs/ontop-iswc20.pdf",target:"_blank",rel:"noopener"}},[e._v("The Virtual Knowledge Graph System Ontop"),t("OutboundLink")],1),e._v(". In: International Semantic Web Conference (Resource Track), 2020.")]),e._v(" "),t("li",[e._v("Diego Calvanese, Benjamin Cogrel, Sarah Komla-Ebri, Roman Kontchakov, Davide Lanti, Martin Rezk, Mariano Rodriguez-Muro, and Guohui Xiao. "),t("a",{attrs:{href:"http://www.semantic-web-journal.net/content/ontop-answering-sparql-queries-over-relational-databases-1",target:"_blank",rel:"noopener"}},[e._v("Ontop: Answering SPARQL Queries over Relational Databases"),t("OutboundLink")],1),e._v(". In: Semantic Web Journal 8.3 (2017), pp. 471–487.")])])]),e._v(" "),t("li",[t("p",[e._v("If you want to cite the techniques behind Ontop, check "),t("a",{attrs:{href:"/research/publications"}},[e._v("our publications")]),e._v(".")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/35.55d431a6.js b/assets/js/35.9e166cc5.js similarity index 99% rename from assets/js/35.55d431a6.js rename to assets/js/35.9e166cc5.js index c491161c4..91ae7d35f 100644 --- a/assets/js/35.55d431a6.js +++ b/assets/js/35.9e166cc5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{413:function(e,t,o){"use strict";o.r(t);var v=o(51),_=Object(v.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"standards-compliance"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#standards-compliance"}},[e._v("#")]),e._v(" Standards compliance")]),e._v(" "),o("h2",{attrs:{id:"sparql-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#sparql-1-1"}},[e._v("#")]),e._v(" SPARQL 1.1")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("In the following table we present a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL 1.1"),o("OutboundLink")],1),e._v(", where rows correspond to sections of the W3C recommendation and unsupported features are "),o("s",[e._v("crossed out")]),e._v(". Most of the features are supported, but some are unsupported or only partially supported.")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in "),o("br"),e._v("SPARQL 1.1")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#GroupPatterns",target:"_blank",rel:"noopener"}},[e._v("5. Graph Patterns"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BGP")]),e._v(", "),o("code",[e._v("FILTER")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#optionals",target:"_blank",rel:"noopener"}},[e._v("6. Including Optional Values"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("OPTIONAL")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#alternatives",target:"_blank",rel:"noopener"}},[e._v("7. Matching Alternatives"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("UNION")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#negation",target:"_blank",rel:"noopener"}},[e._v("8. Negation"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MINUS")]),e._v(", "),o("code",[o("s",[e._v("FILTER [NOT] EXISTS")])])]),e._v(" "),o("td",[e._v("1/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#propertypaths",target:"_blank",rel:"noopener"}},[e._v("9. Property Paths"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("PredicatePath")]),e._v(", "),o("s",[e._v("InversePath")]),e._v(", "),o("s",[e._v("ZeroOrMorePath")]),e._v(", ...")]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#assignment",target:"_blank",rel:"noopener"}},[e._v("10. Assignment"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BIND")]),e._v(", "),o("code",[e._v("VALUES")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#aggregates",target:"_blank",rel:"noopener"}},[e._v("11. Aggregates"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("COUNT")]),e._v(", "),o("code",[e._v("SUM")]),e._v(", "),o("code",[e._v("MIN")]),e._v(", "),o("code",[e._v("MAX")]),e._v(", "),o("code",[e._v("AVG")]),e._v(", "),o("code",[e._v("GROUP_CONCAT")]),e._v(", "),o("code",[e._v("SAMPLE")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#subqueries",target:"_blank",rel:"noopener"}},[e._v("12. Subqueries"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Subqueries")]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#rdfDataset",target:"_blank",rel:"noopener"}},[e._v("13. RDF Dataset"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("GRAPH")]),e._v(", "),o("code",[e._v("FROM [NAMED]")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-federated-query/",target:"_blank",rel:"noopener"}},[e._v("14. Basic Federated Query"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[o("s",[e._v("SERVICE")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#solutionModifiers",target:"_blank",rel:"noopener"}},[e._v("15. Solution Seqs. & Mods."),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("ORDER BY")]),e._v(", "),o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("DISTINCT")]),e._v(", "),o("code",[e._v("REDUCED")]),e._v(", "),o("code",[e._v("OFFSET")]),e._v(", "),o("code",[e._v("LIMIT")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#QueryForms",target:"_blank",rel:"noopener"}},[e._v("16. Query Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("CONSTRUCT")]),e._v(", "),o("code",[e._v("ASK")]),e._v(", "),o("code",[e._v("DESCRIBE")])]),e._v(" "),o("td",[e._v("4/4")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-forms",target:"_blank",rel:"noopener"}},[e._v("17.4.1. Functional Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BOUND")]),e._v(", "),o("code",[e._v("IF")]),e._v(", "),o("code",[e._v("COALESCE")]),e._v(", "),o("code",[o("s",[e._v("EXISTS")])]),e._v(", "),o("code",[o("s",[e._v("NOT EXISTS")])]),e._v(", "),o("code",[e._v("||")]),e._v(" , "),o("code",[e._v("&&")]),e._v(", "),o("code",[e._v("=")]),e._v(", "),o("code",[e._v("sameTerm")]),e._v(", "),o("code",[e._v("IN")]),e._v(", "),o("code",[e._v("NOT IN")])]),e._v(" "),o("td",[e._v("9/11")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-rdfTerms",target:"_blank",rel:"noopener"}},[e._v("17.4.2. Functions on RDF Terms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("isIRI")]),e._v(", "),o("code",[e._v("isBlank")]),e._v(", "),o("code",[e._v("isLiteral")]),e._v(", "),o("code",[e._v("isNumeric")]),e._v(", "),o("code",[e._v("str")]),e._v(", "),o("code",[e._v("lang")]),e._v(", "),o("code",[e._v("datatype")]),e._v(", "),o("code",[e._v("IRI")]),e._v(", "),o("code",[e._v("BNODE")]),e._v(", "),o("code",[o("s",[e._v("STRDT")])]),e._v(", "),o("code",[o("s",[e._v("STRLANG")])]),e._v(", "),o("code",[e._v("UUID")]),e._v(", "),o("code",[e._v("STRUUID")])]),e._v(" "),o("td",[e._v("11/13")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-strings",target:"_blank",rel:"noopener"}},[e._v("17.4.3. Functions on Strings"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("STRLEN")]),e._v(", "),o("code",[e._v("SUBSTR")]),e._v(", "),o("code",[e._v("UCASE")]),e._v(", "),o("code",[e._v("LCASE")]),e._v(", "),o("code",[e._v("STRSTARTS")]),e._v(", "),o("code",[e._v("STRENDS")]),e._v(", "),o("code",[e._v("CONTAINS")]),e._v(", "),o("code",[e._v("STRBEFORE")]),e._v(", "),o("code",[e._v("STRAFTER")]),e._v(", "),o("code",[e._v("ENCODE_FOR_URI")]),e._v(", "),o("code",[e._v("CONCAT")]),e._v(", "),o("code",[e._v("langMatches")]),e._v(", "),o("code",[e._v("REGEX")]),e._v(", "),o("code",[e._v("REPLACE")])]),e._v(" "),o("td",[e._v("14/14")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-numerics",target:"_blank",rel:"noopener"}},[e._v("17.4.4. Functions on Numerics"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("abs")]),e._v(", "),o("code",[e._v("round")]),e._v(", "),o("code",[e._v("ceil")]),e._v(", "),o("code",[e._v("floor")]),e._v(", "),o("code",[e._v("RAND")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-date-time",target:"_blank",rel:"noopener"}},[e._v("17.4.5. Functions on Dates&Times"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("now")]),e._v(", "),o("code",[e._v("year")]),e._v(", "),o("code",[e._v("month")]),e._v(", "),o("code",[e._v("day")]),e._v(", "),o("code",[e._v("hours")]),e._v(", "),o("code",[e._v("minutes")]),e._v(", "),o("code",[e._v("seconds")]),e._v(", "),o("code",[o("s",[e._v("timezone")])]),e._v(", "),o("code",[e._v("tz")])]),e._v(" "),o("td",[e._v("8/9")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-hash",target:"_blank",rel:"noopener"}},[e._v("17.4.6. Hash Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MD5")]),e._v(", "),o("code",[e._v("SHA1")]),e._v(", "),o("code",[e._v("SHA256")]),e._v(", "),o("code",[e._v("SHA384")]),e._v(", "),o("code",[e._v("SHA512")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#FunctionMapping",target:"_blank",rel:"noopener"}},[e._v("17.5 XPath Constructor Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Casting")]),e._v(" "),o("td",[e._v("-")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#extensionFunctions",target:"_blank",rel:"noopener"}},[e._v("17.6 Extensible Value Testing"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("user defined functions")])]),e._v(" "),o("td",[e._v("0")])])])]),e._v(" "),o("h3",{attrs:{id:"limitations"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#limitations"}},[e._v("#")]),e._v(" Limitations")]),e._v(" "),o("ul",[o("li",[e._v("The 5 hash functions and functions "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" for regular expressions have limited support because they heavily depend on the DBMS: not all DBMSs provide all hash functions, and many DBMSs have their own regex dialects. Currently, the SPARQL regular expressions of "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" are simply sent to the DBMS by default.")]),e._v(" "),o("li",[e._v("In the implementation of function "),o("code",[e._v("langMatches")]),e._v(", the second argument has to a be a constant: allowing variables will have a negative impact on the performance in our framework.")])]),e._v(" "),o("h2",{attrs:{id:"geosparql-1-0"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#geosparql-1-0"}},[e._v("#")]),e._v(" GeoSPARQL 1.0")]),e._v(" "),o("p",[o("em",[e._v("Starting from 4.1.0.")])]),e._v(" "),o("p",[e._v("The following table provides a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.ogc.org/standards/geosparql",target:"_blank",rel:"noopener"}},[e._v("OGC GeoSPARQL 1.0"),o("OutboundLink")],1),e._v(", the standard for representing and querying geospatial linked data. The summary focuses only on the main geospatial functions and properties and unsupported features are "),o("s",[e._v("crossed out")]),e._v(".")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in OGC GeoSPARQL 1.0")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[e._v("7. Topology Vocabulary Extensions - Properties")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:sfEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfIntersects")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfTouches")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfCrosses")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfWithin")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfOverlaps")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehMeet")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehOverlap")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCovers")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCoveredBy")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehInside")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8eq")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8dc")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ec")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8po")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tppi")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntppi")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.4. Standard Properties for Geo:Geometry")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:dimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:coordinateDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:spatialDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:isEmpty")])]),e._v(", "),o("code",[o("s",[e._v("geo:isSimple")])]),e._v(", "),o("code",[o("s",[e._v("geo:hasSerialization")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.5. WKT Serialization")]),e._v(" "),o("td",[o("code",[e._v("geo:wktLiteral")]),e._v(", "),o("code",[e._v("geo:asWKT")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[e._v("8.6. GML Serialization")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:gmlLiteral")])]),e._v(", "),o("code",[o("s",[e._v("geo:asGML")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.7. Non-Topological Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:distance")]),e._v(", "),o("code",[e._v("geof:buffer")]),e._v(", "),o("code",[e._v("geof:convexHull")]),e._v(" , "),o("code",[e._v("geof:intersection")]),e._v(", "),o("code",[e._v("geof:union")]),e._v(", "),o("code",[e._v("geof:difference")]),e._v(" "),o("code",[e._v("geof:symDifference")]),e._v(", "),o("code",[e._v("geof:envelope")]),e._v(", "),o("code",[e._v("geof:boundary")]),e._v(", "),o("code",[e._v("geof:getSRID")]),e._v(",")]),e._v(" "),o("td",[e._v("10/10")])]),e._v(" "),o("tr",[o("td",[e._v("9.2. Common Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:relate")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[e._v("9.3. Topological Simple Features Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:sfEquals")]),e._v(", "),o("code",[e._v("geof:sfDisjoint")]),e._v(", "),o("code",[e._v("geof:sfIntersects")]),e._v(", "),o("code",[e._v("geof:sfTouches")]),e._v(", "),o("code",[e._v("geof:sfCrosses")]),e._v(", "),o("code",[e._v("geof:sfWithin")]),e._v(", "),o("code",[e._v("geof:sfContains")]),e._v(", "),o("code",[e._v("geof:sfOverlaps")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.4. Topological Egenhofer Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:ehEquals")]),e._v(", "),o("code",[e._v("geof:ehDisjoint")]),e._v(", "),o("code",[e._v("geof:ehMeet")]),e._v(", "),o("code",[e._v("geof:ehOverlap")]),e._v(", "),o("code",[e._v("geof:ehCovers")]),e._v(", "),o("code",[e._v("geof:ehCoveredBy")]),e._v(", "),o("code",[e._v("geof:ehInside")]),e._v(", "),o("code",[e._v("geof:ehContains")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.5. Topological RCC8 Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:rcc8eq")]),e._v(", "),o("code",[e._v("geof:rcc8dc")]),e._v(", "),o("code",[e._v("geof:rcc8ec")]),e._v(", "),o("code",[e._v("geof:rcc8po")]),e._v(", "),o("code",[e._v("geof:rcc8tppi")]),e._v(", "),o("code",[e._v("geof:rcc8tpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntppi")])]),e._v(" "),o("td",[e._v("8/8")])])])]),e._v(" "),o("p",[e._v("Several non-topological query functions use a unit of measure URI which OGC defines under a specific namespace e.g. "),o("code",[e._v("")]),e._v(". The latest version of Ontop currently supports the units metre, radian and degree.")]),e._v(" "),o("h2",{attrs:{id:"r2rml"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[e._v("#")]),e._v(" R2RML")]),e._v(" "),o("p",[o("em",[e._v("Updated for 4.2.0")])]),e._v(" "),o("p",[e._v("The latest version of Ontop is almost fully compliant with the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml",target:"_blank",rel:"noopener"}},[e._v("R2RML"),o("OutboundLink")],1),e._v(" standard.")]),e._v(" "),o("p",[e._v("At the moment, it does NOT support:")]),e._v(" "),o("ul",[o("li",[e._v("Base IRIs")]),e._v(" "),o("li",[o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#default-mappings",target:"_blank",rel:"noopener"}},[e._v("R2RML default mapping"),o("OutboundLink")],1),e._v(" generation")]),e._v(" "),o("li",[e._v("Normalization of binary SQL datatypes")])]),e._v(" "),o("p",[e._v("For complex SQL queries (e.g. with a "),o("code",[e._v("GROUP BY")]),e._v(") in the mapping, Ontop may not be able to infer the datatype of each column if the option "),o("a",{attrs:{href:"/guide/advanced/configuration"}},[o("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(" is not enabled (disabled by default). In such a situation, it may not be able to derive the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#natural-mapping",target:"_blank",rel:"noopener"}},[e._v("natural RDF datatype"),o("OutboundLink")],1),e._v(" of a literal built over a column and may not apply the expected normalization. This can be partially mitigated by expliciting the RDF datatype in the mapping, but normalization would remain unapplied.")]),e._v(" "),o("h2",{attrs:{id:"rdf-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdf-1-1"}},[e._v("#")]),e._v(" RDF 1.1")]),e._v(" "),o("p",[e._v("Ontop complies with "),o("a",{attrs:{href:"https://www.w3.org/TR/rdf11-new/",target:"_blank",rel:"noopener"}},[e._v("RDF 1.1"),o("OutboundLink")],1),e._v(". It types simple literals (from RDF 1.0) as "),o("code",[e._v("xsd:string")]),e._v(" and literals with a language tag as "),o("code",[e._v("rdf:langString")]),e._v(".")]),e._v(" "),o("h2",{attrs:{id:"owl-2-ql"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#owl-2-ql"}},[e._v("#")]),e._v(" OWL 2 QL")]),e._v(" "),o("h2",{attrs:{id:"rdfs"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[e._v("#")]),e._v(" RDFS")]),e._v(" "),o("h2",{attrs:{id:"time-functions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#time-functions"}},[e._v("#")]),e._v(" Time functions")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("ofn")]),e._v(" ("),o("code",[e._v("http://www.ontotext.com/sparql/functions/")]),e._v(") and their documentation can be found "),o("a",{attrs:{href:"https://graphdb.ontotext.com/documentation/10.6/sparql-ext-functions-reference.html#date-and-time-function-extensions",target:"_blank",rel:"noopener"}},[e._v("here"),o("OutboundLink")],1),e._v(". They accept both "),o("code",[e._v("xsd:date")]),e._v(" and "),o("code",[e._v("xsd:dateTime")]),e._v(" as arguments. ("),o("em",[e._v("supported since 4.2.0")]),e._v(").")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("obdaf")]),e._v(" ("),o("code",[e._v("https://w3id.org/obda/functions#")]),e._v(") have been introduced in 5.1.0 (see "),o("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),o("OutboundLink")],1),e._v(").")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Function")])]),e._v(" "),o("th",[e._v("Argument 1")]),e._v(" "),o("th",[e._v("Argument 2")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:hoursBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:minutesBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:secondsBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:millisBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:dateTrunc")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:string")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:milliseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:microseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:week-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:quarter-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:decade-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:century-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:millenium-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")])])]),e._v(" "),o("p",[e._v("Combinations of argument datatypes marked with the symbol * are not supported for queries over the following data sources: Oracle and Microsoft SQL Server.")]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:[datePart]-from-dateTime")]),e._v(" functions are supported for all dialects. They can be used to extract a specific part of the provided "),o("code",[e._v("dateTime")]),e._v(" value in a numeric format ("),o("code",[e._v("xsd:decimal")]),e._v(" for "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(", "),o("code",[e._v("xsd:integer")]),e._v(" for the remaining functions).")]),e._v(" "),o("div",{staticClass:"custom-block tip"},[o("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),o("p",[e._v("The function "),o("code",[e._v("obdaf:week-from-dateTime")]),e._v(" returns the ISO week index of the given date, where week 1 is considered the first week with a majority of its days in January.")])]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:dateTrunc")]),e._v(" function can be used to truncate a given "),o("code",[e._v("xsd:dateTime")]),e._v(" to a new value with specified granularity. The granularity must be provided as an "),o("code",[e._v("xsd:string")]),e._v(" "),o("strong",[e._v("literal")]),e._v(". The following granularity values are supported:")]),e._v(" "),o("ul",[o("li",[o("code",[e._v("microsecond")])]),e._v(" "),o("li",[o("code",[e._v("millisecond")])]),e._v(" "),o("li",[o("code",[e._v("second")])]),e._v(" "),o("li",[o("code",[e._v("minute")])]),e._v(" "),o("li",[o("code",[e._v("hour")])]),e._v(" "),o("li",[o("code",[e._v("day")])]),e._v(" "),o("li",[o("code",[e._v("week")])]),e._v(" "),o("li",[o("code",[e._v("month")])]),e._v(" "),o("li",[o("code",[e._v("quarter")])]),e._v(" "),o("li",[o("code",[e._v("year")])]),e._v(" "),o("li",[o("code",[e._v("decade")])]),e._v(" "),o("li",[o("code",[e._v("century")])]),e._v(" "),o("li",[o("code",[e._v("millennium")])])]),e._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),o("p",[e._v("Not all database systems support all granularities equally.")]),e._v(" "),o("p",[o("code",[e._v("decade")]),e._v(", "),o("code",[e._v("century")]),e._v(", and "),o("code",[e._v("millennium")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MySQL ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MariaDB ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("SQLServer")]),e._v(" "),o("li",[e._v("Snowflake")]),e._v(" "),o("li",[e._v("Spark")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[o("code",[e._v("second")]),e._v(" is not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("Denodo")])]),e._v(" "),o("p",[o("code",[e._v("millisecond")]),e._v(" and "),o("code",[e._v("microsecond")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo")]),e._v(" "),o("li",[e._v("MySQL")]),e._v(" "),o("li",[e._v("MariaDB")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[e._v("PostgreSQL requires these granularities to be named "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(" instead.")])]),e._v(" "),o("h3",{attrs:{id:"examples"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[e._v("#")]),e._v(" Examples")]),e._v(" "),o("p",[o("code",[e._v('obdaf:year("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:hour("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"9"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:dateTrunc("2023-08-16T09:00:00"^^xsd:dateTime, "month"^^xsd:string)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023-08-01T00:00:00"^^xsd:dateTime')])],1)])}),[],!1,null,null,null);t.default=_.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{412:function(e,t,o){"use strict";o.r(t);var v=o(51),_=Object(v.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"standards-compliance"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#standards-compliance"}},[e._v("#")]),e._v(" Standards compliance")]),e._v(" "),o("h2",{attrs:{id:"sparql-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#sparql-1-1"}},[e._v("#")]),e._v(" SPARQL 1.1")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("In the following table we present a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL 1.1"),o("OutboundLink")],1),e._v(", where rows correspond to sections of the W3C recommendation and unsupported features are "),o("s",[e._v("crossed out")]),e._v(". Most of the features are supported, but some are unsupported or only partially supported.")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in "),o("br"),e._v("SPARQL 1.1")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#GroupPatterns",target:"_blank",rel:"noopener"}},[e._v("5. Graph Patterns"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BGP")]),e._v(", "),o("code",[e._v("FILTER")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#optionals",target:"_blank",rel:"noopener"}},[e._v("6. Including Optional Values"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("OPTIONAL")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#alternatives",target:"_blank",rel:"noopener"}},[e._v("7. Matching Alternatives"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("UNION")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#negation",target:"_blank",rel:"noopener"}},[e._v("8. Negation"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MINUS")]),e._v(", "),o("code",[o("s",[e._v("FILTER [NOT] EXISTS")])])]),e._v(" "),o("td",[e._v("1/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#propertypaths",target:"_blank",rel:"noopener"}},[e._v("9. Property Paths"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("PredicatePath")]),e._v(", "),o("s",[e._v("InversePath")]),e._v(", "),o("s",[e._v("ZeroOrMorePath")]),e._v(", ...")]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#assignment",target:"_blank",rel:"noopener"}},[e._v("10. Assignment"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BIND")]),e._v(", "),o("code",[e._v("VALUES")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#aggregates",target:"_blank",rel:"noopener"}},[e._v("11. Aggregates"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("COUNT")]),e._v(", "),o("code",[e._v("SUM")]),e._v(", "),o("code",[e._v("MIN")]),e._v(", "),o("code",[e._v("MAX")]),e._v(", "),o("code",[e._v("AVG")]),e._v(", "),o("code",[e._v("GROUP_CONCAT")]),e._v(", "),o("code",[e._v("SAMPLE")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#subqueries",target:"_blank",rel:"noopener"}},[e._v("12. Subqueries"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Subqueries")]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#rdfDataset",target:"_blank",rel:"noopener"}},[e._v("13. RDF Dataset"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("GRAPH")]),e._v(", "),o("code",[e._v("FROM [NAMED]")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-federated-query/",target:"_blank",rel:"noopener"}},[e._v("14. Basic Federated Query"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[o("s",[e._v("SERVICE")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#solutionModifiers",target:"_blank",rel:"noopener"}},[e._v("15. Solution Seqs. & Mods."),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("ORDER BY")]),e._v(", "),o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("DISTINCT")]),e._v(", "),o("code",[e._v("REDUCED")]),e._v(", "),o("code",[e._v("OFFSET")]),e._v(", "),o("code",[e._v("LIMIT")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#QueryForms",target:"_blank",rel:"noopener"}},[e._v("16. Query Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("CONSTRUCT")]),e._v(", "),o("code",[e._v("ASK")]),e._v(", "),o("code",[e._v("DESCRIBE")])]),e._v(" "),o("td",[e._v("4/4")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-forms",target:"_blank",rel:"noopener"}},[e._v("17.4.1. Functional Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BOUND")]),e._v(", "),o("code",[e._v("IF")]),e._v(", "),o("code",[e._v("COALESCE")]),e._v(", "),o("code",[o("s",[e._v("EXISTS")])]),e._v(", "),o("code",[o("s",[e._v("NOT EXISTS")])]),e._v(", "),o("code",[e._v("||")]),e._v(" , "),o("code",[e._v("&&")]),e._v(", "),o("code",[e._v("=")]),e._v(", "),o("code",[e._v("sameTerm")]),e._v(", "),o("code",[e._v("IN")]),e._v(", "),o("code",[e._v("NOT IN")])]),e._v(" "),o("td",[e._v("9/11")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-rdfTerms",target:"_blank",rel:"noopener"}},[e._v("17.4.2. Functions on RDF Terms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("isIRI")]),e._v(", "),o("code",[e._v("isBlank")]),e._v(", "),o("code",[e._v("isLiteral")]),e._v(", "),o("code",[e._v("isNumeric")]),e._v(", "),o("code",[e._v("str")]),e._v(", "),o("code",[e._v("lang")]),e._v(", "),o("code",[e._v("datatype")]),e._v(", "),o("code",[e._v("IRI")]),e._v(", "),o("code",[e._v("BNODE")]),e._v(", "),o("code",[o("s",[e._v("STRDT")])]),e._v(", "),o("code",[o("s",[e._v("STRLANG")])]),e._v(", "),o("code",[e._v("UUID")]),e._v(", "),o("code",[e._v("STRUUID")])]),e._v(" "),o("td",[e._v("11/13")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-strings",target:"_blank",rel:"noopener"}},[e._v("17.4.3. Functions on Strings"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("STRLEN")]),e._v(", "),o("code",[e._v("SUBSTR")]),e._v(", "),o("code",[e._v("UCASE")]),e._v(", "),o("code",[e._v("LCASE")]),e._v(", "),o("code",[e._v("STRSTARTS")]),e._v(", "),o("code",[e._v("STRENDS")]),e._v(", "),o("code",[e._v("CONTAINS")]),e._v(", "),o("code",[e._v("STRBEFORE")]),e._v(", "),o("code",[e._v("STRAFTER")]),e._v(", "),o("code",[e._v("ENCODE_FOR_URI")]),e._v(", "),o("code",[e._v("CONCAT")]),e._v(", "),o("code",[e._v("langMatches")]),e._v(", "),o("code",[e._v("REGEX")]),e._v(", "),o("code",[e._v("REPLACE")])]),e._v(" "),o("td",[e._v("14/14")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-numerics",target:"_blank",rel:"noopener"}},[e._v("17.4.4. Functions on Numerics"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("abs")]),e._v(", "),o("code",[e._v("round")]),e._v(", "),o("code",[e._v("ceil")]),e._v(", "),o("code",[e._v("floor")]),e._v(", "),o("code",[e._v("RAND")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-date-time",target:"_blank",rel:"noopener"}},[e._v("17.4.5. Functions on Dates&Times"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("now")]),e._v(", "),o("code",[e._v("year")]),e._v(", "),o("code",[e._v("month")]),e._v(", "),o("code",[e._v("day")]),e._v(", "),o("code",[e._v("hours")]),e._v(", "),o("code",[e._v("minutes")]),e._v(", "),o("code",[e._v("seconds")]),e._v(", "),o("code",[o("s",[e._v("timezone")])]),e._v(", "),o("code",[e._v("tz")])]),e._v(" "),o("td",[e._v("8/9")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-hash",target:"_blank",rel:"noopener"}},[e._v("17.4.6. Hash Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MD5")]),e._v(", "),o("code",[e._v("SHA1")]),e._v(", "),o("code",[e._v("SHA256")]),e._v(", "),o("code",[e._v("SHA384")]),e._v(", "),o("code",[e._v("SHA512")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#FunctionMapping",target:"_blank",rel:"noopener"}},[e._v("17.5 XPath Constructor Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Casting")]),e._v(" "),o("td",[e._v("-")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#extensionFunctions",target:"_blank",rel:"noopener"}},[e._v("17.6 Extensible Value Testing"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("user defined functions")])]),e._v(" "),o("td",[e._v("0")])])])]),e._v(" "),o("h3",{attrs:{id:"limitations"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#limitations"}},[e._v("#")]),e._v(" Limitations")]),e._v(" "),o("ul",[o("li",[e._v("The 5 hash functions and functions "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" for regular expressions have limited support because they heavily depend on the DBMS: not all DBMSs provide all hash functions, and many DBMSs have their own regex dialects. Currently, the SPARQL regular expressions of "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" are simply sent to the DBMS by default.")]),e._v(" "),o("li",[e._v("In the implementation of function "),o("code",[e._v("langMatches")]),e._v(", the second argument has to a be a constant: allowing variables will have a negative impact on the performance in our framework.")])]),e._v(" "),o("h2",{attrs:{id:"geosparql-1-0"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#geosparql-1-0"}},[e._v("#")]),e._v(" GeoSPARQL 1.0")]),e._v(" "),o("p",[o("em",[e._v("Starting from 4.1.0.")])]),e._v(" "),o("p",[e._v("The following table provides a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.ogc.org/standards/geosparql",target:"_blank",rel:"noopener"}},[e._v("OGC GeoSPARQL 1.0"),o("OutboundLink")],1),e._v(", the standard for representing and querying geospatial linked data. The summary focuses only on the main geospatial functions and properties and unsupported features are "),o("s",[e._v("crossed out")]),e._v(".")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in OGC GeoSPARQL 1.0")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[e._v("7. Topology Vocabulary Extensions - Properties")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:sfEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfIntersects")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfTouches")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfCrosses")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfWithin")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfOverlaps")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehMeet")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehOverlap")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCovers")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCoveredBy")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehInside")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8eq")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8dc")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ec")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8po")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tppi")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntppi")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.4. Standard Properties for Geo:Geometry")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:dimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:coordinateDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:spatialDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:isEmpty")])]),e._v(", "),o("code",[o("s",[e._v("geo:isSimple")])]),e._v(", "),o("code",[o("s",[e._v("geo:hasSerialization")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.5. WKT Serialization")]),e._v(" "),o("td",[o("code",[e._v("geo:wktLiteral")]),e._v(", "),o("code",[e._v("geo:asWKT")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[e._v("8.6. GML Serialization")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:gmlLiteral")])]),e._v(", "),o("code",[o("s",[e._v("geo:asGML")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.7. Non-Topological Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:distance")]),e._v(", "),o("code",[e._v("geof:buffer")]),e._v(", "),o("code",[e._v("geof:convexHull")]),e._v(" , "),o("code",[e._v("geof:intersection")]),e._v(", "),o("code",[e._v("geof:union")]),e._v(", "),o("code",[e._v("geof:difference")]),e._v(" "),o("code",[e._v("geof:symDifference")]),e._v(", "),o("code",[e._v("geof:envelope")]),e._v(", "),o("code",[e._v("geof:boundary")]),e._v(", "),o("code",[e._v("geof:getSRID")]),e._v(",")]),e._v(" "),o("td",[e._v("10/10")])]),e._v(" "),o("tr",[o("td",[e._v("9.2. Common Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:relate")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[e._v("9.3. Topological Simple Features Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:sfEquals")]),e._v(", "),o("code",[e._v("geof:sfDisjoint")]),e._v(", "),o("code",[e._v("geof:sfIntersects")]),e._v(", "),o("code",[e._v("geof:sfTouches")]),e._v(", "),o("code",[e._v("geof:sfCrosses")]),e._v(", "),o("code",[e._v("geof:sfWithin")]),e._v(", "),o("code",[e._v("geof:sfContains")]),e._v(", "),o("code",[e._v("geof:sfOverlaps")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.4. Topological Egenhofer Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:ehEquals")]),e._v(", "),o("code",[e._v("geof:ehDisjoint")]),e._v(", "),o("code",[e._v("geof:ehMeet")]),e._v(", "),o("code",[e._v("geof:ehOverlap")]),e._v(", "),o("code",[e._v("geof:ehCovers")]),e._v(", "),o("code",[e._v("geof:ehCoveredBy")]),e._v(", "),o("code",[e._v("geof:ehInside")]),e._v(", "),o("code",[e._v("geof:ehContains")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.5. Topological RCC8 Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:rcc8eq")]),e._v(", "),o("code",[e._v("geof:rcc8dc")]),e._v(", "),o("code",[e._v("geof:rcc8ec")]),e._v(", "),o("code",[e._v("geof:rcc8po")]),e._v(", "),o("code",[e._v("geof:rcc8tppi")]),e._v(", "),o("code",[e._v("geof:rcc8tpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntppi")])]),e._v(" "),o("td",[e._v("8/8")])])])]),e._v(" "),o("p",[e._v("Several non-topological query functions use a unit of measure URI which OGC defines under a specific namespace e.g. "),o("code",[e._v("")]),e._v(". The latest version of Ontop currently supports the units metre, radian and degree.")]),e._v(" "),o("h2",{attrs:{id:"r2rml"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[e._v("#")]),e._v(" R2RML")]),e._v(" "),o("p",[o("em",[e._v("Updated for 4.2.0")])]),e._v(" "),o("p",[e._v("The latest version of Ontop is almost fully compliant with the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml",target:"_blank",rel:"noopener"}},[e._v("R2RML"),o("OutboundLink")],1),e._v(" standard.")]),e._v(" "),o("p",[e._v("At the moment, it does NOT support:")]),e._v(" "),o("ul",[o("li",[e._v("Base IRIs")]),e._v(" "),o("li",[o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#default-mappings",target:"_blank",rel:"noopener"}},[e._v("R2RML default mapping"),o("OutboundLink")],1),e._v(" generation")]),e._v(" "),o("li",[e._v("Normalization of binary SQL datatypes")])]),e._v(" "),o("p",[e._v("For complex SQL queries (e.g. with a "),o("code",[e._v("GROUP BY")]),e._v(") in the mapping, Ontop may not be able to infer the datatype of each column if the option "),o("a",{attrs:{href:"/guide/advanced/configuration"}},[o("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(" is not enabled (disabled by default). In such a situation, it may not be able to derive the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#natural-mapping",target:"_blank",rel:"noopener"}},[e._v("natural RDF datatype"),o("OutboundLink")],1),e._v(" of a literal built over a column and may not apply the expected normalization. This can be partially mitigated by expliciting the RDF datatype in the mapping, but normalization would remain unapplied.")]),e._v(" "),o("h2",{attrs:{id:"rdf-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdf-1-1"}},[e._v("#")]),e._v(" RDF 1.1")]),e._v(" "),o("p",[e._v("Ontop complies with "),o("a",{attrs:{href:"https://www.w3.org/TR/rdf11-new/",target:"_blank",rel:"noopener"}},[e._v("RDF 1.1"),o("OutboundLink")],1),e._v(". It types simple literals (from RDF 1.0) as "),o("code",[e._v("xsd:string")]),e._v(" and literals with a language tag as "),o("code",[e._v("rdf:langString")]),e._v(".")]),e._v(" "),o("h2",{attrs:{id:"owl-2-ql"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#owl-2-ql"}},[e._v("#")]),e._v(" OWL 2 QL")]),e._v(" "),o("h2",{attrs:{id:"rdfs"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[e._v("#")]),e._v(" RDFS")]),e._v(" "),o("h2",{attrs:{id:"time-functions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#time-functions"}},[e._v("#")]),e._v(" Time functions")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("ofn")]),e._v(" ("),o("code",[e._v("http://www.ontotext.com/sparql/functions/")]),e._v(") and their documentation can be found "),o("a",{attrs:{href:"https://graphdb.ontotext.com/documentation/10.6/sparql-ext-functions-reference.html#date-and-time-function-extensions",target:"_blank",rel:"noopener"}},[e._v("here"),o("OutboundLink")],1),e._v(". They accept both "),o("code",[e._v("xsd:date")]),e._v(" and "),o("code",[e._v("xsd:dateTime")]),e._v(" as arguments. ("),o("em",[e._v("supported since 4.2.0")]),e._v(").")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("obdaf")]),e._v(" ("),o("code",[e._v("https://w3id.org/obda/functions#")]),e._v(") have been introduced in 5.1.0 (see "),o("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),o("OutboundLink")],1),e._v(").")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Function")])]),e._v(" "),o("th",[e._v("Argument 1")]),e._v(" "),o("th",[e._v("Argument 2")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:hoursBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:minutesBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:secondsBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:millisBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:dateTrunc")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:string")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:milliseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:microseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:week-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:quarter-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:decade-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:century-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:millenium-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")])])]),e._v(" "),o("p",[e._v("Combinations of argument datatypes marked with the symbol * are not supported for queries over the following data sources: Oracle and Microsoft SQL Server.")]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:[datePart]-from-dateTime")]),e._v(" functions are supported for all dialects. They can be used to extract a specific part of the provided "),o("code",[e._v("dateTime")]),e._v(" value in a numeric format ("),o("code",[e._v("xsd:decimal")]),e._v(" for "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(", "),o("code",[e._v("xsd:integer")]),e._v(" for the remaining functions).")]),e._v(" "),o("div",{staticClass:"custom-block tip"},[o("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),o("p",[e._v("The function "),o("code",[e._v("obdaf:week-from-dateTime")]),e._v(" returns the ISO week index of the given date, where week 1 is considered the first week with a majority of its days in January.")])]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:dateTrunc")]),e._v(" function can be used to truncate a given "),o("code",[e._v("xsd:dateTime")]),e._v(" to a new value with specified granularity. The granularity must be provided as an "),o("code",[e._v("xsd:string")]),e._v(" "),o("strong",[e._v("literal")]),e._v(". The following granularity values are supported:")]),e._v(" "),o("ul",[o("li",[o("code",[e._v("microsecond")])]),e._v(" "),o("li",[o("code",[e._v("millisecond")])]),e._v(" "),o("li",[o("code",[e._v("second")])]),e._v(" "),o("li",[o("code",[e._v("minute")])]),e._v(" "),o("li",[o("code",[e._v("hour")])]),e._v(" "),o("li",[o("code",[e._v("day")])]),e._v(" "),o("li",[o("code",[e._v("week")])]),e._v(" "),o("li",[o("code",[e._v("month")])]),e._v(" "),o("li",[o("code",[e._v("quarter")])]),e._v(" "),o("li",[o("code",[e._v("year")])]),e._v(" "),o("li",[o("code",[e._v("decade")])]),e._v(" "),o("li",[o("code",[e._v("century")])]),e._v(" "),o("li",[o("code",[e._v("millennium")])])]),e._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),o("p",[e._v("Not all database systems support all granularities equally.")]),e._v(" "),o("p",[o("code",[e._v("decade")]),e._v(", "),o("code",[e._v("century")]),e._v(", and "),o("code",[e._v("millennium")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MySQL ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MariaDB ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("SQLServer")]),e._v(" "),o("li",[e._v("Snowflake")]),e._v(" "),o("li",[e._v("Spark")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[o("code",[e._v("second")]),e._v(" is not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("Denodo")])]),e._v(" "),o("p",[o("code",[e._v("millisecond")]),e._v(" and "),o("code",[e._v("microsecond")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo")]),e._v(" "),o("li",[e._v("MySQL")]),e._v(" "),o("li",[e._v("MariaDB")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[e._v("PostgreSQL requires these granularities to be named "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(" instead.")])]),e._v(" "),o("h3",{attrs:{id:"examples"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[e._v("#")]),e._v(" Examples")]),e._v(" "),o("p",[o("code",[e._v('obdaf:year("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:hour("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"9"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:dateTrunc("2023-08-16T09:00:00"^^xsd:dateTime, "month"^^xsd:string)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023-08-01T00:00:00"^^xsd:dateTime')])],1)])}),[],!1,null,null,null);t.default=_.exports}}]); \ No newline at end of file diff --git a/assets/js/36.69b1ebb1.js b/assets/js/36.0936af62.js similarity index 98% rename from assets/js/36.69b1ebb1.js rename to assets/js/36.0936af62.js index aaa141a51..67f52cb55 100644 --- a/assets/js/36.69b1ebb1.js +++ b/assets/js/36.0936af62.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{412:function(t,e,a){"use strict";a.r(e);var r=a(51),n=Object(r.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"key-concepts"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#key-concepts"}},[t._v("#")]),t._v(" Key concepts")]),t._v(" "),a("h2",{attrs:{id:"virtual-knowledge-graph-vkg"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#virtual-knowledge-graph-vkg"}},[t._v("#")]),t._v(" Virtual Knowledge Graph (VKG)")]),t._v(" "),a("p",[t._v("A Knowledge Graph (KG) is, in our terminology, a graph using the RDF data model.")]),t._v(" "),a("p",[t._v("A Virtual KG (VKG) is a virtual representation in RDF of non-RDF data, which is generally relational data.\nWith a VKG, the data remains in the data sources in its original format but can be virtually represented as an RDF graph.")]),t._v(" "),a("h2",{attrs:{id:"rdf"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[t._v("#")]),t._v(" RDF")]),t._v(" "),a("p",[t._v("The "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("Resource Description Framework (RDF)"),a("OutboundLink")],1),t._v("\nis one of the two main data models for graphs (together with "),a("a",{attrs:{href:"http://graphdatamodeling.com/Graph%20Data%20Modeling/GraphDataModeling/page/PropertyGraphs.html",target:"_blank",rel:"noopener"}},[t._v("property graphs"),a("OutboundLink")],1),t._v(").\nRDF mainly targets "),a("strong",[t._v("data integration")]),t._v(" applications while property graphs are used for building graph databases.")]),t._v(" "),a("p",[t._v("In RDF, data is modelled using classes and properties.")]),t._v(" "),a("p",[t._v("Starting from 3.0, Ontop supports "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("RDF 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"sparql-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[t._v("#")]),t._v(" SPARQL query")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL"),a("OutboundLink")],1),t._v(" is the standard query language for RDF graphs.")]),t._v(" "),a("p",[t._v("Ontop is capable of answering SPARQL queries expressed over the VKG.\nOntop translates these SPARQL queries into SQL queries, which are then executed over the relational data sources.")]),t._v(" "),a("p",[t._v("Ontop supports a large fragment of "),a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("p",[t._v("Mappings specify the correspondence between the data models of the relational data sources and the RDF graph.\nOntop supports the "),a("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[t._v("R2RML standard mapping language"),a("OutboundLink")],1),t._v(" and the Ontop mapping language, which is fully interoperable with R2RML.")]),t._v(" "),a("h2",{attrs:{id:"ontology"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[t._v("#")]),t._v(" Ontology")]),t._v(" "),a("p",[t._v("An ontology specifies the formal relations between the classes and properties used by the RDF graph. It is mainly used for enriching the RDF graph by, for instance, taking account of class hierarchies.")]),t._v(" "),a("p",[t._v("Ontop supports lightweight ontologies expressed in "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf-schema/",target:"_blank",rel:"noopener"}},[t._v("RDFS"),a("OutboundLink")],1),t._v(" or in the slightly more expressive "),a("a",{attrs:{href:"https://www.w3.org/TR/owl2-profiles/#OWL_2_QL",target:"_blank",rel:"noopener"}},[t._v("OWL 2 QL"),a("OutboundLink")],1),t._v(" fragment of OWL.")]),t._v(" "),a("h2",{attrs:{id:"vkg-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vkg-specification"}},[t._v("#")]),t._v(" VKG specification")]),t._v(" "),a("p",[t._v("VKG specifications are composed of mappings and optionally of ontologies.")]),t._v(" "),a("h2",{attrs:{id:"sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[t._v("#")]),t._v(" SPARQL endpoint")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/",target:"_blank",rel:"noopener"}},[t._v("SPARQL endpoint"),a("OutboundLink")],1),t._v(" is a standardized HTTP-based Web API.\nIt makes the RDF graph queryable by any HTTP client.")]),t._v(" "),a("p",[t._v("Ontop enables VKG specifications to be deployed as SPARQL endpoints.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{414:function(t,e,a){"use strict";a.r(e);var r=a(51),n=Object(r.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"key-concepts"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#key-concepts"}},[t._v("#")]),t._v(" Key concepts")]),t._v(" "),a("h2",{attrs:{id:"virtual-knowledge-graph-vkg"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#virtual-knowledge-graph-vkg"}},[t._v("#")]),t._v(" Virtual Knowledge Graph (VKG)")]),t._v(" "),a("p",[t._v("A Knowledge Graph (KG) is, in our terminology, a graph using the RDF data model.")]),t._v(" "),a("p",[t._v("A Virtual KG (VKG) is a virtual representation in RDF of non-RDF data, which is generally relational data.\nWith a VKG, the data remains in the data sources in its original format but can be virtually represented as an RDF graph.")]),t._v(" "),a("h2",{attrs:{id:"rdf"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[t._v("#")]),t._v(" RDF")]),t._v(" "),a("p",[t._v("The "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("Resource Description Framework (RDF)"),a("OutboundLink")],1),t._v("\nis one of the two main data models for graphs (together with "),a("a",{attrs:{href:"http://graphdatamodeling.com/Graph%20Data%20Modeling/GraphDataModeling/page/PropertyGraphs.html",target:"_blank",rel:"noopener"}},[t._v("property graphs"),a("OutboundLink")],1),t._v(").\nRDF mainly targets "),a("strong",[t._v("data integration")]),t._v(" applications while property graphs are used for building graph databases.")]),t._v(" "),a("p",[t._v("In RDF, data is modelled using classes and properties.")]),t._v(" "),a("p",[t._v("Starting from 3.0, Ontop supports "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("RDF 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"sparql-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[t._v("#")]),t._v(" SPARQL query")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL"),a("OutboundLink")],1),t._v(" is the standard query language for RDF graphs.")]),t._v(" "),a("p",[t._v("Ontop is capable of answering SPARQL queries expressed over the VKG.\nOntop translates these SPARQL queries into SQL queries, which are then executed over the relational data sources.")]),t._v(" "),a("p",[t._v("Ontop supports a large fragment of "),a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("p",[t._v("Mappings specify the correspondence between the data models of the relational data sources and the RDF graph.\nOntop supports the "),a("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[t._v("R2RML standard mapping language"),a("OutboundLink")],1),t._v(" and the Ontop mapping language, which is fully interoperable with R2RML.")]),t._v(" "),a("h2",{attrs:{id:"ontology"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[t._v("#")]),t._v(" Ontology")]),t._v(" "),a("p",[t._v("An ontology specifies the formal relations between the classes and properties used by the RDF graph. It is mainly used for enriching the RDF graph by, for instance, taking account of class hierarchies.")]),t._v(" "),a("p",[t._v("Ontop supports lightweight ontologies expressed in "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf-schema/",target:"_blank",rel:"noopener"}},[t._v("RDFS"),a("OutboundLink")],1),t._v(" or in the slightly more expressive "),a("a",{attrs:{href:"https://www.w3.org/TR/owl2-profiles/#OWL_2_QL",target:"_blank",rel:"noopener"}},[t._v("OWL 2 QL"),a("OutboundLink")],1),t._v(" fragment of OWL.")]),t._v(" "),a("h2",{attrs:{id:"vkg-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vkg-specification"}},[t._v("#")]),t._v(" VKG specification")]),t._v(" "),a("p",[t._v("VKG specifications are composed of mappings and optionally of ontologies.")]),t._v(" "),a("h2",{attrs:{id:"sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[t._v("#")]),t._v(" SPARQL endpoint")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/",target:"_blank",rel:"noopener"}},[t._v("SPARQL endpoint"),a("OutboundLink")],1),t._v(" is a standardized HTTP-based Web API.\nIt makes the RDF graph queryable by any HTTP client.")]),t._v(" "),a("p",[t._v("Ontop enables VKG specifications to be deployed as SPARQL endpoints.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/37.d9dcd129.js b/assets/js/37.ae5d087b.js similarity index 98% rename from assets/js/37.d9dcd129.js rename to assets/js/37.ae5d087b.js index cd03686de..b2fcc7945 100644 --- a/assets/js/37.d9dcd129.js +++ b/assets/js/37.ae5d087b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{415:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"aws-athena"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#aws-athena"}},[t._v("#")]),t._v(" AWS Athena")]),t._v(" "),a("p",[a("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://aws.amazon.com/athena/",target:"_blank",rel:"noopener"}},[t._v("Athena"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS Athena databases using the "),a("a",{attrs:{href:"https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html",target:"_blank",rel:"noopener"}},[t._v("Simba Athena JDBC Driver"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("Athena does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),a("ul",[a("li",[t._v("The Simba Athena JDBC does not support the use of default databases when connecting to Athena.")]),t._v(" "),a("li",[t._v('Accessing object fields with the "dot operator" is not supported (see below).')])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Athena:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:awsathena://AwsRegion"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("eu-central-1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("S3OutputLocation")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("s3://result-location\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.simba.athena.jdbc.Driver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop implements explicit compatibility with the Athena array type "),a("code",[t._v("ARRAY")]),t._v(". When used with the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),a("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),a("h3",{attrs:{id:"struct-access"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),a("p",[t._v("Individual "),a("code",[t._v("MAP")]),t._v(" objects can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),a("p",[a("code",[t._v("ROW")]),t._v(" objects, can also be accessed using the "),a("code",[t._v("[key]")]),t._v(" operator. Please note, that in this case, "),a("code",[t._v("key")]),t._v(" must be an integer index instead of the name of the field:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("SELECT my_struct[1] FROM ...\n")])])]),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use the '),a("code",[t._v("[]")]),t._v(" operator instead.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{413:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"aws-athena"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#aws-athena"}},[t._v("#")]),t._v(" AWS Athena")]),t._v(" "),a("p",[a("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://aws.amazon.com/athena/",target:"_blank",rel:"noopener"}},[t._v("Athena"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS Athena databases using the "),a("a",{attrs:{href:"https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html",target:"_blank",rel:"noopener"}},[t._v("Simba Athena JDBC Driver"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("Athena does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),a("ul",[a("li",[t._v("The Simba Athena JDBC does not support the use of default databases when connecting to Athena.")]),t._v(" "),a("li",[t._v('Accessing object fields with the "dot operator" is not supported (see below).')])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Athena:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:awsathena://AwsRegion"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("eu-central-1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("S3OutputLocation")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("s3://result-location\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.simba.athena.jdbc.Driver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop implements explicit compatibility with the Athena array type "),a("code",[t._v("ARRAY")]),t._v(". When used with the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),a("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),a("h3",{attrs:{id:"struct-access"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),a("p",[t._v("Individual "),a("code",[t._v("MAP")]),t._v(" objects can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),a("p",[a("code",[t._v("ROW")]),t._v(" objects, can also be accessed using the "),a("code",[t._v("[key]")]),t._v(" operator. Please note, that in this case, "),a("code",[t._v("key")]),t._v(" must be an integer index instead of the name of the field:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("SELECT my_struct[1] FROM ...\n")])])]),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use the '),a("code",[t._v("[]")]),t._v(" operator instead.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/38.71888562.js b/assets/js/38.03ed20e0.js similarity index 99% rename from assets/js/38.71888562.js rename to assets/js/38.03ed20e0.js index c511c7426..0a814f2d1 100644 --- a/assets/js/38.71888562.js +++ b/assets/js/38.03ed20e0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{414:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"google-bigquery"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#google-bigquery"}},[t._v("#")]),t._v(" Google BigQuery")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://cloud.google.com/bigquery",target:"_blank",rel:"noopener"}},[t._v("BigQuery"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on cloud-based Google BigQuery databases using the "),s("a",{attrs:{href:"https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers",target:"_blank",rel:"noopener"}},[t._v("Simba BigQuery JDBC Driver"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("Integrity constraint information is a recent feature in BigQuery. Beware that the majority of tables in BigQuery are still not providing this kind of information. Make sure to provide missing integrity constraint information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v("String literals have to be encased in "),s("em",[t._v("single quotes")]),t._v(" ("),s("code",[t._v("'")]),t._v("). Double quote string literals ("),s("code",[t._v('"')]),t._v(") are not supported.")]),t._v(" "),s("li",[t._v("The position counter in the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" starts counting at 0 instead of 1 for BigQuery.")]),t._v(" "),s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')]),t._v(" "),s("li",[t._v("In BigQuery, columns of the type "),s("code",[t._v("ARRAY>")]),t._v(" are not supported. Use "),s("code",[t._v("ARRAY>>")]),t._v(" instead.")]),t._v(" "),s("li",[t._v("The Ontop option "),s("code",[t._v("ontop.exposeSystemTables")]),t._v(" is not supported for BigQuery, as the JBDC does not allow us to access system tables.")])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to BigQuery:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:bigquery://dummydomain.com:443"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("ProjectId")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("dummyproject"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("OAuthType")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\njdbc.property.OAuthServiceAcctEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" service.account@dummydomain.com\njdbc.property.OAuthPvtKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" paht/to/private/key/file.json\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.simba.googlebigquery.jdbc.Driver\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The Google BigQuery JDBC supports different types of authentication methods. The above "),s("code",[t._v(".property")]),t._v(" file corresponds to the "),s("em",[t._v("OAuthType 0: Service Account")]),t._v(" method, which involves creating a service account for BigQuery and downloading its private key from the web interface. However, any other authentication method can be used with Ontop as well.")])]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the "),s("code",[t._v("ARRAY")]),t._v(" type. When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The position counter starts counting at 0 instead of 1 for BigQuery.")])]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('In BigQuery, columns cannot directly be "arrays of arrays". To represent a two-dimensional array, the type '),s("code",[t._v("ARRAY>>")]),t._v(" has to be used instead of just "),s("code",[t._v("ARRAY>")])])]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In BigQuery, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_VALUE(TO_JSON(my_struct), '$.my_attribute')")])],1)])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{415:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"google-bigquery"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#google-bigquery"}},[t._v("#")]),t._v(" Google BigQuery")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://cloud.google.com/bigquery",target:"_blank",rel:"noopener"}},[t._v("BigQuery"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on cloud-based Google BigQuery databases using the "),s("a",{attrs:{href:"https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers",target:"_blank",rel:"noopener"}},[t._v("Simba BigQuery JDBC Driver"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("Integrity constraint information is a recent feature in BigQuery. Beware that the majority of tables in BigQuery are still not providing this kind of information. Make sure to provide missing integrity constraint information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v("String literals have to be encased in "),s("em",[t._v("single quotes")]),t._v(" ("),s("code",[t._v("'")]),t._v("). Double quote string literals ("),s("code",[t._v('"')]),t._v(") are not supported.")]),t._v(" "),s("li",[t._v("The position counter in the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" starts counting at 0 instead of 1 for BigQuery.")]),t._v(" "),s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')]),t._v(" "),s("li",[t._v("In BigQuery, columns of the type "),s("code",[t._v("ARRAY>")]),t._v(" are not supported. Use "),s("code",[t._v("ARRAY>>")]),t._v(" instead.")]),t._v(" "),s("li",[t._v("The Ontop option "),s("code",[t._v("ontop.exposeSystemTables")]),t._v(" is not supported for BigQuery, as the JBDC does not allow us to access system tables.")])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to BigQuery:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:bigquery://dummydomain.com:443"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("ProjectId")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("dummyproject"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("OAuthType")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\njdbc.property.OAuthServiceAcctEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" service.account@dummydomain.com\njdbc.property.OAuthPvtKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" paht/to/private/key/file.json\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.simba.googlebigquery.jdbc.Driver\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The Google BigQuery JDBC supports different types of authentication methods. The above "),s("code",[t._v(".property")]),t._v(" file corresponds to the "),s("em",[t._v("OAuthType 0: Service Account")]),t._v(" method, which involves creating a service account for BigQuery and downloading its private key from the web interface. However, any other authentication method can be used with Ontop as well.")])]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the "),s("code",[t._v("ARRAY")]),t._v(" type. When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The position counter starts counting at 0 instead of 1 for BigQuery.")])]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('In BigQuery, columns cannot directly be "arrays of arrays". To represent a two-dimensional array, the type '),s("code",[t._v("ARRAY>>")]),t._v(" has to be used instead of just "),s("code",[t._v("ARRAY>")])])]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In BigQuery, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_VALUE(TO_JSON(my_struct), '$.my_attribute')")])],1)])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/42.605d70b3.js b/assets/js/42.771e4cb4.js similarity index 98% rename from assets/js/42.605d70b3.js rename to assets/js/42.771e4cb4.js index 610a740e1..9a8a5f4f8 100644 --- a/assets/js/42.605d70b3.js +++ b/assets/js/42.771e4cb4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{419:function(e,t,a){"use strict";a.r(t);var s=a(51),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"dremio"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dremio"}},[e._v("#")]),e._v(" Dremio")]),e._v(" "),a("p",[a("em",[e._v("Supported since 4.1.0.")])]),e._v(" "),a("p",[e._v("Through the "),a("a",{attrs:{href:"https://dremio.com",target:"_blank",rel:"noopener"}},[e._v("Dremio"),a("OutboundLink")],1),e._v(" connector, Ontop is able to construct VKGs on Dremio databases.\nOntop can connect to normal Dremio instances, as well as Dremio Cloud databases.")]),e._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[e._v("#")]),e._v(" Limitations & Exceptions")]),e._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),a("p",[e._v("Dremio does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(" for this purpose.")])]),e._v(" "),a("ul",[a("li",[e._v("The "),a("code",[e._v("position")]),e._v(" argument for the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(" cannot be used with Dremio.")]),e._v(" "),a("li",[e._v("When using a Dremio version below 21.0.0, some larger queries that employ "),a("code",[e._v("UNION")]),e._v("s may fail. This can be solved by adding "),a("code",[e._v("ontop.maxNbChildrenLiftingDBFS=0")]),e._v(" to the properties")])]),e._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[e._v("#")]),e._v(" Database Connection")]),e._v(" "),a("p",[e._v("The following shows the content of a sample "),a("code",[e._v(".properties")]),e._v(" file that can be used to connect Ontop to Dremio for each supported JDBC:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("com.dremio.jdbc.Driver")])])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:dremio:direct"),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("localhost:31010\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" com.dremio.jdbc.Driver\n")])])]),a("ul",[a("li",[a("code",[e._v("org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver")])])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:arrow-flight-sql://localhost:32010\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" dremio\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[e._v("#")]),e._v(" Nested Type Support")]),e._v(" "),a("p",[e._v("Ontop implements explicit compatibility with the Dremio array type "),a("code",[e._v("LIST")]),e._v(" which can be used with the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(". However, it cannot infer the type of the flattened result column.")]),e._v(" "),a("p",[e._v("To use a flatten lens on a JSON-encoded array stored in the database, it first has to be converted to a "),a("code",[e._v("LIST")]),e._v(".")]),e._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("position")]),e._v(" argument for flatten lenses cannot be used with Dremio.")])]),e._v(" "),a("h3",{attrs:{id:"struct-access"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[e._v("#")]),e._v(" Struct Access")]),e._v(" "),a("p",[e._v("Individual struct objects can be accessed by SQL expressions in the dialect's default way:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("SELECT my_struct['my_attribute'] FROM ...\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{420:function(e,t,a){"use strict";a.r(t);var s=a(51),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"dremio"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dremio"}},[e._v("#")]),e._v(" Dremio")]),e._v(" "),a("p",[a("em",[e._v("Supported since 4.1.0.")])]),e._v(" "),a("p",[e._v("Through the "),a("a",{attrs:{href:"https://dremio.com",target:"_blank",rel:"noopener"}},[e._v("Dremio"),a("OutboundLink")],1),e._v(" connector, Ontop is able to construct VKGs on Dremio databases.\nOntop can connect to normal Dremio instances, as well as Dremio Cloud databases.")]),e._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[e._v("#")]),e._v(" Limitations & Exceptions")]),e._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),a("p",[e._v("Dremio does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(" for this purpose.")])]),e._v(" "),a("ul",[a("li",[e._v("The "),a("code",[e._v("position")]),e._v(" argument for the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(" cannot be used with Dremio.")]),e._v(" "),a("li",[e._v("When using a Dremio version below 21.0.0, some larger queries that employ "),a("code",[e._v("UNION")]),e._v("s may fail. This can be solved by adding "),a("code",[e._v("ontop.maxNbChildrenLiftingDBFS=0")]),e._v(" to the properties")])]),e._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[e._v("#")]),e._v(" Database Connection")]),e._v(" "),a("p",[e._v("The following shows the content of a sample "),a("code",[e._v(".properties")]),e._v(" file that can be used to connect Ontop to Dremio for each supported JDBC:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("com.dremio.jdbc.Driver")])])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:dremio:direct"),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("localhost:31010\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" com.dremio.jdbc.Driver\n")])])]),a("ul",[a("li",[a("code",[e._v("org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver")])])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:arrow-flight-sql://localhost:32010\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" dremio\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[e._v("#")]),e._v(" Nested Type Support")]),e._v(" "),a("p",[e._v("Ontop implements explicit compatibility with the Dremio array type "),a("code",[e._v("LIST")]),e._v(" which can be used with the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(". However, it cannot infer the type of the flattened result column.")]),e._v(" "),a("p",[e._v("To use a flatten lens on a JSON-encoded array stored in the database, it first has to be converted to a "),a("code",[e._v("LIST")]),e._v(".")]),e._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("position")]),e._v(" argument for flatten lenses cannot be used with Dremio.")])]),e._v(" "),a("h3",{attrs:{id:"struct-access"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[e._v("#")]),e._v(" Struct Access")]),e._v(" "),a("p",[e._v("Individual struct objects can be accessed by SQL expressions in the dialect's default way:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("SELECT my_struct['my_attribute'] FROM ...\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/43.c48fe62d.js b/assets/js/43.c1abf395.js similarity index 98% rename from assets/js/43.c48fe62d.js rename to assets/js/43.c1abf395.js index abb9f1b69..bb418bd2c 100644 --- a/assets/js/43.c48fe62d.js +++ b/assets/js/43.c1abf395.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{420:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"duckdb"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#duckdb"}},[t._v("#")]),t._v(" DuckDB")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://duckdb.org",target:"_blank",rel:"noopener"}},[t._v("DuckDB"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on DuckDB database files.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v("DuckDB database files prior to version 1.0 are not guaranteed to be compatible with later versions.")]),t._v(" "),s("li",[t._v("Setting a default schema is not supported when connecting to DuckDB.")]),t._v(" "),s("li",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")]),t._v(" "),s("li",[t._v('Accessing struct fields using the "dot operator" is not supported.')]),t._v(" "),s("li",[t._v("The Ontop option "),s("code",[t._v("ontop.exposeSystemTables")]),t._v(" is not supported for DuckDB, as the JBDC does not allow us to access system tables.")]),t._v(" "),s("li",[t._v("DuckDB has a very specific "),s("a",{attrs:{href:"https://duckdb.org/faq#how-does-duckdb-handle-concurrency",target:"_blank",rel:"noopener"}},[t._v("concurrency model"),s("OutboundLink")],1),t._v(". In particular, it does not support concurrent multi-process read-write queries.")]),t._v(" "),s("li",[t._v("DuckDB supports integrity constraints, but they tend to "),s("a",{attrs:{href:"https://duckdb.org/docs/guides/performance/indexing",target:"_blank",rel:"noopener"}},[t._v("costly for large tables"),s("OutboundLink")],1),t._v(". Consider instead specifying constraints using lenses for large datasets.")])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DuckDB:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:duckdb:path/to/database.db\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.duckdb.DuckDBDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the DuckDB array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")])]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual struct objects can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing struct fields using the "dot operator" is not supported.')])])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{419:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"duckdb"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#duckdb"}},[t._v("#")]),t._v(" DuckDB")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://duckdb.org",target:"_blank",rel:"noopener"}},[t._v("DuckDB"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on DuckDB database files.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v("DuckDB database files prior to version 1.0 are not guaranteed to be compatible with later versions.")]),t._v(" "),s("li",[t._v("Setting a default schema is not supported when connecting to DuckDB.")]),t._v(" "),s("li",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")]),t._v(" "),s("li",[t._v('Accessing struct fields using the "dot operator" is not supported.')]),t._v(" "),s("li",[t._v("The Ontop option "),s("code",[t._v("ontop.exposeSystemTables")]),t._v(" is not supported for DuckDB, as the JBDC does not allow us to access system tables.")]),t._v(" "),s("li",[t._v("DuckDB has a very specific "),s("a",{attrs:{href:"https://duckdb.org/faq#how-does-duckdb-handle-concurrency",target:"_blank",rel:"noopener"}},[t._v("concurrency model"),s("OutboundLink")],1),t._v(". In particular, it does not support concurrent multi-process read-write queries.")]),t._v(" "),s("li",[t._v("DuckDB supports integrity constraints, but they tend to "),s("a",{attrs:{href:"https://duckdb.org/docs/guides/performance/indexing",target:"_blank",rel:"noopener"}},[t._v("costly for large tables"),s("OutboundLink")],1),t._v(". Consider instead specifying constraints using lenses for large datasets.")])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DuckDB:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:duckdb:path/to/database.db\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.duckdb.DuckDBDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the DuckDB array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")])]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual struct objects can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing struct fields using the "dot operator" is not supported.')])])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/44.b75f4588.js b/assets/js/44.b45be0fb.js similarity index 98% rename from assets/js/44.b75f4588.js rename to assets/js/44.b45be0fb.js index ad98c7ea0..23939f88e 100644 --- a/assets/js/44.b75f4588.js +++ b/assets/js/44.b45be0fb.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{424:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"aws-dynamodb"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#aws-dynamodb"}},[t._v("#")]),t._v(" AWS DynamoDB")]),t._v(" "),a("p",[a("em",[t._v("Supported (beta) since 5.1.0.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.amazonaws.cn/en/dynamodb/",target:"_blank",rel:"noopener"}},[t._v("DynamoDB"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS DynamoDB tables using the "),a("a",{attrs:{href:"https://www.cdata.com/drivers/dynamodb/jdbc/",target:"_blank",rel:"noopener"}},[t._v("CData JDBC Driver for Amazon DynamoDB"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("DynamoDB only provides limited information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("To run Ontop with the CData DynamoDB JDBC, "),a("em",[t._v('"enhanced SQL queries"')]),t._v(" must be enabled. This is achieved by adding "),a("code",[t._v("supportenhancedsql=true")]),t._v(" to the connection properties.")])]),t._v(" "),a("ul",[a("li",[t._v("Nested data structures and the "),a("em",[t._v("FlattenLens")]),t._v(" are not supported.")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DynamoDB:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:amazondynamodb:AuthScheme"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("AwsRootKeys"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("AWSRegion")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("FRANKFURT"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("supportenhancedsql")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("true\njdbc.property.AWSAccessKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.AWSSecretKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cdata.jdbc.amazondynamodb.AmazonDynamoDBDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Nested data types and the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" are not supported for DynamoDB.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{421:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"aws-dynamodb"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#aws-dynamodb"}},[t._v("#")]),t._v(" AWS DynamoDB")]),t._v(" "),a("p",[a("em",[t._v("Supported (beta) since 5.1.0.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.amazonaws.cn/en/dynamodb/",target:"_blank",rel:"noopener"}},[t._v("DynamoDB"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS DynamoDB tables using the "),a("a",{attrs:{href:"https://www.cdata.com/drivers/dynamodb/jdbc/",target:"_blank",rel:"noopener"}},[t._v("CData JDBC Driver for Amazon DynamoDB"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("DynamoDB only provides limited information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("To run Ontop with the CData DynamoDB JDBC, "),a("em",[t._v('"enhanced SQL queries"')]),t._v(" must be enabled. This is achieved by adding "),a("code",[t._v("supportenhancedsql=true")]),t._v(" to the connection properties.")])]),t._v(" "),a("ul",[a("li",[t._v("Nested data structures and the "),a("em",[t._v("FlattenLens")]),t._v(" are not supported.")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DynamoDB:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:amazondynamodb:AuthScheme"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("AwsRootKeys"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("AWSRegion")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("FRANKFURT"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("supportenhancedsql")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("true\njdbc.property.AWSAccessKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.AWSSecretKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cdata.jdbc.amazondynamodb.AmazonDynamoDBDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Nested data types and the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" are not supported for DynamoDB.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/45.2385a34b.js b/assets/js/45.6782ae9a.js similarity index 97% rename from assets/js/45.2385a34b.js rename to assets/js/45.6782ae9a.js index bc195dd6b..d16fc45e9 100644 --- a/assets/js/45.2385a34b.js +++ b/assets/js/45.6782ae9a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{421:function(t,e,s){"use strict";s.r(e);var i=s(51),o=Object(i.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"generic-jdbc-not-recommended"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#generic-jdbc-not-recommended"}},[t._v("#")]),t._v(" Generic JDBC (not recommended)")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Don't rely on generic JDBC support. It isn't sufficient for any data source.")])])])]),t._v(" "),s("p",[t._v("Ontop provides a generic implementation, that is used as default for any JDBC. While part of the functionality may work right out of the box with this default implementation, there is no guarantee that Ontop will be able to handle any database setup and SPARQL queries correctly, especially once special limitations and exceptions come into play.")]),t._v(" "),s("p",[t._v("However, Ontop also provides dialect-specific implementations for a variety of different database management systems and SQL dialects. The following documents describe the process of connecting Ontop to each of them, as well as special points and caveats for specific cases.")]),t._v(" "),s("p",[t._v("In this section, we provide general information and important points for each of the supported systems.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("If your SQL dialect of interest is not included in this list, it is possible to implement a connector for it, following "),s("RouterLink",{attrs:{to:"/dev/db-adapter.html"}},[t._v("this guide")]),t._v(".")],1)]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("To use Ontop with "),s("strong",[t._v("any")]),t._v(" database system, its corresponding JDBC driver is required in the "),s("code",[t._v("jdbc")]),t._v(" directory, which is passed to the Ontop instance as described in the "),s("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[t._v("setup guide")]),t._v(".")])])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{422:function(t,e,s){"use strict";s.r(e);var i=s(51),o=Object(i.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"generic-jdbc-not-recommended"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#generic-jdbc-not-recommended"}},[t._v("#")]),t._v(" Generic JDBC (not recommended)")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Don't rely on generic JDBC support. It isn't sufficient for any data source.")])])])]),t._v(" "),s("p",[t._v("Ontop provides a generic implementation, that is used as default for any JDBC. While part of the functionality may work right out of the box with this default implementation, there is no guarantee that Ontop will be able to handle any database setup and SPARQL queries correctly, especially once special limitations and exceptions come into play.")]),t._v(" "),s("p",[t._v("However, Ontop also provides dialect-specific implementations for a variety of different database management systems and SQL dialects. The following documents describe the process of connecting Ontop to each of them, as well as special points and caveats for specific cases.")]),t._v(" "),s("p",[t._v("In this section, we provide general information and important points for each of the supported systems.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("If your SQL dialect of interest is not included in this list, it is possible to implement a connector for it, following "),s("RouterLink",{attrs:{to:"/dev/db-adapter.html"}},[t._v("this guide")]),t._v(".")],1)]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("To use Ontop with "),s("strong",[t._v("any")]),t._v(" database system, its corresponding JDBC driver is required in the "),s("code",[t._v("jdbc")]),t._v(" directory, which is passed to the Ontop instance as described in the "),s("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[t._v("setup guide")]),t._v(".")])])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/47.ebcfd7a3.js b/assets/js/47.386aad46.js similarity index 97% rename from assets/js/47.ebcfd7a3.js rename to assets/js/47.386aad46.js index 2952efd9e..cacff0e46 100644 --- a/assets/js/47.ebcfd7a3.js +++ b/assets/js/47.386aad46.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{422:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"mariadb"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mariadb"}},[t._v("#")]),t._v(" MariaDB")]),t._v(" "),a("p",[a("em",[t._v("Supported since 5.0.0.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://mariadb.com",target:"_blank",rel:"noopener"}},[t._v("MariaDB"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on MariaDB databases.")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("ul",[a("li",[t._v("String literals have to be encased in "),a("em",[t._v("single quotes")]),t._v(" ("),a("code",[t._v("'")]),t._v("). Double quote string literals ("),a("code",[t._v('"')]),t._v(") are not supported.")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to MariaDB:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:mariadb://localhost:3306/defaultdatabase\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.mariadb.jdbc.Driver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop implements explicit compatibility with the MariaDB type "),a("code",[t._v("JSON")]),t._v(" which can be used with the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(". However, it cannot infer the type of the flattened result column.")]),t._v(" "),a("p",[t._v("In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), "),a("a",{attrs:{href:"https://mariadb.com/kb/en/json-functions/",target:"_blank",rel:"noopener"}},[t._v("MariaDB's JSON functions"),a("OutboundLink")],1),t._v(" can be used to further work with them.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{424:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"mariadb"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mariadb"}},[t._v("#")]),t._v(" MariaDB")]),t._v(" "),a("p",[a("em",[t._v("Supported since 5.0.0.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://mariadb.com",target:"_blank",rel:"noopener"}},[t._v("MariaDB"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on MariaDB databases.")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("ul",[a("li",[t._v("String literals have to be encased in "),a("em",[t._v("single quotes")]),t._v(" ("),a("code",[t._v("'")]),t._v("). Double quote string literals ("),a("code",[t._v('"')]),t._v(") are not supported.")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to MariaDB:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:mariadb://localhost:3306/defaultdatabase\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.mariadb.jdbc.Driver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop implements explicit compatibility with the MariaDB type "),a("code",[t._v("JSON")]),t._v(" which can be used with the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(". However, it cannot infer the type of the flattened result column.")]),t._v(" "),a("p",[t._v("In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), "),a("a",{attrs:{href:"https://mariadb.com/kb/en/json-functions/",target:"_blank",rel:"noopener"}},[t._v("MariaDB's JSON functions"),a("OutboundLink")],1),t._v(" can be used to further work with them.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/50.2e427b56.js b/assets/js/50.a6d14188.js similarity index 98% rename from assets/js/50.2e427b56.js rename to assets/js/50.a6d14188.js index 46c93e1a6..984892e2f 100644 --- a/assets/js/50.2e427b56.js +++ b/assets/js/50.a6d14188.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{428:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"oracle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#oracle"}},[t._v("#")]),t._v(" Oracle")]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.oracle.com/database/",target:"_blank",rel:"noopener"}},[t._v("Oracle"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Oracle databases.")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("ul",[a("li",[t._v("Ontop cannot perform inference based on nested data types in Oracle.")]),t._v(" "),a("li",[t._v('Ontop represents the "big integer" datatype as '),a("code",[t._v("NUMBER(19)")]),t._v(".")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Oracle:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:oracle:thin:@//localhost:49161/defaultcontainer\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" oracle.jdbc.OracleDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop does not implement explicit compatibility with nested datatypes in Oracle.\nHowever, Ontop allows the usage of the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.")]),t._v(" "),a("p",[t._v("To use the flatten lens with Oracle array types, they must first be converted to JSON strings.")]),t._v(" "),a("p",[t._v("In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), "),a("a",{attrs:{href:"https://docs.oracle.com/en/database/oracle/oracle-database/21/adjsn/query-json-data.html#GUID-119E5069-77F2-45DC-B6F0-A1B312945590",target:"_blank",rel:"noopener"}},[t._v("Oracle's JSON functions"),a("OutboundLink")],1),t._v(" can be used to further work with them.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use SQL JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{427:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"oracle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#oracle"}},[t._v("#")]),t._v(" Oracle")]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.oracle.com/database/",target:"_blank",rel:"noopener"}},[t._v("Oracle"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Oracle databases.")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("ul",[a("li",[t._v("Ontop cannot perform inference based on nested data types in Oracle.")]),t._v(" "),a("li",[t._v('Ontop represents the "big integer" datatype as '),a("code",[t._v("NUMBER(19)")]),t._v(".")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Oracle:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:oracle:thin:@//localhost:49161/defaultcontainer\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" oracle.jdbc.OracleDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop does not implement explicit compatibility with nested datatypes in Oracle.\nHowever, Ontop allows the usage of the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.")]),t._v(" "),a("p",[t._v("To use the flatten lens with Oracle array types, they must first be converted to JSON strings.")]),t._v(" "),a("p",[t._v("In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), "),a("a",{attrs:{href:"https://docs.oracle.com/en/database/oracle/oracle-database/21/adjsn/query-json-data.html#GUID-119E5069-77F2-45DC-B6F0-A1B312945590",target:"_blank",rel:"noopener"}},[t._v("Oracle's JSON functions"),a("OutboundLink")],1),t._v(" can be used to further work with them.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use SQL JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/51.55dfa97d.js b/assets/js/51.12210249.js similarity index 98% rename from assets/js/51.55dfa97d.js rename to assets/js/51.12210249.js index 5cb482392..53d68a913 100644 --- a/assets/js/51.55dfa97d.js +++ b/assets/js/51.12210249.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{427:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"postgresql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" PostgreSQL")]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://postgresql.org",target:"_blank",rel:"noopener"}},[t._v("PostgreSQL"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Postgres databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v('Accessing JSON object fields with the "arrow operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to PostgreSQL:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:postgresql://localhost:5432/database\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" admin\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.postgresql.Driver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the PostgreSQL array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("Furthermore, the flatten lens can also be used with the "),s("code",[t._v("JSON")]),t._v(" and "),s("code",[t._v("JSONB")]),t._v(" datatypes, which are both recognized by Ontop. For these types, however, Ontop cannot infer the output type of the flattened column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In PostgreSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH(TO_JSON(my_struct), '$.my_attribute')")])],1),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('The "arrow operators" used to access JSON objects in PostgreSQL are not supported in Ontop. Please use JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{428:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"postgresql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" PostgreSQL")]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://postgresql.org",target:"_blank",rel:"noopener"}},[t._v("PostgreSQL"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Postgres databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v('Accessing JSON object fields with the "arrow operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to PostgreSQL:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:postgresql://localhost:5432/database\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" admin\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.postgresql.Driver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the PostgreSQL array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("Furthermore, the flatten lens can also be used with the "),s("code",[t._v("JSON")]),t._v(" and "),s("code",[t._v("JSONB")]),t._v(" datatypes, which are both recognized by Ontop. For these types, however, Ontop cannot infer the output type of the flattened column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In PostgreSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH(TO_JSON(my_struct), '$.my_attribute')")])],1),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('The "arrow operators" used to access JSON objects in PostgreSQL are not supported in Ontop. Please use JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/53.baae48e1.js b/assets/js/53.7504f725.js similarity index 98% rename from assets/js/53.baae48e1.js rename to assets/js/53.7504f725.js index 584c1d3b6..eb83bb53c 100644 --- a/assets/js/53.baae48e1.js +++ b/assets/js/53.7504f725.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{431:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"aws-redshift"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#aws-redshift"}},[t._v("#")]),t._v(" AWS Redshift")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://aws.amazon.com/redshift/",target:"_blank",rel:"noopener"}},[t._v("Redshift"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS Redshift databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("AWS Redshift does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v("The Simba Redshift JDBC does not support the use of default databases when connecting to Redshift.")]),t._v(" "),s("li",[t._v("Accessing "),s("code",[t._v("SUPER")]),t._v(' object fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Redshift:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:redshift:iam://default.dummyaccount.eu-central-1.redshift-serverless.amazonaws.com:5439/defaultdatabase\njdbc.property.AccessKeyID "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.SecretAccessKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.amazon.redshift.jdbc42.Driver\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The AWS Redshift JDBC supports different types of authentication methods. The above "),s("code",[t._v(".property")]),t._v(" file corresponds to authentication with access keys. However, any other authentication method can be used with Ontop as well. In these cases, the corresponding connection properties have to be supplied as "),s("code",[t._v("jdbc.property.")]),t._v(" instead of the "),s("code",[t._v("AccessKeyID")]),t._v(" and "),s("code",[t._v("SecretAccessKey")]),t._v(" properties.")])]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Redshift type "),s("code",[t._v("SUPER")]),t._v(".")]),t._v(" "),s("p",[t._v("This type can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(". However, Ontop is not able to automatically infer the type of the result column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("In Redshift, individual "),s("code",[t._v("SUPER")]),t._v(' struct objects can be accessed by SQL expressions using the "dot operator" on the '),s("code",[t._v("SUPER")]),t._v(" column. In Ontop, this feature is not currently supported.")]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH_TEXT(JSON_SERIALIZE(my_struct), 'my_attribute')")])],1)])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{430:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"aws-redshift"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#aws-redshift"}},[t._v("#")]),t._v(" AWS Redshift")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://aws.amazon.com/redshift/",target:"_blank",rel:"noopener"}},[t._v("Redshift"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS Redshift databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("AWS Redshift does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v("The Simba Redshift JDBC does not support the use of default databases when connecting to Redshift.")]),t._v(" "),s("li",[t._v("Accessing "),s("code",[t._v("SUPER")]),t._v(' object fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Redshift:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:redshift:iam://default.dummyaccount.eu-central-1.redshift-serverless.amazonaws.com:5439/defaultdatabase\njdbc.property.AccessKeyID "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.SecretAccessKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.amazon.redshift.jdbc42.Driver\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The AWS Redshift JDBC supports different types of authentication methods. The above "),s("code",[t._v(".property")]),t._v(" file corresponds to authentication with access keys. However, any other authentication method can be used with Ontop as well. In these cases, the corresponding connection properties have to be supplied as "),s("code",[t._v("jdbc.property.")]),t._v(" instead of the "),s("code",[t._v("AccessKeyID")]),t._v(" and "),s("code",[t._v("SecretAccessKey")]),t._v(" properties.")])]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Redshift type "),s("code",[t._v("SUPER")]),t._v(".")]),t._v(" "),s("p",[t._v("This type can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(". However, Ontop is not able to automatically infer the type of the result column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("In Redshift, individual "),s("code",[t._v("SUPER")]),t._v(' struct objects can be accessed by SQL expressions using the "dot operator" on the '),s("code",[t._v("SUPER")]),t._v(" column. In Ontop, this feature is not currently supported.")]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH_TEXT(JSON_SERIALIZE(my_struct), 'my_attribute')")])],1)])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/54.ea19806d.js b/assets/js/54.52883e2f.js similarity index 98% rename from assets/js/54.ea19806d.js rename to assets/js/54.52883e2f.js index ae408fb07..9cce909df 100644 --- a/assets/js/54.ea19806d.js +++ b/assets/js/54.52883e2f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{430:function(e,t,s){"use strict";s.r(t);var a=s(51),o=Object(a.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"snowflake"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#snowflake"}},[e._v("#")]),e._v(" Snowflake")]),e._v(" "),s("p",[s("em",[e._v("Supported since 5.0.0.")])]),e._v(" "),s("p",[e._v("Through the "),s("a",{attrs:{href:"https://snowflake.com",target:"_blank",rel:"noopener"}},[e._v("Snowflake"),s("OutboundLink")],1),e._v(" connector, Ontop is able to construct VKGs on cloud-based Snowflake databases.")]),e._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[e._v("#")]),e._v(" Limitations & Exceptions")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Integrity constraints are often missing in Snowflake. Make sure to specify the missing ones in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(" for this purpose.")])]),e._v(" "),s("ul",[s("li",[e._v("Due to an issue in the JDBC, quotation marks cannot always be used when defining an alias. Because of this, it is recommended to choose column names without special characters where possible.")]),e._v(" "),s("li",[e._v('Accessing struct fields with the "colon operator" is not supported (see below).')])]),e._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[e._v("#")]),e._v(" Database Connection")]),e._v(" "),s("p",[e._v("The following shows the content of a sample "),s("code",[e._v(".properties")]),e._v(" file that can be used to connect Ontop to Snowflake:")]),e._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[e._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:snowflake://dummyuser.snowflakecomputing.com/?warehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummywarehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("db")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummydb"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("schema")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummyschema\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" net.snowflake.client.jdbc.SnowflakeDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[e._v("#")]),e._v(" Nested Type Support")]),e._v(" "),s("p",[e._v("Ontop implements explicit compatibility with the "),s("code",[e._v("ARRAY")]),e._v(" type, which can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(". However, it is not able to automatically infer the type of the resulting column.")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Due to an issue mentioned above, using special characters inside the "),s("code",[e._v("output")]),e._v(" and "),s("code",[e._v("position")]),e._v(" fields of the flatten lens for Snowflake will fail. Furthermore, these fields will always be case-insensitive.")])]),e._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[e._v("#")]),e._v(" Struct Access")]),e._v(" "),s("p",[e._v("Individual object fields can be accessed by SQL expressions in the dialect's default way:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT my_object['my_field'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v('Accessing object fields using the "colon operator" is not supported. Please use the '),s("code",[e._v("[]")]),e._v(" operator instead.")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{432:function(e,t,s){"use strict";s.r(t);var a=s(51),o=Object(a.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"snowflake"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#snowflake"}},[e._v("#")]),e._v(" Snowflake")]),e._v(" "),s("p",[s("em",[e._v("Supported since 5.0.0.")])]),e._v(" "),s("p",[e._v("Through the "),s("a",{attrs:{href:"https://snowflake.com",target:"_blank",rel:"noopener"}},[e._v("Snowflake"),s("OutboundLink")],1),e._v(" connector, Ontop is able to construct VKGs on cloud-based Snowflake databases.")]),e._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[e._v("#")]),e._v(" Limitations & Exceptions")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Integrity constraints are often missing in Snowflake. Make sure to specify the missing ones in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(" for this purpose.")])]),e._v(" "),s("ul",[s("li",[e._v("Due to an issue in the JDBC, quotation marks cannot always be used when defining an alias. Because of this, it is recommended to choose column names without special characters where possible.")]),e._v(" "),s("li",[e._v('Accessing struct fields with the "colon operator" is not supported (see below).')])]),e._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[e._v("#")]),e._v(" Database Connection")]),e._v(" "),s("p",[e._v("The following shows the content of a sample "),s("code",[e._v(".properties")]),e._v(" file that can be used to connect Ontop to Snowflake:")]),e._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[e._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:snowflake://dummyuser.snowflakecomputing.com/?warehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummywarehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("db")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummydb"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("schema")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummyschema\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" net.snowflake.client.jdbc.SnowflakeDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[e._v("#")]),e._v(" Nested Type Support")]),e._v(" "),s("p",[e._v("Ontop implements explicit compatibility with the "),s("code",[e._v("ARRAY")]),e._v(" type, which can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(". However, it is not able to automatically infer the type of the resulting column.")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Due to an issue mentioned above, using special characters inside the "),s("code",[e._v("output")]),e._v(" and "),s("code",[e._v("position")]),e._v(" fields of the flatten lens for Snowflake will fail. Furthermore, these fields will always be case-insensitive.")])]),e._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[e._v("#")]),e._v(" Struct Access")]),e._v(" "),s("p",[e._v("Individual object fields can be accessed by SQL expressions in the dialect's default way:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT my_object['my_field'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v('Accessing object fields using the "colon operator" is not supported. Please use the '),s("code",[e._v("[]")]),e._v(" operator instead.")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/55.66e69ac0.js b/assets/js/55.c0cbc631.js similarity index 98% rename from assets/js/55.66e69ac0.js rename to assets/js/55.c0cbc631.js index fb6aad560..ae121dd24 100644 --- a/assets/js/55.66e69ac0.js +++ b/assets/js/55.c0cbc631.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{433:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"sparksql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#sparksql"}},[t._v("#")]),t._v(" SparkSQL")]),t._v(" "),s("p",[s("em",[t._v("Supported since 4.2.0.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://spark.apache.org/",target:"_blank",rel:"noopener"}},[t._v("SparkSQL"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on an external Spark database, using the SparkSQL JDBC.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("SparkSQL does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to SparkSQL using the JDBC Hive Driver:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("jdbc:hive2://localhost:10000\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.apache.hive.jdbc.HiveDriver\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the SparkSQL array type "),s("code",[t._v("Array")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("Furthermore, the flatten lens can also be used with the JSON-encoded string columns. For these columns, however, Ontop cannot infer the output type of the flattened column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In SparkSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("GET_JSON_OBJECT(TO_JSON(my_struct), '$.my_attribute')")])],1)])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{431:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"sparksql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#sparksql"}},[t._v("#")]),t._v(" SparkSQL")]),t._v(" "),s("p",[s("em",[t._v("Supported since 4.2.0.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://spark.apache.org/",target:"_blank",rel:"noopener"}},[t._v("SparkSQL"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on an external Spark database, using the SparkSQL JDBC.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("SparkSQL does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to SparkSQL using the JDBC Hive Driver:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("jdbc:hive2://localhost:10000\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.apache.hive.jdbc.HiveDriver\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the SparkSQL array type "),s("code",[t._v("Array")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("Furthermore, the flatten lens can also be used with the JSON-encoded string columns. For these columns, however, Ontop cannot infer the output type of the flattened column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In SparkSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("GET_JSON_OBJECT(TO_JSON(my_struct), '$.my_attribute')")])],1)])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/56.e6b91c92.js b/assets/js/56.4b4edba3.js similarity index 98% rename from assets/js/56.e6b91c92.js rename to assets/js/56.4b4edba3.js index 8b1d38f2f..e4e08c5a1 100644 --- a/assets/js/56.e6b91c92.js +++ b/assets/js/56.4b4edba3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{432:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"trino"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#trino"}},[t._v("#")]),t._v(" Trino")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://trino.io",target:"_blank",rel:"noopener"}},[t._v("Trino"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on Trino databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("Trino does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Trino:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:trino://localhost:8080/defaultdatabase\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" io.trino.jdbc.TrinoDriver\n")])])]),s("p",[t._v("In case Trino is set up without authentication, the "),s("code",[t._v("jdbc.user")]),t._v(" and "),s("code",[t._v("jdbc.password")]),t._v(" lines can also be left out.")]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Trino array type "),s("code",[t._v("array(t)")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual "),s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#map",target:"_blank",rel:"noopener"}},[s("code",[t._v("MAP")]),s("OutboundLink")],1),t._v(" structures can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("p",[s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#row",target:"_blank",rel:"noopener"}},[s("code",[t._v("ROW")]),s("OutboundLink")],1),t._v(" structures can be accessed using the "),s("code",[t._v("[position]")]),t._v(" operator. "),s("code",[t._v("position")]),t._v(" must be an integer index starting from 1:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct[1] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use the '),s("code",[t._v("[]")]),t._v(" operator instead.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{433:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"trino"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#trino"}},[t._v("#")]),t._v(" Trino")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://trino.io",target:"_blank",rel:"noopener"}},[t._v("Trino"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on Trino databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("Trino does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Trino:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:trino://localhost:8080/defaultdatabase\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" io.trino.jdbc.TrinoDriver\n")])])]),s("p",[t._v("In case Trino is set up without authentication, the "),s("code",[t._v("jdbc.user")]),t._v(" and "),s("code",[t._v("jdbc.password")]),t._v(" lines can also be left out.")]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Trino array type "),s("code",[t._v("array(t)")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual "),s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#map",target:"_blank",rel:"noopener"}},[s("code",[t._v("MAP")]),s("OutboundLink")],1),t._v(" structures can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("p",[s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#row",target:"_blank",rel:"noopener"}},[s("code",[t._v("ROW")]),s("OutboundLink")],1),t._v(" structures can be accessed using the "),s("code",[t._v("[position]")]),t._v(" operator. "),s("code",[t._v("position")]),t._v(" must be an integer index starting from 1:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct[1] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use the '),s("code",[t._v("[]")]),t._v(" operator instead.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/58.5d967bf0.js b/assets/js/58.587c2188.js similarity index 98% rename from assets/js/58.5d967bf0.js rename to assets/js/58.587c2188.js index 9c6a2d768..19c393d95 100644 --- a/assets/js/58.5d967bf0.js +++ b/assets/js/58.587c2188.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{435:function(t,e,o){"use strict";o.r(e);var a=o(51),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"getting-started"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[t._v("#")]),t._v(" Getting started")]),t._v(" "),o("h2",{attrs:{id:"tutorial"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#tutorial"}},[t._v("#")]),t._v(" Tutorial")]),t._v(" "),o("p",[t._v("If you are new to Ontop and Virtual Knowledge Graphs, we encourage you to have a look "),o("a",{attrs:{href:"/tutorial"}},[t._v("at the official tutorial")]),t._v(".")]),t._v(" "),o("h2",{attrs:{id:"using-ontop"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#using-ontop"}},[t._v("#")]),t._v(" Using Ontop")]),t._v(" "),o("p",[t._v("Ontop is distributed under various forms. They can be downloaded on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker Hub"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(" and in the Protégé plugin repository.")]),t._v(" "),o("h3",{attrs:{id:"mapping-designer"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#mapping-designer"}},[t._v("#")]),t._v(" Mapping designer")]),t._v(" "),o("p",[t._v("For editing and testing your mappings, you can use our plugin of the "),o("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[t._v("Protégé ontology editor"),o("OutboundLink")],1),t._v(". You can download the latest stable release directly from Protégé. Alternatively, pre-releases can be found on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[t._v("Limited support of advanced features")]),t._v(" "),o("p",[t._v("In particular, the Protégé plugin doesn't support "),o("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(". For advanced usage, we recommend using text editors or considering commercial offerings.")])]),t._v(" "),o("h3",{attrs:{id:"deployment"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#deployment"}},[t._v("#")]),t._v(" Deployment")]),t._v(" "),o("p",[t._v("Once your mappings and your ontology are ready, you can deploy your VKG as a SPARQL endpoint. The Ontop endpoint is available both as a "),o("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[t._v("CLI command ("),o("code",[t._v("ontop endpoint")]),t._v(")")]),t._v(" and as a "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker image"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("p",[t._v("You can also use the Ontop endpoint during development as it embeds "),o("a",{attrs:{href:"https://about.yasgui.org/",target:"_blank",rel:"noopener"}},[t._v("a nice YASGUI client"),o("OutboundLink")],1),t._v(" and an optional portal (since 4.0-beta-1) containing pre-defined queries.")]),t._v(" "),o("h3",{attrs:{id:"command-line-interface"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#command-line-interface"}},[t._v("#")]),t._v(" Command Line Interface")]),t._v(" "),o("p",[t._v("Want to materialize your VKG, convert your mappings into R2RML, bootstrap your mappings or start a SPARQL endpoint? You can use "),o("a",{attrs:{href:"/guide/cli"}},[t._v("the CLI")]),t._v(" for that. It can be found on on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("h3",{attrs:{id:"former-solutions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#former-solutions"}},[t._v("#")]),t._v(" Former solutions")]),t._v(" "),o("p",[t._v("Historically, Ontop has been made available under other means that we don't recommend anymore.")]),t._v(" "),o("h4",{attrs:{id:"java-api-not-recommended"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#java-api-not-recommended"}},[t._v("#")]),t._v(" Java API (not recommended)")]),t._v(" "),o("p",[t._v("It remains possible to use Ontop as a Java API through "),o("a",{attrs:{href:"https://rdf4j.org/",target:"_blank",rel:"noopener"}},[t._v("RDF4J"),o("OutboundLink")],1),t._v(" although we recommend the HTTP SPARQL endpoint as a first option (think of a microservice). Why? Because such a Java API would add many dependencies to your project and constraint you to use certain versions of Java.")]),t._v(" "),o("p",[t._v("Ontop-rdf4j is available on "),o("a",{attrs:{href:"https://search.maven.org/artifact/it.unibz.inf.ontop/ontop-rdf4j",target:"_blank",rel:"noopener"}},[t._v("Maven Central"),o("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{436:function(t,e,o){"use strict";o.r(e);var a=o(51),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"getting-started"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[t._v("#")]),t._v(" Getting started")]),t._v(" "),o("h2",{attrs:{id:"tutorial"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#tutorial"}},[t._v("#")]),t._v(" Tutorial")]),t._v(" "),o("p",[t._v("If you are new to Ontop and Virtual Knowledge Graphs, we encourage you to have a look "),o("a",{attrs:{href:"/tutorial"}},[t._v("at the official tutorial")]),t._v(".")]),t._v(" "),o("h2",{attrs:{id:"using-ontop"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#using-ontop"}},[t._v("#")]),t._v(" Using Ontop")]),t._v(" "),o("p",[t._v("Ontop is distributed under various forms. They can be downloaded on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker Hub"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(" and in the Protégé plugin repository.")]),t._v(" "),o("h3",{attrs:{id:"mapping-designer"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#mapping-designer"}},[t._v("#")]),t._v(" Mapping designer")]),t._v(" "),o("p",[t._v("For editing and testing your mappings, you can use our plugin of the "),o("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[t._v("Protégé ontology editor"),o("OutboundLink")],1),t._v(". You can download the latest stable release directly from Protégé. Alternatively, pre-releases can be found on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[t._v("Limited support of advanced features")]),t._v(" "),o("p",[t._v("In particular, the Protégé plugin doesn't support "),o("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(". For advanced usage, we recommend using text editors or considering commercial offerings.")])]),t._v(" "),o("h3",{attrs:{id:"deployment"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#deployment"}},[t._v("#")]),t._v(" Deployment")]),t._v(" "),o("p",[t._v("Once your mappings and your ontology are ready, you can deploy your VKG as a SPARQL endpoint. The Ontop endpoint is available both as a "),o("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[t._v("CLI command ("),o("code",[t._v("ontop endpoint")]),t._v(")")]),t._v(" and as a "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker image"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("p",[t._v("You can also use the Ontop endpoint during development as it embeds "),o("a",{attrs:{href:"https://about.yasgui.org/",target:"_blank",rel:"noopener"}},[t._v("a nice YASGUI client"),o("OutboundLink")],1),t._v(" and an optional portal (since 4.0-beta-1) containing pre-defined queries.")]),t._v(" "),o("h3",{attrs:{id:"command-line-interface"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#command-line-interface"}},[t._v("#")]),t._v(" Command Line Interface")]),t._v(" "),o("p",[t._v("Want to materialize your VKG, convert your mappings into R2RML, bootstrap your mappings or start a SPARQL endpoint? You can use "),o("a",{attrs:{href:"/guide/cli"}},[t._v("the CLI")]),t._v(" for that. It can be found on on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("h3",{attrs:{id:"former-solutions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#former-solutions"}},[t._v("#")]),t._v(" Former solutions")]),t._v(" "),o("p",[t._v("Historically, Ontop has been made available under other means that we don't recommend anymore.")]),t._v(" "),o("h4",{attrs:{id:"java-api-not-recommended"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#java-api-not-recommended"}},[t._v("#")]),t._v(" Java API (not recommended)")]),t._v(" "),o("p",[t._v("It remains possible to use Ontop as a Java API through "),o("a",{attrs:{href:"https://rdf4j.org/",target:"_blank",rel:"noopener"}},[t._v("RDF4J"),o("OutboundLink")],1),t._v(" although we recommend the HTTP SPARQL endpoint as a first option (think of a microservice). Why? Because such a Java API would add many dependencies to your project and constraint you to use certain versions of Java.")]),t._v(" "),o("p",[t._v("Ontop-rdf4j is available on "),o("a",{attrs:{href:"https://search.maven.org/artifact/it.unibz.inf.ontop/ontop-rdf4j",target:"_blank",rel:"noopener"}},[t._v("Maven Central"),o("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/59.73194a85.js b/assets/js/59.c250e2f7.js similarity index 96% rename from assets/js/59.73194a85.js rename to assets/js/59.c250e2f7.js index 73bf1ac87..57af9d539 100644 --- a/assets/js/59.73194a85.js +++ b/assets/js/59.c250e2f7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{436:function(a,t,r){"use strict";r.r(t);var s=r(51),e=Object(s.a)({},(function(){var a=this,t=a.$createElement,r=a._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[r("h1",{attrs:{id:"glossary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#glossary"}},[a._v("#")]),a._v(" Glossary")]),a._v(" "),r("h2",{attrs:{id:"vkg"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#vkg"}},[a._v("#")]),a._v(" VKG")]),a._v(" "),r("p",[a._v("Virtual Knowledge Graph")]),a._v(" "),r("h2",{attrs:{id:"mapping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[a._v("#")]),a._v(" Mapping")]),a._v(" "),r("h2",{attrs:{id:"obda"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#obda"}},[a._v("#")]),a._v(" OBDA")]),a._v(" "),r("p",[a._v("Ontology-Based Data Access")]),a._v(" "),r("h2",{attrs:{id:"ontology"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[a._v("#")]),a._v(" Ontology")]),a._v(" "),r("h2",{attrs:{id:"rdf"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[a._v("#")]),a._v(" RDF")]),a._v(" "),r("h2",{attrs:{id:"rdfs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[a._v("#")]),a._v(" RDFS")]),a._v(" "),r("h2",{attrs:{id:"sparql"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[a._v("#")]),a._v(" SPARQL")]),a._v(" "),r("h3",{attrs:{id:"sparql-query"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[a._v("#")]),a._v(" SPARQL Query")]),a._v(" "),r("h3",{attrs:{id:"sparql-endpoint"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[a._v("#")]),a._v(" SPARQL Endpoint")]),a._v(" "),r("h2",{attrs:{id:"owl"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#owl"}},[a._v("#")]),a._v(" OWL")]),a._v(" "),r("h2",{attrs:{id:"r2rml"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[a._v("#")]),a._v(" R2RML")])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{435:function(a,t,r){"use strict";r.r(t);var s=r(51),e=Object(s.a)({},(function(){var a=this,t=a.$createElement,r=a._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[r("h1",{attrs:{id:"glossary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#glossary"}},[a._v("#")]),a._v(" Glossary")]),a._v(" "),r("h2",{attrs:{id:"vkg"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#vkg"}},[a._v("#")]),a._v(" VKG")]),a._v(" "),r("p",[a._v("Virtual Knowledge Graph")]),a._v(" "),r("h2",{attrs:{id:"mapping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[a._v("#")]),a._v(" Mapping")]),a._v(" "),r("h2",{attrs:{id:"obda"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#obda"}},[a._v("#")]),a._v(" OBDA")]),a._v(" "),r("p",[a._v("Ontology-Based Data Access")]),a._v(" "),r("h2",{attrs:{id:"ontology"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[a._v("#")]),a._v(" Ontology")]),a._v(" "),r("h2",{attrs:{id:"rdf"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[a._v("#")]),a._v(" RDF")]),a._v(" "),r("h2",{attrs:{id:"rdfs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[a._v("#")]),a._v(" RDFS")]),a._v(" "),r("h2",{attrs:{id:"sparql"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[a._v("#")]),a._v(" SPARQL")]),a._v(" "),r("h3",{attrs:{id:"sparql-query"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[a._v("#")]),a._v(" SPARQL Query")]),a._v(" "),r("h3",{attrs:{id:"sparql-endpoint"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[a._v("#")]),a._v(" SPARQL Endpoint")]),a._v(" "),r("h2",{attrs:{id:"owl"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#owl"}},[a._v("#")]),a._v(" OWL")]),a._v(" "),r("h2",{attrs:{id:"r2rml"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[a._v("#")]),a._v(" R2RML")])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/61.2fe5e65a.js b/assets/js/61.ba6d8dd6.js similarity index 99% rename from assets/js/61.2fe5e65a.js rename to assets/js/61.ba6d8dd6.js index 7b827d1e6..a1b8722c5 100644 --- a/assets/js/61.2fe5e65a.js +++ b/assets/js/61.ba6d8dd6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{440:function(e,t,n){"use strict";n.r(t);var a=n(51),o=Object(a.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"release-notes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#release-notes"}},[e._v("#")]),e._v(" Release notes")]),e._v(" "),n("h2",{attrs:{id:"_5-2-0-august-16-2024"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-2-0-august-16-2024"}},[e._v("#")]),e._v(" 5.2.0 (August 16, 2024)")]),e._v(" "),n("h4",{attrs:{id:"new-features"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Extract user information (ID, group, role) from HTTP headers and make it available to special SQL functions "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/753",target:"_blank",rel:"noopener"}},[e._v("#753"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Insert user info in the query log "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/768",target:"_blank",rel:"noopener"}},[e._v("#768"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Compression option added to the materialization "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/797",target:"_blank",rel:"noopener"}},[e._v("#797"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"optimizations"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#optimizations"}},[e._v("#")]),e._v(" Optimizations")]),e._v(" "),n("ul",[n("li",[e._v("Left join optimizations:\n"),n("ul",[n("li",[e._v("Pruning the right child when unused and cardinality doesn't matter "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/752",target:"_blank",rel:"noopener"}},[e._v("#752"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("More non-nullability constraints extracted from the ancestors for transferring self-left-joins based on functional dependencies "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/761",target:"_blank",rel:"noopener"}},[e._v("#761"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Self-left-join elimination with nullable determinants of functional dependencies "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/783",target:"_blank",rel:"noopener"}},[e._v("#783"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Self-left join elimination on nullable functional dependency determinants made robust to provenance variables and trivial functional dependencies "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/804",target:"_blank",rel:"noopener"}},[e._v("#804"),n("OutboundLink")],1)])])]),e._v(" "),n("li",[e._v("Unique constraint and variable non requirement inference with distinct nodes improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/756",target:"_blank",rel:"noopener"}},[e._v("#756"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Simplification of conjunctions and disjunctions of equalities "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/755",target:"_blank",rel:"noopener"}},[e._v("#755"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Propagation of foreign keys from basic lenses to parents "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/759",target:"_blank",rel:"noopener"}},[e._v("#759"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Functional dependency inference for unions improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/760",target:"_blank",rel:"noopener"}},[e._v("#760"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Optimization to the SPARQL "),n("code",[e._v("strStartsWith")]),e._v(" function "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/801",target:"_blank",rel:"noopener"}},[e._v("#801"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("IRI decomposition with more than 1 argument when some arguments are nullable enabled "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/809",target:"_blank",rel:"noopener"}},[e._v("#809"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Removal of distincts below joins when there is a "),n("code",[e._v("limit 1")]),e._v(" above")]),e._v(" "),n("li",[e._v("Year extraction from timestamps with DuckDB optimized")])]),e._v(" "),n("h4",{attrs:{id:"refactoring"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("T-mapping and related optimizations refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/769",target:"_blank",rel:"noopener"}},[e._v("#769"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("B-node label anonymization pushed into the IQTree "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/772",target:"_blank",rel:"noopener"}},[e._v("#772"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Handling environment variables with the CLI refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/814",target:"_blank",rel:"noopener"}},[e._v("#814"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Robust simplification for GeoSPARQL functions "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/808",target:"_blank",rel:"noopener"}},[e._v("#808"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Wrapping a values node into a lens at mapping processing time added (disabled by default; see property "),n("code",[e._v("ontop.wrapMappingValuesNodesInLenses")]),e._v(")")]),e._v(" "),n("li",[e._v("Non-nullable variables are not used anymore for right provenance from a left join (was preventing some optimizations)")])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[n("code",[e._v(" = true")]),e._v(" issue with SQLServer and Oracle fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/758",target:"_blank",rel:"noopener"}},[e._v("#758"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Connection test for Trino and H2 fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/767",target:"_blank",rel:"noopener"}},[e._v("#767"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Mysql datetime conversion is now encoded to UTF8 to avoid collation error "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/779",target:"_blank",rel:"noopener"}},[e._v("#779"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Missing spaces in string format pattern with MySQL added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/784",target:"_blank",rel:"noopener"}},[e._v("#784"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Configuration classes now use injector suppliers "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/794",target:"_blank",rel:"noopener"}},[e._v("#794"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("MS SQL Server identifiers are now treated not case-sensitive (even if quoted) "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/805",target:"_blank",rel:"noopener"}},[e._v("#805"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Incorrect time zone format in xsd:dateTime for Redshift's "),n("code",[e._v("TIMESTAMP")]),e._v(" data type fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/807",target:"_blank",rel:"noopener"}},[e._v("#807"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Database constraints were ignored by Ontop CLI "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/777",target:"_blank",rel:"noopener"}},[e._v("#777"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Error with the CLI during the R2RML to OBDA mapping conversion fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/799",target:"_blank",rel:"noopener"}},[e._v("#799"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("code",[e._v("TIMESTAMP WITH TIME ZONE")]),e._v(" is now recognized for H2")]),e._v(" "),n("li",[e._v("Typing nulls for "),n("code",[e._v("DATE")]),e._v(" with Dremio fixed")]),e._v(" "),n("li",[e._v("Missing minutes from the DuckDB time zone added")]),e._v(" "),n("li",[e._v("Invalid URNs for the triple patterns generated when converting the mapping to R2RML fixed")]),e._v(" "),n("li",[e._v("Error with constant in order-by involving a VALUES node fixed")]),e._v(" "),n("li",[e._v("Missed duplicate elimination for some overlapping IRI templates fixed")]),e._v(" "),n("li",[e._v("Incorrect content types returned for CSV and TSV results of a SPARQL query fixed")])]),e._v(" "),n("p",[n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/24?closed=1",target:"_blank",rel:"noopener"}},[e._v("Milestone on Github"),n("OutboundLink")],1)]),e._v(" "),n("h2",{attrs:{id:"_5-1-2-january-17-2024"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-2-january-17-2024"}},[e._v("#")]),e._v(" 5.1.2 (January 17, 2024)")]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-2"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[e._v("Conflict between columns in case of a self-join in the bootstrapper "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/786",target:"_blank",rel:"noopener"}},[e._v("#786"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Handling of casts for different versions of MySQL and MariaDB "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/787",target:"_blank",rel:"noopener"}},[e._v("#787"),n("OutboundLink")],1)])]),e._v(" "),n("p",[e._v("Several dependencies updated, including JQuery ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/780",target:"_blank",rel:"noopener"}},[e._v("#780"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("h2",{attrs:{id:"_5-1-1-november-22-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-1-november-22-2023"}},[e._v("#")]),e._v(" 5.1.1 (November 22, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-features-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-2"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Option to expose system tables added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/744",target:"_blank",rel:"noopener"}},[e._v("#744"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Standard deviation and variance functions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/735",target:"_blank",rel:"noopener"}},[e._v("#735"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Option to disable the registration of custom SPARQL aggregation functions "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/746",target:"_blank",rel:"noopener"}},[e._v("#746"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-3"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("p",[e._v("See "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/23?closed=1",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/milestone/23?closed=1"),n("OutboundLink")],1)]),e._v(" "),n("h2",{attrs:{id:"_5-1-0-august-15-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-0-august-15-2023"}},[e._v("#")]),e._v(" 5.1.0 (August 15, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-features-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-3"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for "),n("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#flattenlens"}},[e._v("flatten lenses")]),e._v(" added "),n("em",[e._v("(beta)")]),e._v(" "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/622",target:"_blank",rel:"noopener"}},[e._v("#622"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/625",target:"_blank",rel:"noopener"}},[e._v("#625"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/628",target:"_blank",rel:"noopener"}},[e._v("#628"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/629",target:"_blank",rel:"noopener"}},[e._v("#629"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/633",target:"_blank",rel:"noopener"}},[e._v("#633"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/635",target:"_blank",rel:"noopener"}},[e._v("#635"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/636",target:"_blank",rel:"noopener"}},[e._v("#636"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/637",target:"_blank",rel:"noopener"}},[e._v("#637"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/638",target:"_blank",rel:"noopener"}},[e._v("#638"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/639",target:"_blank",rel:"noopener"}},[e._v("#639"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/640",target:"_blank",rel:"noopener"}},[e._v("#640"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/641",target:"_blank",rel:"noopener"}},[e._v("#641"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/642",target:"_blank",rel:"noopener"}},[e._v("#642"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/643",target:"_blank",rel:"noopener"}},[e._v("#643"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/661",target:"_blank",rel:"noopener"}},[e._v("#661"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/715",target:"_blank",rel:"noopener"}},[e._v("#715"),n("OutboundLink")],1)],1),e._v(" "),n("li",[e._v("Support for "),n("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#unionlens"}},[e._v("union lenses")]),e._v(" added "),n("em",[e._v("(beta)")]),e._v(" "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/612",target:"_blank",rel:"noopener"}},[e._v("#612"),n("OutboundLink")],1)],1),e._v(" "),n("li",[e._v("Support for XSD cast functions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/630",target:"_blank",rel:"noopener"}},[e._v("#630"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for date-trunc and more date extraction functions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for a separate RDF file for facts added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/666",target:"_blank",rel:"noopener"}},[e._v("#666"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Options to ignore invalid mapping entries "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/631",target:"_blank",rel:"noopener"}},[e._v("#631"),n("OutboundLink")],1),e._v(" and lenses "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/709",target:"_blank",rel:"noopener"}},[e._v("#709"),n("OutboundLink")],1),e._v(" added")]),e._v(" "),n("li",[e._v("Partial support for regular expressions in SQL Server added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/702",target:"_blank",rel:"noopener"}},[e._v("#702"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for DynamoDB using the CData connector added "),n("em",[e._v("(beta)")]),e._v(" "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/693",target:"_blank",rel:"noopener"}},[e._v("#693"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"optimizations-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#optimizations-2"}},[e._v("#")]),e._v(" Optimizations")]),e._v(" "),n("ul",[n("li",[e._v("Upwards propagation of lens unique constraints added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/668",target:"_blank",rel:"noopener"}},[e._v("#668"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Left join optimizations:\n"),n("ul",[n("li",[e._v("Reducing left joins to inner joins when the right child has a left join "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/662",target:"_blank",rel:"noopener"}},[e._v("#662"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Merging left joins nested on the left "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/663",target:"_blank",rel:"noopener"}},[e._v("#663"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/686",target:"_blank",rel:"noopener"}},[e._v("#686"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Robustness to nullable joining columns "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/667",target:"_blank",rel:"noopener"}},[e._v("#667"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Pruning the right of a left join when not contributing")])])]),e._v(" "),n("li",[e._v("VALUES node decomposition added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/680",target:"_blank",rel:"noopener"}},[e._v("#680"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Functional dependency inference added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/681",target:"_blank",rel:"noopener"}},[e._v("#681"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Reduction of aggregation nodes with no aggregation functional terms to distinct added")]),e._v(" "),n("li",[e._v("Transitive closure of functional dependencies added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/732",target:"_blank",rel:"noopener"}},[e._v("#732"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"refactoring-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-2"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Substitutions refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/616",target:"_blank",rel:"noopener"}},[e._v("#616"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Typing for math operators added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/706",target:"_blank",rel:"noopener"}},[e._v("#706"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("QuotedIDFactory refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/644",target:"_blank",rel:"noopener"}},[e._v("#644"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Removal of non-required variables improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/669",target:"_blank",rel:"noopener"}},[e._v("#669"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for the STRING datatype for DuckDB added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/646",target:"_blank",rel:"noopener"}},[e._v("#646"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for SAMPLE at the database level added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/660",target:"_blank",rel:"noopener"}},[e._v("#660"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-4"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[e._v("Support LIMIT/OFFSET in SQL Server improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/676",target:"_blank",rel:"noopener"}},[e._v("#676"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/679",target:"_blank",rel:"noopener"}},[e._v("#679"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/682",target:"_blank",rel:"noopener"}},[e._v("#682"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/721",target:"_blank",rel:"noopener"}},[e._v("#721"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Extraction of unique constraints in Oracle made more consistent "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/695",target:"_blank",rel:"noopener"}},[e._v("#695"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Metadata extraction for DuckDB made more robust "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/687",target:"_blank",rel:"noopener"}},[e._v("#687"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Missing casts when using Bnode templates added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/657",target:"_blank",rel:"noopener"}},[e._v("#657"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Invalid SPARQL UNION translation fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/651",target:"_blank",rel:"noopener"}},[e._v("#651"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Empty results for CONSTRUCT queries with unions and different variables fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/652",target:"_blank",rel:"noopener"}},[e._v("#652"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"documentation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[e._v("#")]),e._v(" Documentation")]),e._v(" "),n("ul",[n("li",[e._v("Dedicated pages for each supported database (for instance "),n("a",{attrs:{href:"https://ontop-vkg.org/guide/databases/athena",target:"_blank",rel:"noopener"}},[e._v("AWS Athena"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/lenses/"}},[e._v("Tutorial about lenses")])],1),e._v(" "),n("li",[n("a",{attrs:{href:"/tutorial/materialization/materialization"}},[e._v("Tutorial about materialization")])])]),e._v(" "),n("h2",{attrs:{id:"_5-0-2-march-9-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-2-march-9-2023"}},[e._v("#")]),e._v(" 5.0.2 (March 9, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-features-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-4"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for Trino "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/599",target:"_blank",rel:"noopener"}},[e._v("#599"),n("OutboundLink")],1),e._v(", PrestoDB "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/601",target:"_blank",rel:"noopener"}},[e._v("#601"),n("OutboundLink")],1),e._v(", AWS Athena "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/602",target:"_blank",rel:"noopener"}},[e._v("#602"),n("OutboundLink")],1),e._v(", DuckDB "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/604",target:"_blank",rel:"noopener"}},[e._v("#604"),n("OutboundLink")],1),e._v(", AWS Redshift "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/605",target:"_blank",rel:"noopener"}},[e._v("#605"),n("OutboundLink")],1),e._v(" and Google BigQuery "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/615",target:"_blank",rel:"noopener"}},[e._v("#615"),n("OutboundLink")],1),e._v(" added")]),e._v(" "),n("li",[e._v("Declare some columns as IRI-safe in lenses "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/587",target:"_blank",rel:"noopener"}},[e._v("#587"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for arbitrary JDBC properties added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/606",target:"_blank",rel:"noopener"}},[e._v("#606"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bugfixes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Missing TLS cypher suite JRE modules added to the Docker image")]),e._v(" "),n("li",[e._v("More system schemas are now ignored in Oracle "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/591",target:"_blank",rel:"noopener"}},[e._v("#591"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"tooling"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[e._v("Scaffolding tool"),n("OutboundLink")],1),e._v(" created to make it easier to implement a new SQL dialect adapter.")])]),e._v(" "),n("h2",{attrs:{id:"_5-0-1-january-29-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-1-january-29-2023"}},[e._v("#")]),e._v(" 5.0.1 (January 29, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-feature"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-feature"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),n("ul",[n("li",[e._v("DB metadata extraction for MS Access added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/589",target:"_blank",rel:"noopener"}},[e._v("#589"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("JRE-embedded Ontop-Protégé bundles with Protégé-5.6.0-beta-2 are now provided")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-3"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Support for Spark SQL improved and tests added in the CI")]),e._v(" "),n("li",[e._v("All the tables (besides excluded ones) in Oracle are now extracted, not just the user's ones")])]),e._v(" "),n("p",[e._v("Several dependencies updated.")]),e._v(" "),n("h2",{attrs:{id:"_5-0-0-december-31-2022"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-0-december-31-2022"}},[e._v("#")]),e._v(" 5.0.0 (December 31, 2022)")]),e._v(" "),n("h4",{attrs:{id:"important-changes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#important-changes"}},[e._v("#")]),e._v(" Important changes")]),e._v(" "),n("ul",[n("li",[e._v("Java 11 or newer is required")]),e._v(" "),n("li",[e._v("Ontop's Protégé plugin now requires at least Protégé 5.6-beta")]),e._v(" "),n("li",[e._v("RDF4J bindings updated to 4.1.0")]),e._v(" "),n("li",[e._v("The module "),n("code",[e._v("ontop-owlapi")]),e._v(" is not published anymore. We recommend using "),n("code",[e._v("ontop-rdf4j")]),e._v(" instead")]),e._v(" "),n("li",[e._v("RDF4J workbench modules removed")]),e._v(" "),n("li",[e._v("Docker image moved to "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[n("code",[e._v("ontop/ontop")]),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Ontop views renamed "),n("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")])])]),e._v(" "),n("h4",{attrs:{id:"new-features-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-5"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for SPARQL rules for the extending the VKG added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/576",target:"_blank",rel:"noopener"}},[e._v("#576"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("The "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[e._v("Docker image"),n("OutboundLink")],1),e._v(" now also supported the ARM64 architecture and allows to run all the CLI commands "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/532",target:"_blank",rel:"noopener"}},[e._v("#532"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for Snowflake added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/520",target:"_blank",rel:"noopener"}},[e._v("#520"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for MariaDB added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/271",target:"_blank",rel:"noopener"}},[e._v("#271"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("N-Triples and N-quads are now supported by the SPARQL endpoint "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/566",target:"_blank",rel:"noopener"}},[e._v("#566"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Option to fully reformulate the SPARQL query into SQL added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/577",target:"_blank",rel:"noopener"}},[e._v("#577"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Experimental support for flatten lenses added (only for PostgreSQL)")])]),e._v(" "),n("h4",{attrs:{id:"new-optimizations"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-optimizations"}},[e._v("#")]),e._v(" New optimizations")]),e._v(" "),n("ul",[n("li",[e._v("Optimization of joins with a union of class definitions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/543",target:"_blank",rel:"noopener"}},[e._v("#543"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Optimizations for generic queries with limit added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/578",target:"_blank",rel:"noopener"}},[e._v("#578"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Optimization for queries retrieving all the properties or classes in use in the VKG added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/581",target:"_blank",rel:"noopener"}},[e._v("#581"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"refactoring-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-4"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("New module for testing dialects in the Github CI pipeline added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/568",target:"_blank",rel:"noopener"}},[e._v("#568"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("JSQLParser updated to 4.4")]),e._v(" "),n("li",[e._v("Ontop's Protégé plugin isolated from Ontop modules "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/278",target:"_blank",rel:"noopener"}},[e._v("#278"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for Databricks (Apache Spark) improved")])]),e._v(" "),n("p",[e._v("Many bugfixes. See also "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/16?closed=1",target:"_blank",rel:"noopener"}},[e._v("its milestone on Github"),n("OutboundLink")],1),e._v(".")]),e._v(" "),n("h2",{attrs:{id:"_4-2-2-november-18-2022"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-2-november-18-2022"}},[e._v("#")]),e._v(" 4.2.2 (November 18, 2022)")]),e._v(" "),n("h4",{attrs:{id:"new-features-6"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-6"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for Protege 5.6-beta under Java 11 and Java 17")]),e._v(" "),n("li",[e._v("Support for the Databricks-specific JDBC driver "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/554",target:"_blank",rel:"noopener"}},[e._v("#554"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for LIMIT/OFFSET in SQL Server 2008 "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/531",target:"_blank",rel:"noopener"}},[e._v("#531"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for materialized views in PostgreSQL "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/541",target:"_blank",rel:"noopener"}},[e._v("#541"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bugfixes-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-2"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("VALUES handling with Teiid "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/525",target:"_blank",rel:"noopener"}},[e._v("#525"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Metadata extraction for Dremio of schema names with dots")]),e._v(" "),n("li",[e._v("Typo in registration of Oracle factories "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/557",target:"_blank",rel:"noopener"}},[e._v("#557"),n("OutboundLink")],1)])]),e._v(" "),n("p",[e._v("Preventive update of dependencies including Jackson and Gson to address potential vulnerabilities.")]),e._v(" "),n("h2",{attrs:{id:"_4-2-1-april-20-2022"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-1-april-20-2022"}},[e._v("#")]),e._v(" 4.2.1 (April 20, 2022)")]),e._v(" "),n("h4",{attrs:{id:"new-feature-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-feature-2"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),n("ul",[n("li",[e._v("Support for partial serialized DB metadata, when "),n("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")]),e._v(" is enabled.")])]),e._v(" "),n("h4",{attrs:{id:"bugfixes-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-3"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Not renamed variable in sub-query with a distinct ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/417",target:"_blank",rel:"noopener"}},[e._v("#417"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("OBDA to R2RML conversion: require mapping entry IDs to be unique.")]),e._v(" "),n("li",[e._v("Lang tags for constants in R2RML were ignored.")]),e._v(" "),n("li",[e._v("Several fixes related to VALUES.")]),e._v(" "),n("li",[e._v("Better HTTP codes for the ontology download endpoint.")])]),e._v(" "),n("p",[e._v("The Jackson and Spring Boot dependencies have been preventively updated (to 2.13.2.2 and 2.6.6 respectively) to address potential vulnerabilities ("),n("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/CVE-2020-36518",target:"_blank",rel:"noopener"}},[e._v("CVE-2020-36518"),n("OutboundLink")],1),e._v(" and "),n("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/cve-2022-22965",target:"_blank",rel:"noopener"}},[e._v("CVE-2022-22965"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("h2",{attrs:{id:"_4-2-0-december-30-2021"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-0-december-30-2021"}},[e._v("#")]),e._v(" 4.2.0 (December 30, 2021)")]),e._v(" "),n("h4",{attrs:{id:"new-features-7"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-7"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for Apache Spark ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/422",target:"_blank",rel:"noopener"}},[e._v("#422"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Support for time functions added ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/478",target:"_blank",rel:"noopener"}},[e._v("#478"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Support for the "),n("code",[e._v("IN")]),e._v(" SPARQL function added.")]),e._v(" "),n("li",[e._v('Datatypes can be extracted from non-supported source queries in the mapping (treated internally as "black-box" views). Disabled by default (see '),n("a",{attrs:{href:"/guide/advanced/configuration"}},[n("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(").")]),e._v(" "),n("li",[e._v("TBox triples (e.g. sub-classes, domains and ranges) can be added to the default RDF graph. Disabled by default (see "),n("a",{attrs:{href:"/guide/advanced/configuration"}},[n("code",[e._v("ontop.enableFactExtractionWithTBox")])]),e._v(").")]),e._v(" "),n("li",[e._v("Support for "),n("a",{attrs:{href:"/guide/advanced/views"}},[e._v("Ontop join views")]),e._v(" added.")]),e._v(" "),n("li",[e._v("Support for arbitrary levels of Ontop views added (views over views).")]),e._v(" "),n("li",[e._v("Better integrity constraint extraction for Ontop basic and join views.")]),e._v(" "),n("li",[e._v("Non-null information can now be specified for Ontop views.")]),e._v(" "),n("li",[e._v("Support for b-node facts added.")]),e._v(" "),n("li",[e._v("The default query of the SPARQL endpoint portal is now configurable ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/454",target:"_blank",rel:"noopener"}},[e._v("#454"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Contextually injective IRI templates with numeric or UUID arguments are now decomposed ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/363",target:"_blank",rel:"noopener"}},[e._v("#363"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("JSON-LD serialization now supported by the materializer ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/481",target:"_blank",rel:"noopener"}},[e._v("#481"),n("OutboundLink")],1),e._v(").")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-5"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Support for Java >= 8. Ontop decoupled from Protégé so as to update several common libraries ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/467",target:"_blank",rel:"noopener"}},[e._v("#467"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v('RDF facts provided by the ontology file are now internally grouped together into values blocks (sorts of "in-memory tables") instead of being splitted into large unions. Enabled by default (see '),n("a",{attrs:{href:"/guide/advanced/configuration"}},[n("code",[e._v("ontop.enableValuesNode")])]),e._v(").")]),e._v(" "),n("li",[e._v("Unions are lifted above aggregations when possible.")]),e._v(" "),n("li",[e._v("Docker image updated to JRE 11.")]),e._v(" "),n("li",[e._v("Mutable intermediate queries are not used anymore.")]),e._v(" "),n("li",[e._v("Stronger handling of non well-designed "),n("code",[e._v("OPTIONAL")]),e._v(" blocks.")]),e._v(" "),n("li",[e._v("Stronger handling of "),n("code",[e._v("ORDER BY")]),e._v(" in sub-queries.")]),e._v(" "),n("li",[e._v("Type extractor relaxed ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/438",target:"_blank",rel:"noopener"}},[e._v("#438"),n("OutboundLink")],1),e._v(") to tolerate slightly different datatypes.")]),e._v(" "),n("li",[e._v("JDBC distinct result set removed.")]),e._v(" "),n("li",[e._v("JDBC user name and password are not required anymore. Useful when passed in the JDBC URL.")]),e._v(" "),n("li",[e._v("The Command-Line Interface of the bootstrapper has been refactored (invalid options removed, comments improved).")])]),e._v(" "),n("p",[e._v("Many bugfixes (see for instance "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/14?closed=1",target:"_blank",rel:"noopener"}},[e._v("our Github bugtracker"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("h2",{attrs:{id:"_4-1-1-july-23-2021"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-1-july-23-2021"}},[e._v("#")]),e._v(" 4.1.1 (July 23, 2021)")]),e._v(" "),n("h4",{attrs:{id:"bugfixes-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-4"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Bugs related to GeoSPARQL support ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/428",target:"_blank",rel:"noopener"}},[e._v("#428"),n("OutboundLink")],1),e._v(","),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/434",target:"_blank",rel:"noopener"}},[e._v("#434"),n("OutboundLink")],1),e._v(" )")]),e._v(" "),n("li",[e._v("Issue with ORDER BY and LIMIT for MS SQL ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/225",target:"_blank",rel:"noopener"}},[e._v("#225"),n("OutboundLink")],1),e._v(","),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/412",target:"_blank",rel:"noopener"}},[e._v("#412"),n("OutboundLink")],1),e._v(")")])]),e._v(" "),n("h4",{attrs:{id:"new-features-8"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-8"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Teiid support ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/336",target:"_blank",rel:"noopener"}},[e._v("#336"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Various improvements of the Protégé plugin")])]),e._v(" "),n("h2",{attrs:{id:"_4-1-0-february-28-2021"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-0-february-28-2021"}},[e._v("#")]),e._v(" 4.1.0 (February 28, 2021)")]),e._v(" "),n("h4",{attrs:{id:"changed-behavior"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"/guide%C3%A9cli#ontop-mapping-to-r2rml"}},[e._v("OBDA to R2RML mapping conversion")]),e._v(" now requires by default access to DB metadata (through credentials or as a serialized file). This requirement can be bypassed with the argument "),n("code",[e._v("--force")]),e._v(".")]),e._v(" "),n("li",[e._v("By default, DESCRIBE queries only return the triples where the described IRI appears as subject. To also consider the triples where it appears as object, set the parameter "),n("code",[e._v("ontop.includeFixedObjectPositionInDescribe")]),e._v(" to true.")]),e._v(" "),n("li",[e._v("The Docker endpoint image is now based on Debian ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/394",target:"_blank",rel:"noopener"}},[e._v("#394"),n("OutboundLink")],1),e._v("), not on Alpine anymore.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-9"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-9"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for GeoSPARQL functions added ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/335",target:"_blank",rel:"noopener"}},[e._v("#335"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[n("a",{attrs:{href:"/guide/advanced/logging"}},[e._v("Rich JSON-based query logging")]),e._v(" added.")]),e._v(" "),n("li",[n("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("New endpoint for predefined queries")]),e._v(" added (beta). It enables the specification of custom low-latency Web APIs in a declarative manner.")]),e._v(" "),n("li",[e._v("Support for the "),n("code",[e._v("IF")]),e._v(", "),n("code",[e._v("IRI")]),e._v(", "),n("code",[e._v("BNODE")]),e._v(" SPARQL functions added.")]),e._v(" "),n("li",[e._v("Support for Dremio added.")]),e._v(" "),n("li",[e._v("DB metadata can now be loaded from files instead of connecting to the database.")]),e._v(" "),n("li",[e._v("Bnode labels are now anonymized on-the-fly. Bnode templates can safely use PII.")]),e._v(" "),n("li",[e._v("Sensitive JDBC information (user name, password, URL) can now be passed as arguments or environment variables (for Docker) instead of being written in the properties file. Docker secrets are also supported for further security.")]),e._v(" "),n("li",[e._v("New left join optimization techniques added. General functional dependencies are now taken into account. Sensitivity to left join ordering reduced.")]),e._v(" "),n("li",[n("a",{attrs:{href:"/guide/advanced/caching"}},[e._v("HTTP caching")]),e._v(" headers can now be returned by the Ontop SPARQL endpoint.")]),e._v(" "),n("li",[e._v("Native Protégé bundles for each platform (Windows, MacOS, Linux) with JRE 8 embedded.")]),e._v(" "),n("li",[e._v("Basic support for Ontop views added (experimental), which, in particular, allows specifying integrity constraints on views defined at the Ontop level.")])]),e._v(" "),n("h4",{attrs:{id:"removal"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#removal"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),n("ul",[n("li",[e._v("As announced earlier, the RDF4J Workbench-based bundles are not shipped anymore. However, the webapps war file can still be built with Maven.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-6"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-6"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Drastic reduction of memory consumption when processing SPARQL queries ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/370",target:"_blank",rel:"noopener"}},[e._v("#370"),n("OutboundLink")],1),e._v("), which is significant for materializing large RDF graphs.")]),e._v(" "),n("li",[e._v("Better file resource handling ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/368",target:"_blank",rel:"noopener"}},[e._v("#368"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Distinct lifting improved.")]),e._v(" "),n("li",[e._v("Self-join elimination based on functional dependencies re-implemented.")]),e._v(" "),n("li",[e._v("Decomposition of heterogeneous IRI templates enabled.")]),e._v(" "),n("li",[e._v("Lexical value space is now considered when decomposing IRIs.")]),e._v(" "),n("li",[e._v("Protégé plugin codebase cleaned, with parts of UI streamlined and redesigned. Improved syntax highlighting in target and source queries. Mapping validation extended. Multiple open ontologies supported ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/282",target:"_blank",rel:"noopener"}},[e._v("#282"),n("OutboundLink")],1),e._v(" and "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/175",target:"_blank",rel:"noopener"}},[e._v("#175"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("RDF4J external binding management refactored.")]),e._v(" "),n("li",[e._v("Bnode handling refactored.")]),e._v(" "),n("li",[e._v("Java 11 support.")]),e._v(" "),n("li",[e._v("Better handling of column names when converting OBDA mappings into R2RML, which now uses DB metadata.")]),e._v(" "),n("li",[e._v("CONSTRUCT and DESCRIBE query handling refactored.")]),e._v(" "),n("li",[e._v("Parser for OBDA mappings refactored.")]),e._v(" "),n("li",[e._v("Character encoding in R2RML templates refactored.")]),e._v(" "),n("li",[e._v("Default file encoding set to UTF-8. Particularly useful on Windows. Can be overridden if needed.")]),e._v(" "),n("li",[n("a",{attrs:{href:"/dev/build"}},[e._v("Build script")]),e._v(" refactored. Now fully based on Maven ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/393",target:"_blank",rel:"noopener"}},[e._v("#393"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Base Docker image updated.")]),e._v(" "),n("li",[e._v("PostgreSQL transaction handling (in streaming mode) improved.")]),e._v(" "),n("li",[e._v("Timeout support extended to non-SELECT queries.")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_4-0-3-october-16-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-3-october-16-2020"}},[e._v("#")]),e._v(" 4.0.3 (October 16, 2020)")]),e._v(" "),n("h4",{attrs:{id:"bugfixes-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-5"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Wrong IRI decomposition ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/358",target:"_blank",rel:"noopener"}},[e._v("#358"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Logback config file ignored by Ontop CLI ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/361",target:"_blank",rel:"noopener"}},[e._v("#361"),n("OutboundLink")],1),e._v(")")])]),e._v(" "),n("h2",{attrs:{id:"_4-0-2-september-3-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-2-september-3-2020"}},[e._v("#")]),e._v(" 4.0.2 (September 3, 2020)")]),e._v(" "),n("ul",[n("li",[e._v("Fixed Named Graphs (quad) grammar in the target of the Ontop native mapping language.")])]),e._v(" "),n("h2",{attrs:{id:"_4-0-1-august-28-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-1-august-28-2020"}},[e._v("#")]),e._v(" 4.0.1 (August 28, 2020)")]),e._v(" "),n("h4",{attrs:{id:"new-features-and-bugfixes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-and-bugfixes"}},[e._v("#")]),e._v(" New features and bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Named Graphs (quad) are supported in materialization ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/343",target:"_blank",rel:"noopener"}},[e._v("#343"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Removal of Jena as a dependency ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/349",target:"_blank",rel:"noopener"}},[e._v("#349"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[n("code",[e._v("com.mysql.cj.jdbc.Driver")]),e._v(" is now also recognized. Non-recognized drivers now use the default SQL factories instead of the mock-up one.")])]),e._v(" "),n("h2",{attrs:{id:"_4-0-0-july-31-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-july-31-2020"}},[e._v("#")]),e._v(" 4.0.0 (July 31, 2020)")]),e._v(" "),n("h4",{attrs:{id:"refactoring-7"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-7"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Dependencies updated (e.g. RDF4J 3.3.0)")]),e._v(" "),n("li",[e._v("SERIAL datatypes of PostgreSQL better handled")]),e._v(" "),n("li",[e._v("Anonymous blank nodes are now supported in CONSTRUCT blocks")]),e._v(" "),n("li",[e._v("JSON-LD now supported for graph queries")]),e._v(" "),n("li",[e._v("Denodo support improved.")])]),e._v(" "),n("p",[e._v("Few bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_4-0-0-rc-1-july-8-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-rc-1-july-8-2020"}},[e._v("#")]),e._v(" 4.0.0-rc-1 (July 8, 2020)")]),e._v(" "),n("h4",{attrs:{id:"changed-behavior-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior-2"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),n("ul",[n("li",[e._v("Streaming mode is enabled by default for query answering. It fetches data by batches of 500 results.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-10"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-10"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support of GROUP_CONCAT added. All the standard SPARQL aggregation functions are now supported.")]),e._v(" "),n("li",[e._v("Named graphs are now supported.")]),e._v(" "),n("li",[e._v("Support of Denodo added. Support of Dremio is postponed to 4.1.")]),e._v(" "),n("li",[e._v("Support XML catalog file added (beta). It enables resolving "),n("code",[e._v("owl:imports")]),e._v(" assertions from the ontology by loading local files instead of fetching remote URLs. It is available in Protégé and with the "),n("code",[e._v("ontop endpoint")]),e._v(" CLI command.")]),e._v(" "),n("li",[e._v("DB metadata extraction CLI command added (experimental).")]),e._v(" "),n("li",[e._v("CASE and CAST is now supported in the mapping.")]),e._v(" "),n("li",[e._v("Streaming mode for query answering added.")])]),e._v(" "),n("h4",{attrs:{id:"deprecation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deprecation"}},[e._v("#")]),e._v(" Deprecation")]),e._v(" "),n("ul",[n("li",[e._v("The RDF4J Workbench-based SPARQL endpint is deprecated. Tomcat, Jetty bundles and webapps (.war files) will be removed in a future version. Users are recommended to switch to the "),n("code",[e._v("ontop endpoint")]),e._v(" CLI or its Docker image.")])]),e._v(" "),n("h4",{attrs:{id:"removal-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#removal-2"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),n("ul",[n("li",[e._v("The Mapping Assistant panel has been removed from the Ontop Protégé plugin.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-8"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-8"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("SQL parsing of the mapping improved. JSQLParser's version has been updated.")]),e._v(" "),n("li",[e._v("Metadata extraction refactored, and SQLDialectAdapter has been eliminated.")]),e._v(" "),n("li",[e._v("Meta-mapping management improved.")]),e._v(" "),n("li",[e._v("Non-recognized SQL functions in the mapping are now only assumed to be deterministic. Other assumptions have been removed.")]),e._v(" "),n("li",[e._v("Internal data nodes now create variables only for database columns that are used in the query. This sparse usage of variables strongly improve reformulation time and log readibility when using tables with 100+ columns in the mapping.")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_4-0-0-beta-1-december-23-2019"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-beta-1-december-23-2019"}},[e._v("#")]),e._v(" 4.0.0-beta-1 (December 23, 2019)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviors"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),n("ul",[n("li",[e._v("Cardinality is now enforced by default (duplicates are removed at\nthe mapping level). This is required to support most of the\naggregation functions.")]),e._v(" "),n("li",[e._v("Functions in the SQL queries of the mapping that are unknown to\nOntop do no cause the creation of SQL views anymore. The strategy\nregarding SQL functions moved from white-list to black-list.")]),e._v(" "),n("li",[e._v("Types returned by supported SPARQL functions now strictly follow the\nSPARQL 1.1 specification.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-11"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-11"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("SPARQL Aggregation functions SUM, COUNT, AVG, MIN, MAX are now\nsupported. SAMPLE is currently implemented as MIN.")]),e._v(" "),n("li",[e._v("Joins over terms that are constructed using different functions are\nnow supported.")]),e._v(" "),n("li",[e._v("Some functions (such as IRI templates) can now be post-processed\n(that is, they are not always included in the SQL query anymore).\nGenerated SQL queries are generally less verbose than before.")]),e._v(" "),n("li",[e._v("The Ontop endpoint now has the portal option, where predefined\nqueries are shown in the Web interface.")]),e._v(" "),n("li",[e._v("The NULLIF SQL function is now supported and optimized. Useful for\nfiltering out some unwanted values in the mapping assertions.")]),e._v(" "),n("li",[e._v("OPTIONALs outside the well-designed fragment are now supported.\nWeakly well-designed queries encoding preferences are optimized.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-9"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-9"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("The typing system have been entirely redesigned. RDF types and\ndatabase types are now clearly separated. Each database engine can\nnow bring in its own data types.")]),e._v(" "),n("li",[e._v("The Datalog data structure (from version 1.x) for representing\nqueries internally has been removed.")]),e._v(" "),n("li",[e._v("Function symbol creation and optimization has been entirely\nrefactored. They are constructed by two factories, the\nFunctionSymbolFactory and the DBFunctionSymbolFactory.")]),e._v(" "),n("li",[e._v("Most of the logic of SQLDialectAdapter has been moved to\nDBFunctionSymbolFactory and DBTypeFactory. Each database engine is\nexpected to have its own implementation of these new interfaces.")]),e._v(" "),n("li",[e._v("The SPARQL translation has been rewritten (was formerly translating\ninto Datalog).")]),e._v(" "),n("li",[e._v("The SQL generator has been rewritten (was formerly translating from\nDatalog).")])]),e._v(" "),n("h4",{attrs:{id:"temporary-limitation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#temporary-limitation"}},[e._v("#")]),e._v(" Temporary limitation")]),e._v(" "),n("ul",[n("li",[e._v("Due to a complete refactoring of the SQL dialect management, only\nthe H2, MySQL, PostgreSQL, Oracle, SQL server and DB2 dialects are\nsupported in this beta. Dremio and Denodo dialects are expected to\nbe supported in a next beta release.")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_3-0-1-december-9-2019"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-1-december-9-2019"}},[e._v("#")]),e._v(" 3.0.1 (December 9, 2019)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviors-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-2"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),n("ul",[n("li",[e._v("Protégé: no property file (resp. mapping file) is created if no data\nsource (resp. mapping assertion) is specified by the user.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-12"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-12"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Ontop endpoint now supports R2RML files and doesn't require an\nontology.")]),e._v(" "),n("li",[e._v("Materialization: N-triples format is now supported.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-10"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-10"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Rewriting of the tree-witness rewriter (now independent from\nDatalog)")])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-5"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[e._v("Protégé: fixed issues related to prefix management.")]),e._v(" "),n("li",[e._v("Reasoning: issue related to the handling of inverse properties\nfixed.")])]),e._v(" "),n("h2",{attrs:{id:"_3-0-0-august-23-2019"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-august-23-2019"}},[e._v("#")]),e._v(" 3.0.0 (August 23, 2019)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviors-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-3"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),n("ul",[n("li",[e._v("The `rdfs:range` of a data property is not used anymore for\ninferring the non-specified datatype in a mapping assertion but for\nvalidating the datatype once specified or inferred. Datatype\ninference is now based on the DB datatype and follows the R2RML\nnatural mapping (https://www.w3.org/TR/r2rml/#natural-mapping)")])]),e._v(" "),n("h4",{attrs:{id:"new-features-13"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-13"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support of Protege 5.5")]),e._v(" "),n("li",[e._v("Support of BNode in R2RML")]),e._v(" "),n("li",[e._v("Basic support for the `geo:wktLiteral` datatype (#256)")]),e._v(" "),n("li",[e._v("New command-line interface for SPARQL endpoint")]),e._v(" "),n("li",[e._v("Docker container for SPARQL endpoint\n(https://hub.docker.com/r/ontop/ontop-endpoint)")]),e._v(" "),n("li",[e._v("Preliminary support of Dremio")]),e._v(" "),n("li",[e._v("Preliminary support of Denodo")]),e._v(" "),n("li",[e._v("The ordering of SPARQL variables is now preserved (#291)")]),e._v(" "),n("li",[e._v("N-Triples output for materialization added")]),e._v(" "),n("li",[e._v("The SQL translation now appears as a sub-tab in the Protégé Ontop\nSPARQL tab")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-11"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-11"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("The triple predicate is now systematically used in the mapping and\nduring query unfolding")]),e._v(" "),n("li",[e._v("Atom predicates and function symbols are now clearly distinguished")]),e._v(" "),n("li",[e._v("The Datalog-based data structure is not used anymore at mapping\nprocessing time and by the default rewriter")]),e._v(" "),n("li",[e._v("Query containment-based optimizations applied to the mapping after\nsaturation improved")]),e._v(" "),n("li",[e._v("The materializer is now based on RDF4J (instead of OWLAPI)")])]),e._v(" "),n("h4",{attrs:{id:"project-organisation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#project-organisation"}},[e._v("#")]),e._v(" Project organisation")]),e._v(" "),n("ul",[n("li",[e._v("Release of Ontop on both SourceForge and GitHub (#274)")]),e._v(" "),n("li",[e._v("A new repository for the tutorial\n(https://github.com/ontop/ontop-tutorial)")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_3-0-0-beta-2-february-28-2018"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-2-february-28-2018"}},[e._v("#")]),e._v(" 3.0.0-beta-2 (February 28, 2018)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviours"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),n("ul",[n("li",[e._v("The JDBC driver class name is now required in Protégé (issue #248)")])]),e._v(" "),n("h4",{attrs:{id:"new-features-14"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-14"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Novel left join optimization techniques (issue #230)")]),e._v(" "),n("li",[e._v("LIMIT appended to test SQL queries and SPARQL queries in Protégé")]),e._v(" "),n("li",[e._v("Report illegal usage of Fully qualified column names (FQDN) in the\ntarget part of a mapping assertion")]),e._v(" "),n("li",[e._v("Support for the SPARQL isNumeric function")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-12"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-12"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Internal representation of the ontology improved")]),e._v(" "),n("li",[e._v("Improvement of the intermediate query representation (issues #235,\n#236)")]),e._v(" "),n("li",[e._v("Switch to ANTLR4 to parse ontop native mapping (issues #238, #239)")]),e._v(" "),n("li",[e._v("Make ResultSet.next() robust (issue #219)")]),e._v(" "),n("li",[e._v("More robust handling of IRI-safe encoding (issue #245)")])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-6"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-6"}},[e._v("#")]),e._v(" Bug Fixes")]),e._v(" "),n("p",[e._v("Many, see "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/7?closed=1",target:"_blank",rel:"noopener"}},[e._v("closed issues"),n("OutboundLink")],1),e._v(".")]),e._v(" "),n("h2",{attrs:{id:"_3-0-0-beta-1-august-11-2017"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-1-august-11-2017"}},[e._v("#")]),e._v(" 3.0.0-beta-1 (August 11, 2017)")]),e._v(" "),n("p",[e._v("Note that this is the first release from version 3 series with many\ninternal refactoring and improvements, and bug fixes. However, these\nchanges also cause incompatibility with Ontop v1. See "),n("a",{attrs:{href:"MigrationGuideV1toV3",title:"wikilink"}},[e._v("the migration\nguide")]),e._v(".")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviours-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours-2"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),n("ul",[n("li",[e._v("JDBC connection information is stored in a separate properties file")]),e._v(" "),n("li",[e._v("Fully qualified columns (table.column) are not allowed in the target\npart of the mapping language. One has to explicitly create an alias\n(e.g. table.column AS table_column) and use the alias in the\ntarget. (complying with R2RML)")]),e._v(" "),n("li",[e._v("The rules for datatype type inference and checking are changed. Now\nwe use only mapping and database to infer the datatypes (complying\nwith R2RML), and the (range axioms) in the ontologies to check the\ncompatibility (complying with OWL).")])]),e._v(" "),n("h4",{attrs:{id:"new-features-15"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-15"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Major refactoring of the internal structure of the Ontop system")]),e._v(" "),n("li",[e._v("Databases for Integration Tests have been dockerized.")]),e._v(" "),n("li",[e._v("Upgrade Sesame to the latest version of RDF4J (v2.2.2).")]),e._v(" "),n("li",[e._v("The redesigned OWLAPI and RDF4J API bindings of Ontop API (see\nexamples: "),n("a",{attrs:{href:"https://github.com/ontop/ontop-api-examples",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop-api-examples"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Upgrade of R2RML API to v0.6.0")]),e._v(" "),n("li",[e._v("Official support of both Tomcat and Jetty (v9) for deploying a\nSPARQL endpoint")]),e._v(" "),n("li",[e._v("Better support of Optional (bugfix #190)")]),e._v(" "),n("li",[e._v('Protege: support for "Synchronize Reasoner" in the Reasoner menu')]),e._v(" "),n("li",[e._v("Improved error messages for incorrect mapping")]),e._v(" "),n("li",[e._v("CLI tool for converting Mapping from v1 to v3")])]),e._v(" "),n("h2",{attrs:{id:"_1-18-1-june-16-2017"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-1-june-16-2017"}},[e._v("#")]),e._v(" 1.18.1 (June 16, 2017)")]),e._v(" "),n("ul",[n("li",[n("p",[e._v("Return a correct extension for files in ontop cli materializer\n(issue #145)")])]),e._v(" "),n("li",[n("p",[e._v("Materialize support non-http resource uris")])]),e._v(" "),n("li",[n("p",[e._v("Bug Fixes")]),e._v(" "),n("ul",[n("li",[e._v("Small fixes in cli (issues #127, #141, #188)")]),e._v(" "),n("li",[e._v("PostgreSQL JDBC driver fix for quotation marks")]),e._v(" "),n("li",[e._v("Remove unknown property warning for owl:sameAs")]),e._v(" "),n("li",[e._v("Remove duplicate annotations during materialization (issues\n#183 #186)")]),e._v(" "),n("li",[e._v("Generate different file names for properties and classes during\nmaterialization with separate files (issue #165)")]),e._v(" "),n("li",[e._v("R2RML\n"),n("ul",[n("li",[e._v("Small changes in api")]),e._v(" "),n("li",[e._v("Fix R2RML import of SQL query (issues #181 #182)")]),e._v(" "),n("li",[e._v("Fix export from OBDA mapping to R2RML (issues #158 #159\n#160)")])])]),e._v(" "),n("li",[e._v("Fix in SPARQL use of filter and values with a IRI (issue #191)")]),e._v(" "),n("li",[e._v("Fix handling of mysql metadata with lower_case_table_names\nsetting on (issue #192)")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-18-0-may-26-2016"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-0-may-26-2016"}},[e._v("#")]),e._v(" 1.18.0 (May 26, 2016)")]),e._v(" "),n("ul",[n("li",[e._v("Protege\n"),n("ul",[n("li",[e._v("Redesigned materialization gui")]),e._v(" "),n("li",[e._v("Upgrade to Protege 5.0.0")])])]),e._v(" "),n("li",[e._v("Support of querying annotation property from ontology (issue #105)\n(disabled by default)")]),e._v(" "),n("li",[e._v("Support of the use of owl:sameAs in mappings (disabled by default)")]),e._v(" "),n("li",[e._v("Package names have been unified to it.unibz.inf.ontop")]),e._v(" "),n("li",[e._v("Upgrade OWLAPI to v4.2.5")]),e._v(" "),n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Fix obda-to-r2rml convert for template like <{uri}> (issue\n#97)")]),e._v(" "),n("li",[e._v("Fix an issue in Protege when renaming data source.")]),e._v(" "),n("li",[e._v("Fix error messages in protege mapping assistant panel and SPARQL\nquery")]),e._v(" "),n("li",[e._v("Fix issue with multiple schemas (issue #99)")]),e._v(" "),n("li",[e._v("Fix internal SQL conversion for Teiid jdbc driver")]),e._v(" "),n("li",[e._v("Fix support of anonymous ontology (issue #101)")]),e._v(" "),n("li",[e._v("Fix warning message in Protege (issue #102)")]),e._v(" "),n("li",[e._v("Fix xml uri (issue #104)")]),e._v(" "),n("li",[e._v("Fix r2rml api, error predicateMap with template (issue #107)")]),e._v(" "),n("li",[e._v("Fix in Protege import of additional ontology and add classes and\nproperties of imported ontologies at runtime (issues #106\n#108)")]),e._v(" "),n("li",[e._v("Fix querying URI constants (issue #111)")]),e._v(" "),n("li",[e._v("Fix error message creating new mapping (issue #120)")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-17-1-february-16-2016"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-1-february-16-2016"}},[e._v("#")]),e._v(" 1.17.1 (February 16, 2016)")]),e._v(" "),n("ul",[n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Fix an issue when creating new datasource in Protege")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-17-0-february-4-2016"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-0-february-4-2016"}},[e._v("#")]),e._v(" 1.17.0 (February 4, 2016)")]),e._v(" "),n("ul",[n("li",[e._v("Protege\n"),n("ul",[n("li",[e._v("Ontop protege plugin now available on official Protege Plugin\nRepository!")]),e._v(" "),n("li",[e._v("Upgrade Protege to 5.0.0-beta-21 (latest version)")]),e._v(" "),n("li",[e._v("Ontop protege plugin is packed as one jar now -- no need for\nseparated OSGI JDBC configuration jars")]),e._v(" "),n("li",[e._v("do not generate .obda and .q file when no datasource is present")]),e._v(" "),n("li",[e._v("General improvement of UI -- more intuitive and less confusion")])])]),e._v(" "),n("li",[e._v("Support for Annotation Properties in mappings")]),e._v(" "),n("li",[e._v("Improvement of Ontop mapping language for URIs/Literals retrieved\nfrom DB columns")]),e._v(" "),n("li",[e._v("Support for SPARQL VALUES keyword for SPARQL federation")]),e._v(" "),n("li",[e._v("Java 8")]),e._v(" "),n("li",[e._v("Upgrade OWLAPI to v4.1.3 (latest version)")]),e._v(" "),n("li",[e._v("Bash Completion for command line interface")]),e._v(" "),n("li",[e._v("Better structured Wiki: "),n("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/wiki"),n("OutboundLink")],1)])]),e._v(" "),n("h2",{attrs:{id:"_1-16-1-november-16-2015"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-1-november-16-2015"}},[e._v("#")]),e._v(" 1.16.1 (November 16, 2015)")]),e._v(" "),n("ul",[n("li",[e._v("Optimizations exploiting foreign key constraints over multiple\ncolumns")]),e._v(" "),n("li",[e._v("Improvement in the RDB2RDF compliance test (contributed by Evren\nSrin)")])]),e._v(" "),n("h2",{attrs:{id:"_1-16-0-october-14-2015"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-0-october-14-2015"}},[e._v("#")]),e._v(" 1.16.0 (October 14, 2015)")]),e._v(" "),n("ul",[n("li",[e._v("Support for "),n("a",{attrs:{href:"OntopSPARQLFunctions",title:"wikilink"}},[e._v(" SPARQL functions ")])]),e._v(" "),n("li",[e._v("Support for column oriented RDBMS "),n("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v("\nMonetDB")])]),e._v(" "),n("li",[e._v("Support for cloud RDBMS "),n("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v(" SAP HANA")])]),e._v(" "),n("li",[e._v("New Optimization technique: "),n("a",{attrs:{href:"Implicit-database-constraints",title:"wikilink"}},[e._v("\nImplicit-database-constraints")])]),e._v(" "),n("li",[e._v("New Optimization technique: "),n("a",{attrs:{href:"Exact-Mappings",title:"wikilink"}},[e._v("\nExact-Mappings")])]),e._v(" "),n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Handling quotes in the WHERE clause of SQL query in mappings .")]),e._v(" "),n("li",[e._v("Allow multiple subjects in the target of mapping of Ontop native\nsyntax.")]),e._v(" "),n("li",[e._v("Return correct value from datetime columns using jtds driver")]),e._v(" "),n("li",[e._v("Fix the translation of LIMIT with ORDER BY in oracle database")]),e._v(" "),n("li",[e._v("Fix a bug in MetaMappingExpander")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-15-0-may-13-2015"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-15-0-may-13-2015"}},[e._v("#")]),e._v(" 1.15.0 (May 13, 2015)")]),e._v(" "),n("ul",[n("li",[e._v("Upgrade the Protege plugin to Protégé 5")]),e._v(" "),n("li",[e._v("New Command line interface")]),e._v(" "),n("li",[e._v("Better support for SPARQL BIND")]),e._v(" "),n("li",[e._v("Support for SPARQL Concat and Replace")]),e._v(" "),n("li",[e._v("Support for SQL Concat and Replace (in the mappings)")]),e._v(" "),n("li",[e._v("Support for xsd:dateTimeStamp")]),e._v(" "),n("li",[e._v("Improved Optimization techniques (Contribution by Roman Konchakov)")]),e._v(" "),n("li",[e._v("Implementation of Autoclosable interface for core classes in the API\nto support `try with resource`.")]),e._v(" "),n("li",[e._v("Create a sub-query when SELECT DISTINCT is used in the mappings.")]),e._v(" "),n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Handle the 30-characters limit for variable names in Oracle.")]),e._v(" "),n("li",[e._v("Fix the mapping render of Protege when multiple subjects are in\nthe target of mapping.")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-14-0-november-4-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-14-0-november-4-2014"}},[e._v("#")]),e._v(" 1.14.0 (November 4, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Added support in ontology and mappings for datatypes xsd:int,\nxsd:long, xsd:positiveInteger, xsd:negativeInteger,\nxsd:nonPositiveInteger, xsd:nonNegativeInteger, xsd:float")]),e._v(" "),n("li",[e._v("Optimized implementations of TBox classifications, and query\ncontainment checking, which are much faster than before")]),e._v(" "),n("li",[e._v("Validation for Sesame Workbench made stronger. It prevents\nrepositories with an invalid configuration to be created.")]),e._v(" "),n("li",[e._v("Bug Fixes:\n"),n("ul",[n("li",[e._v("Fix SPARQL functions (str(), lang()) to use rdfs:Literal instead\nof xsd:string")]),e._v(" "),n("li",[e._v("Issue converting datatypes of R2RML constants")]),e._v(" "),n("li",[e._v("Support UNICODE characters in TurtleParser")]),e._v(" "),n("li",[e._v("Catch exceptions for Protege R2RML Export")]),e._v(" "),n("li",[e._v("Fix conversion from ontop mappings to R2RML of language tag and\ntriples")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-13-1-september-29-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-1-september-29-2014"}},[e._v("#")]),e._v(" 1.13.1 (September 29, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Bug Fixes:\n"),n("ul",[n("li",[e._v("The redundant query elimination optimization sometimes does not\nhandle facts properly")]),e._v(" "),n("li",[e._v("Some warning messages related to datatype range axioms are\nambiguous")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-13-0-september-25-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-0-september-25-2014"}},[e._v("#")]),e._v(" 1.13.0 (September 25, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Support for providing implicit DB Constraints (e.g. foreign keys) to\nOntop to generate efficient SQL")]),e._v(" "),n("li",[e._v("Command line feature to generate pretty R2RML")]),e._v(" "),n("li",[e._v("Stream output in the Protege Plugin")]),e._v(" "),n("li",[e._v("Support for Regex in mappings")]),e._v(" "),n("li",[e._v("Proper handling of datatypes in ontology and mappings")]),e._v(" "),n("li",[e._v("Support for hsql database")]),e._v(" "),n("li",[e._v("Support for datatypes xsd:date, xsd:time and xsd:gYear")]),e._v(" "),n("li",[e._v("Bug Fixes:\n"),n("ul",[n("li",[e._v("Issue with nested equivalences in unfolder")]),e._v(" "),n("li",[e._v("Problem with multiple join conditions in R2RML")]),e._v(" "),n("li",[e._v("Cancelling running queries in Protege")]),e._v(" "),n("li",[e._v("Blank lines in generated sql causes problems for oracle")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-12-0-june-26-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-0-june-26-2014"}},[e._v("#")]),e._v(" 1.12.0 (June 26, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Support for finding empty concepts and properties")]),e._v(" "),n("li",[e._v("Integration with a new R2RML API")]),e._v(" "),n("li",[e._v("Less restrictive mode for JDBC driver validation")]),e._v(" "),n("li",[e._v("Faster TBox reasoner implementation")]),e._v(" "),n("li",[e._v('Optional "Replace" Statement in the SQL translation. When\n"Replace" is off the SQL performs much better.')]),e._v(" "),n("li",[e._v("Several Bug Fixes:\n"),n("ul",[n("li",[e._v("Issue with 'true' in Oracle")]),e._v(" "),n("li",[e._v("Meta-mapping editing in Protege")]),e._v(" "),n("li",[e._v("Problem with regex in Oracle")]),e._v(" "),n("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-11-0-february-19-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-11-0-february-19-2014"}},[e._v("#")]),e._v(" 1.11.0 (February 19, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Support for Consistency Checking")]),e._v(" "),n("li",[e._v("Improved Performance")]),e._v(" "),n("li",[e._v("Support for Multi-schema queries")]),e._v(" "),n("li",[e._v("New SQL parser for the mapping based on JSQLParser.")]),e._v(" "),n("li",[e._v("Extended the supported SQL language: IN, BETWEEN, LIKE, etc.")]),e._v(" "),n("li",[e._v("Extended the supported SPARQL: BIND")]),e._v(" "),n("li",[e._v("Improved the Treewitness rewriting algorithm.")]),e._v(" "),n("li",[e._v("Upgraded to Sesame 2.7.10")]),e._v(" "),n("li",[e._v("General clean-up")]),e._v(" "),n("li",[e._v("Fixed a number of bugs:\n"),n("ul",[n("li",[e._v("Translation of SAPRQL REGEX into SQL")]),e._v(" "),n("li",[e._v("Infinite loop triggered by some nested Optionals")]),e._v(" "),n("li",[e._v("Several issues with Construct")]),e._v(" "),n("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-10-0-december-16-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-10-0-december-16-2013"}},[e._v("#")]),e._v(" 1.10.0 (December 16, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Ontop under Apache license")]),e._v(" "),n("li",[e._v("Ontop packages in central maven repository")])]),e._v(" "),n("h2",{attrs:{id:"_1-9-0-september-18-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-9-0-september-18-2013"}},[e._v("#")]),e._v(" 1.9.0 (September 18, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Update to Sesame 2.7.6 (latest)")]),e._v(" "),n("li",[e._v("Validation of datatypes w.r.t. XMLSchema specification")]),e._v(" "),n("li",[e._v("New hybrid Abox functionality support")]),e._v(" "),n("li",[e._v("Removed all dependencies to Jena")]),e._v(" "),n("li",[e._v("Removed wrong/unnecessary dependencies")]),e._v(" "),n("li",[e._v("Turtle parser can handle variables in the predicate")]),e._v(" "),n("li",[e._v("Mappings with URI templates in class or properties suppot")]),e._v(" "),n("li",[e._v("First version of mapping splitter")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception when the URI in Protege plugin was\nempty")]),e._v(" "),n("li",[e._v("Bug fix: Literal and literal with language tag handling")]),e._v(" "),n("li",[e._v("Bug fix: Shutdown of Sesame repoConnection")]),e._v(" "),n("li",[e._v("Bug fix: Object column literal gerenation in R2RML")]),e._v(" "),n("li",[e._v("Bug fix: Queries that would not finish execution")]),e._v(" "),n("li",[e._v("Bug fix: Unexpected bindings in unfolder")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception in ontology translation in the case\nof unsupported axiom")]),e._v(" "),n("li",[e._v("Bug fix: OWL class assertion generation, inverted arguments")]),e._v(" "),n("li",[e._v("Bug fix: SameTerm in sparql algebra to datalog translation")]),e._v(" "),n("li",[e._v("Bug fix: URI template matcher to find most specific matches first")]),e._v(" "),n("li",[e._v("Bug fix: Construct queries")]),e._v(" "),n("li",[e._v("Bug fix: Describe queries")])]),e._v(" "),n("h2",{attrs:{id:"_1-8-0-july-29-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-8-0-july-29-2013"}},[e._v("#")]),e._v(" 1.8.0 (July 29, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Improve error message and better exception handling.")]),e._v(" "),n("li",[e._v("Change the representation of "),n("code",[e._v("null")]),e._v(" value in BindingSet")]),e._v(" "),n("li",[e._v("Modified the computation of the LeftJoin to support empty evaluation\nin its second argument.")]),e._v(" "),n("li",[e._v("Changed the type of the semantic index table for integer data\nproperty assertion from INT to BIGINT to be able to handle\n"),n("code",[e._v("xsd:integer")]),e._v(" type")]),e._v(" "),n("li",[e._v("Set index creation during Quest startup")]),e._v(" "),n("li",[e._v("Implement new feature for bootstrapping, command line scripts,\nintegration in ontoPro plugin")]),e._v(" "),n("li",[e._v("Updated the URI templates in Turtle mapping syntax to make it\nsimpler and closer to Turtle. Now quotes, question marks and\nclass/property declarations are no longer required")])]),e._v(" "),n("p",[e._v("For example, in the previous syntax:")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(' <"test;person/{?id}"> a :MyClass; :hasName {?name}.\n')])])]),n("p",[e._v("becomes simply")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(" test:person/{id} a :MyClass ; :hasName {name} .\n")])])]),n("ul",[n("li",[e._v('Support "%", "=", ";" characters in the URI template.')])]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(" :class/{id};{name}%{class type}\n")])])]),n("ul",[n("li",[e._v("Bug fix: Major bugs in execution handling SPARQL Construct and\nSPARQL Describe queries.")]),e._v(" "),n("li",[e._v("Bug fix: Issues related to commits and batch sizes in\nQuestOWLStatement")]),e._v(" "),n("li",[e._v("Bug fix: Issue with URI template matcher that generates "),n("code",[e._v("null")]),e._v(' in\ncase failed template (now it generates URI("xxxx") where xxx is\nthe URI that was being matched.)')]),e._v(" "),n("li",[e._v("Bug fix: Issue in existential clause in tree-witness algorithm")]),e._v(" "),n("li",[e._v("Bug fix: Issue in the maximum size of URI that has more than 400\ncharacters")]),e._v(" "),n("li",[e._v("Bug fix: Issue in some data that can not be tracked when inserted\ninto the database. In particular if the data comes from\nclasses/properties that were simplified by the equivalence\nresolution.")]),e._v(" "),n("li",[e._v("Bug fix: Issue in exception handling during index creation in\nsemantic index test.")]),e._v(" "),n("li",[e._v("Bug fix: Issue in SQL parser that it doesn't capture the scope\nwithin parentheses in the WHERE clause.")]),e._v(" "),n("li",[e._v("Remove table and column identifier quotes in the SQL target query\nstring so that the parser can parse properly. For example:")])]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(' SELECT "Student"."sid" from "Student"\n')])])]),n("p",[e._v("will become:")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(" SELECT Student.sid from Student\n")])])]),n("ul",[n("li",[e._v("New semantic index implementation with integer references for URIs\nfor faster query answering (faster joins on integers instead of\nstrings)")])]),e._v(" "),n("p",[n("strong",[e._v("Ontop source code")])]),e._v(" "),n("ul",[n("li",[e._v("Ontop is now in GitHub!")]),e._v(" "),n("li",[e._v("Cleaner and slimmer project structure. We removed obsolete classes\nand tests.")]),e._v(" "),n("li",[e._v("Code refactor in Materialiser API, MinimalCQProducer and\nConstruct-Describe query execution.")]),e._v(" "),n("li",[e._v("More complete test cases for testing Quest features, e.g.,\nTree-Witness rewriting, Data materialiser, SQL parser, SPARQL\nConstruct, SPARQL Describe, SPARQL Optional, Database metadata and\nQuery completeness.")]),e._v(" "),n("li",[e._v("Support JUnit4 test cases.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha2-rev-2305-april-5-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2305-april-5-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2305, April 5, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Support for importing/exporting R2RML mappings")]),e._v(" "),n("li",[e._v('Support for automated mapping generation as defined by the "Direct\nMapping" W3C specification')]),e._v(" "),n("li",[e._v("Various options for data materialization (similar to dump-rdf in\nD2RQ)")]),e._v(" "),n("li",[e._v("Support for concurrent queries in the SPARQL endpoint through\nconnection pooling")]),e._v(" "),n("li",[e._v("Better support for Oracle, Postgres, SQL Server and DB2")]),e._v(" "),n("li",[e._v("Improved the SQL queries generated by Quest by avoiding some\noperations when unnecessary (e.g., casting), and placing optimally\nthe JOIN conditions in the SQL query.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha2-rev-2178-february-7-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2178-february-7-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2178, February 7, 2013)")]),e._v(" "),n("p",[n("strong",[e._v("-ontopQuest-")])]),e._v(" "),n("ul",[n("li",[e._v("Mapping optimiser: improved the generation of OR mappings")]),e._v(" "),n("li",[e._v("Mapping optimiser: improved the simplification of mappings using\nFOREIGN KEYS")]),e._v(" "),n("li",[e._v("Query optimiser: Improved the query optimiser to avoid generation of\nredundant JOINs and redundant UNIONs w.r.t. FOREIGN KEYs")]),e._v(" "),n("li",[e._v("Support percent encoding in strings in URI templates as defined by\nthe R2RML standard.")]),e._v(" "),n("li",[e._v("Better propagation of Exception messages in the Sesame provider")]),e._v(" "),n("li",[e._v("New "),n("strong",[e._v("scripts for querying quest")]),e._v(" from the command line")])]),e._v(" "),n("p",[n("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),n("ul",[n("li",[n("strong",[e._v("Introducing mapping assistant")]),e._v(". A new GUI-based tool for creating\nmappings. This is an experimental GUI to help you create mappings in\na faster way, please help us improve it by reporting any issues you\nmay find. (See "),n("a",{attrs:{href:"ObdalibPluginMappingAssistant",title:"wikilink"}},[e._v("\nguideliness")]),e._v(").")]),e._v(" "),n("li",[e._v('Users can set the max number of tuples returned in "OBDA Query"\ntab.')])]),e._v(" "),n("p",[n("strong",[e._v("Mapping language features (-ontopQuest- and -ontopCore-)")])]),e._v(" "),n("ul",[n("li",[e._v("Support URI identifier obtained directly from the database (no using\nURI template).")]),e._v(" "),n("li",[e._v("Support multiple lines when wrting SQL source query (See "),n("a",{attrs:{href:"ObdalibObdaFile#SourceandMappingDeclaration",title:"wikilink"}},[e._v(" feature\nnotes")]),e._v(")")])]),e._v(" "),n("p",[n("strong",[e._v("Bug fixes")])]),e._v(" "),n("ul",[n("li",[e._v("Bug fix: Issue with MySQL and UTF8 characters (Korean in particular)")]),e._v(" "),n("li",[e._v('Bug fix: Issue with "unbound variable freshX_X found while\ngenerating SQL" fixed.')]),e._v(" "),n("li",[e._v("Bug fix: Inverse minimum cardinality assertion was being ignored.")]),e._v(" "),n("li",[e._v("Bug fix: Source SQL query doesn't accept parenthesis in WHERE\nclause.")]),e._v(" "),n("li",[e._v("Bug fix: JDBC connection doesn't recover when connection lost.")]),e._v(" "),n("li",[e._v("Bug fix: Sesame virtual repository fails to read Quest preferences.")]),e._v(" "),n("li",[e._v("Bug fix: CSV export function only exports 101 tuples instead of all\nthe tuples.")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception in the query result table.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-2039-december-30-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-2039-december-30-2012"}},[e._v("#")]),e._v(" 1.7-alpha (rev 2039, December 30, 2012)")]),e._v(" "),n("p",[n("strong",[e._v("SPARQL support")])]),e._v(" "),n("ul",[n("li",[e._v("Support for most SPARQL built in functions, e.g., arithmetics, type\nchecking, etc.")]),e._v(" "),n("li",[e._v("Support for CONSTRUCT and DESCRIBE result forms")]),e._v(" "),n("li",[e._v("Support for OPTIONAL and bound, which allow you to have NEGATION in\nthe usual SPARQL 1.0 style.")]),e._v(" "),n("li",[e._v('Support for variables in ANY position, e.g., to allow queries such\nas SELECT ?p ?v WHERE { ?x :name "John Smith". ?x ?p ?v }')]),e._v(" "),n("li",[e._v("Stronger compliance to standard RDF and SPARQL semantics for FILTER\nexpressions")])]),e._v(" "),n("p",[n("strong",[e._v("Performance")])]),e._v(" "),n("ul",[n("li",[e._v("Multiple improvements to the SPARQL-to-rule translation, mapping and\nTBox optimization algorithms.")]),e._v(" "),n("li",[e._v("New algorithm for query rewriting w.r.t. the TBox that increases the\nperformance of query answering by many orders of magnitude when\ninference w.r.t. to existential constants is enabled. The\nimplementation has been contributed by Dr. Roman Kontchakov.")]),e._v(" "),n("li",[e._v("New benchmarks. We tested against Virtuoso triple store, Virtuoso\nRDF views and D2R Server using the BSBM and FishMark benchmarks.")])]),e._v(" "),n("p",[n("strong",[e._v("APIs and Accessibility")])]),e._v(" "),n("ul",[n("li",[e._v('Completely new Sesame API provider, now users of Sesame can create\n"Virtual RDF repositories" with -ontop-')]),e._v(" "),n("li",[e._v("SPARQL end-point support through integration with Sesame's\nworkbench")])]),e._v(" "),n("p",[n("strong",[e._v("Mapping language")])]),e._v(" "),n("ul",[n("li",[e._v('Improved support for default literal types, now it conforms with the\nR2RML "Natural Mapping" specification')]),e._v(" "),n("li",[e._v("Support for language tags obtained from the DB")]),e._v(" "),n("li",[e._v("Proper support for constants in the mappings")]),e._v(" "),n("li",[e._v("Proper internal handling of NULL values in the database (as\nrecommended by the R2RML standard)")])]),e._v(" "),n("p",[n("strong",[e._v("Database support")])]),e._v(" "),n("ul",[n("li",[e._v("Restored support for Oracle, DB2 and SQL Server")]),e._v(" "),n("li",[e._v("Improved support and performance over MySQL")])]),e._v(" "),n("p",[n("strong",[e._v("Documentation")])]),e._v(" "),n("ul",[n("li",[e._v("Revised and extended all technical documentation")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1692-august-16-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1692-august-16-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1692 (August 16, 2012)")]),e._v(" "),n("p",[n("strong",[e._v("-ontop- general")])]),e._v(" "),n("ul",[n("li",[e._v("New file content for the OBDA output file. The file is no longer in\nXML format but instead it uses plain text for simplicity (Issue:\n#244).")]),e._v(" "),n("li",[e._v("Improved error messages when the system initializes, parses\nmappings, fails to")])]),e._v(" "),n("p",[n("code",[e._v("execute queries, etc.")]),n("br"),e._v(" "),n("code")]),e._v(" "),n("p",[n("strong",[e._v("-ontopPro- Protege plugin")])]),e._v(" "),n("ul",[n("li",[e._v("Support Protégé 4.2")]),e._v(" "),n("li",[e._v("Add cancel button during query execution to terminate the process\nimmediately.")]),e._v(" "),n("li",[e._v("Add help button to guide filling data source parameters.")]),e._v(" "),n("li",[e._v("The plugin no longer introduces prefix definitions")]),e._v(" "),n("li",[e._v('Implemented "Cancel" function for query execution')]),e._v(" "),n("li",[e._v("New shortcut CONTROL + T to test mappings in the mapping creator")]),e._v(" "),n("li",[e._v("Fixed several issues with prefix management and rendering of")])]),e._v(" "),n("p",[n("code",[e._v("URIs short forms")])]),e._v(" "),n("ul",[n("li",[e._v("Improved GUI, hints and suggestions for JDBC connections, improved\nTAB navigation")])]),e._v(" "),n("p",[n("code",[e._v("in all dialogs")])]),e._v(" "),n("ul",[n("li",[e._v("Bug fix: Improve error reporting and stack trace printing (Issue:\n#255, #262)")]),e._v(" "),n("li",[e._v("Bug fix: The target and source string got saved partially if\nnewlines are used.")]),e._v(" "),n("li",[e._v("Bug fix: The OBDA model doesn't get loaded if the query has an\nexception.")]),e._v(" "),n("li",[e._v("Improved error management during .obda and query file load")]),e._v(" "),n("li",[e._v("Fixed null pointer exception and blank window that appear in cases\nwhere the .owl file")])]),e._v(" "),n("p",[n("code",[e._v("in OWL/RDF contained different default ns and a default prefix")])]),e._v(" "),n("p",[n("strong",[e._v("-ontopQuest- OWL Reasoner")])]),e._v(" "),n("ul",[n("li",[e._v("Added support for SPARQL query modifiers: ORDER BY, OFFSET and LIMIT\n(Issue: #261).")]),e._v(" "),n("li",[e._v("Add query caching to speed up the system performance, now repeated\nquery execution will not require SQL generation every time.")]),e._v(" "),n("li",[e._v("Relaxed on punning checks to allow loading of DBPedia and similar\nontologies.")]),e._v(" "),n("li",[e._v("EXPERIMENTAL: Added support for mixed ABoxes for class assertions,\ni.e., most data comes from the mappings but a bit of data is also\nallowed in the ABox, e.g., global facts Planet('mars')")]),e._v(" "),n("li",[e._v("Improved support for MySQL, Postgres, DB2 and SQL Server dialects")]),e._v(" "),n("li",[e._v("Added a warnings when axioms are being ignored because of being out\nof OWL 2 QL")]),e._v(" "),n("li",[e._v("Improved error reporting on failed connections")]),e._v(" "),n("li",[e._v("Improved support for SQL AS for table and column renaming in\nmappings")]),e._v(" "),n("li",[e._v("New way to generate SQL. SQL now includes typing information and is\npretty printed.")]),e._v(" "),n("li",[e._v("Bug fix: Fixed issue with INVALID URI that appeared when mappings\nused data that contained invalid characters for URI's (e.g., white\nspace) Now we call URIEncode (Jena's) before returning the value.")]),e._v(" "),n("li",[e._v("Bug fix: Exception when importing data as ABox individuals.")]),e._v(" "),n("li",[e._v("Bug fix: Exception when null values is used as constants.")]),e._v(" "),n("li",[e._v("Bug fix: Exception if ambiguous column names are used in SQL\nqueries.")]),e._v(" "),n("li",[e._v("Bug fix: Wrong URI shorten if there are two or more namespaces with\noverlapping strings.")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception due to inconsistent OBDA model\nidentifier string.")]),e._v(" "),n("li",[e._v("Bug fix: Unknown signature in the SELECT clause if the name is a\nqualified name and it comes from a view (Issue: #259)")]),e._v(" "),n("li",[e._v("Bug fix: Exception when using URIs as a constant values in SPARQL.")]),e._v(" "),n("li",[e._v("Bug fix: Prefix Manager accepts any string including invalid prefix\nnames.")])]),e._v(" "),n("p",[e._v("Known issues:")]),e._v(" "),n("ul",[n("li",[e._v("The ORDER BY modifier is not ready for columns with literal datatype")]),e._v(" "),n("li",[e._v("Issues with MySQL in non-ANSI mode")]),e._v(" "),n("li",[e._v("DateTime data properties in Oracle can crash the system.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1529-june-12-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1529-june-12-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1529 (June 12, 2012)")]),e._v(" "),n("p",[n("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),n("ul",[n("li",[e._v("Better layout, fonts and command icons.")]),e._v(" "),n("li",[e._v("Better query saving mechanism (Issue: #248)")]),e._v(" "),n("li",[e._v("Better error reporting to users and crash handling (Issue:\n#255, 256)")]),e._v(" "),n("li",[e._v("Pretty printing of SQL queries (Issue: #254)")]),e._v(" "),n("li",[e._v("Re-enabled the export function in the Query Interface panel (Issue:\n#213, #250)")]),e._v(" "),n("li",[e._v("Improved syntax-error messages in the mapping editor tooltip")]),e._v(" "),n("li",[e._v("Cleaned console messages")]),e._v(" "),n("li",[e._v('Added "Number of sources" indicator to show how many sources are\nalready declared in the OBDA model.')]),e._v(" "),n("li",[e._v("Improved ESC and CONTROL+ENTER shortcuts in most dialogs in the GUI.")]),e._v(" "),n("li",[e._v("Replaced JDBC Driver text box with an editable Combo Box with\ndefault driver string.")]),e._v(" "),n("li",[e._v("Better OBDA statistics table (Issue: #251)")]),e._v(" "),n("li",[e._v("Bug fix: CRITICAL stability issue that would rise an end-less cycle\nof warning messages when Quest crashed.")]),e._v(" "),n("li",[e._v('Bug fix: issue with final dot "." in mappings.')])]),e._v(" "),n("p",[n("strong",[e._v("-ontopQuest-")])]),e._v(" "),n("ul",[n("li",[e._v("Added support for data-type UUIDs for SQL Server (Issue: #253)")]),e._v(" "),n("li",[e._v("Now we create forward-only and concur-read-only JDBC Statements by\ndefault to allow for server side cursors.")]),e._v(" "),n("li",[e._v("Bug fix: issue with SQL parser and table renamings in SQL queries\n(Issue: #259)")]),e._v(" "),n("li",[e._v("Bug fix: issue with NULL pointer when primary key optimization in\nunfolding when there is a join on primary condition but atoms are\nnot unifiable.")])]),e._v(" "),n("p",[e._v("Known issues:")]),e._v(" "),n("ul",[n("li",[e._v("Oracle is unstable")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1479-may-22-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1479-may-22-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1479 (May 22, 2012)")]),e._v(" "),n("p",[e._v("Quest performance and features:")]),e._v(" "),n("ul",[n("li",[e._v("T-Mappings algorithm optimization: Combine disjunctive conditions in\nOR clauses instead of multiple mappings. This reduces the size of\nthe final query and improves its performance. (Issue: #237)")])]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("Support using IS NULL and IS NOT NULL in SQL query (Issue: #200).")]),e._v(" "),n("li",[e._v("Support using UNION in SPARQL queries.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v("Fix packing problem in Windows XP (Issue: #228)")]),e._v(" "),n("li",[e._v("Fix packing problem in Linux")]),e._v(" "),n("li",[e._v("Fix unresponsive plugin when using mapping filter (Issue: #217).")]),e._v(" "),n("li",[e._v("Fix unresponsive plugin when inserting a new mapping (Issue: #232).")]),e._v(" "),n("li",[e._v("Fix support for MySQL in both virtual and classic mode (Issue:\n#238).")]),e._v(" "),n("li",[e._v("Fix support for Oracle in virtual mode (Issue: #226).")]),e._v(" "),n("li",[e._v('Fix issue where creating or modifying a mapping would not trigger a\n"ontology out of synch" flag.')])]),e._v(" "),n("p",[e._v("Known Issue:")]),e._v(" "),n("ul",[n("li",[e._v("Oracle still has some issues in classic mode.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1446-may-4-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1446-may-4-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1446 (May 4, 2012)")]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("Add support on writing qualified name for atom predicates.")]),e._v(" "),n("li",[e._v("Add coloring for atoms typed Individual in the target query.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v('Fix the "Show Short URIs" feature in the query panel.')])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1440-may-2-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1440-may-2-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1440 (May 2, 2012)")]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("Support writing URI constants in target queries (Issue: #227)")])]),e._v(" "),n("p",[e._v("General:")]),e._v(" "),n("ul",[n("li",[e._v("Better system logging for recording exceptions.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v("Fix the null pointer exception due to the old OBDA preferences.")]),e._v(" "),n("li",[e._v("Fix bugs related to vocabulary prefixes.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1427-april-17-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1427-april-17-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1427 (April 17, 2012)")]),e._v(" "),n("p",[e._v("Quest performance and features:")]),e._v(" "),n("ul",[n("li",[e._v("Implemented the T-Mappings mapping optimization algorithm improved\nperformance of query rewriting in Virtual Mode. Now query rewriting\nis as fast in virtual ABox mode as in classic ABox mode (Issue:\n#169)")]),e._v(" "),n("li",[e._v("Implemented a new query containment algorithm that is many times\nfaster than before.")]),e._v(" "),n("li",[e._v("Added data source analysis to obtain DB metadata for SQL query\ngeneration.")]),e._v(" "),n("li",[e._v("Added analysis of SQL queries in the mappings to produce better SQL\nqueries.")]),e._v(" "),n("li",[e._v("Added "),n("strong",[e._v("SQL JOIN ELIMINATION")]),e._v(" using PRIMARY KEY metadata.")]),e._v(" "),n("li",[e._v("Added mappings optimization using query containment w.r.t.\nconstraints")]),e._v(" "),n("li",[e._v("Added initial support for "),n("strong",[e._v("FILTER")])]),e._v(" "),n("li",[e._v("Added support for typed constants in SPARQL queries (Issue: #157)")]),e._v(" "),n("li",[e._v("Small updates to internal API for speed of equality, hash and clone\ncomputation")])]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("New Turtle-like syntax for mappings allows for more succinct and\neasy to read mappings.")]),e._v(" "),n("li",[e._v("Added support for LANGUAGE tag for the Literal datatype (Issue:\n#198)")]),e._v(" "),n("li",[e._v("Added support for datatypes in the OBDA mapping axioms (Issue:\n#147, #194, #196)")]),e._v(" "),n("li",[e._v("Added URI templates for URI creation in mapping mapping axioms\n(Issue: #151)")]),e._v(" "),n("li",[e._v("New feature for typing literals in mapping axioms (Issue: #194,\n#207)")])]),e._v(" "),n("p",[e._v("General:")]),e._v(" "),n("ul",[n("li",[e._v("Added support for OWL API 3 (Issue: #98)")]),e._v(" "),n("li",[e._v("Internal refactoring of all modules and packages for a cleaner API")])]),e._v(" "),n("p",[e._v("ontopPro:")]),e._v(" "),n("ul",[n("li",[e._v("The plugin is now compatible with Protege 4.1 (Issue: #99)")]),e._v(" "),n("li",[e._v("The plugin has a new and fresh GUI display.")]),e._v(" "),n("li",[e._v("Stronger integration with Protege's refactoring mechanism")]),e._v(" "),n("li",[e._v("The ABox materializer can import data complete with datatype\ninformation (Issue: #195)")]),e._v(" "),n("li",[e._v("The target query use Turtle syntax for better display and management\n(Issue: #204)")]),e._v(" "),n("li",[e._v("The plugin has Class/Property panel for better navigation and\nfiltering.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v("Fixed a problem with the encoding of axioms of the form\nsubClassOf(Person, hasFather some Person)")]),e._v(" "),n("li",[e._v("Fixed issues with open and dead JDBC connections")]),e._v(" "),n("li",[e._v("Cleaned OWLReasoner synchronization issue")]),e._v(" "),n("li",[e._v("Fixed null pointer exceptions related to incorrect mappings")]),e._v(" "),n("li",[e._v("Proper error handling for translating an empty datalog program\n(Issue: #197)")]),e._v(" "),n("li",[e._v('Fixed the "Attach Prefixes" feature in the OBDA Query panel\n(Issue: #211)')]),e._v(" "),n("li",[e._v("Fixed issue regarding xsd:dateTime (Issue: #199)")])]),e._v(" "),n("h2",{attrs:{id:"_1-6-1-october-19-2011"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-1-october-19-2011"}},[e._v("#")]),e._v(" 1.6.1 (October 19, 2011)")]),e._v(" "),n("ul",[n("li",[e._v("Fast patch in the query translation module.")])]),e._v(" "),n("h2",{attrs:{id:"_1-6-october-18-2011"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-october-18-2011"}},[e._v("#")]),e._v(" 1.6 (October 18, 2011)")]),e._v(" "),n("ul",[n("li",[e._v("Allow fast navigation using TAB key in the new mapping form (Issue:\n#92)")]),e._v(" "),n("li",[e._v("Allow SQL query execution in the mapping tree (Issue: #104)")]),e._v(" "),n("li",[e._v("Improvement in the error message deliveries (Issues: #107, #112,\n#118)")]),e._v(" "),n("li",[e._v('Improvement in the data source management tab, including adding\n"Test Connection" button (Issues: #108, #111, #114)')]),e._v(" "),n("li",[e._v("Add OBDA model statistics report (Issues: #106, #117)")]),e._v(" "),n("li",[e._v("Add support for adding integrated data source in Teiid (Issue: #89)")]),e._v(" "),n("li",[e._v("Fix the unresponsive cancel button during importing OWL Individuals\n(Issue: #88)")]),e._v(" "),n("li",[e._v("Fix CSV header in the exported query result (Issue: #120)")]),e._v(" "),n("li",[e._v("Fix connection failure when users change the parameters (Issue:\n#121)")]),e._v(" "),n("li",[e._v("Fix the password field so now the text is hidden (Issue: #113)")]),e._v(" "),n("li",[e._v("Fix query selection in the OBDA query tab (Issue: #91)")]),e._v(" "),n("li",[e._v("Fix import failure when storing very long record values (Issue:\n#95)")]),e._v(" "),n("li",[e._v("Fix import failure when storing records that contain single quotes\n(Issue: #96)")])]),e._v(" "),n("h2",{attrs:{id:"_1-5-1-rc1-july-15-2011"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-5-1-rc1-july-15-2011"}},[e._v("#")]),e._v(" 1.5.1-RC1 (July 15, 2011)")]),e._v(" "),n("ul",[n("li",[e._v("Significant code refactoring in the plugin. This effort makes the\ncode easier to debug and to extend, and is almost ready for Protege\n4.1 and OWL-API 3.0 support.")]),e._v(" "),n("li",[e._v("Term renaming. Modified the term 'Mapping Head' to 'Target\nQuery' and 'Mapping Body' to 'Source Query' to maintain the\nconsistency with the literature.")]),e._v(" "),n("li",[e._v("Temporarly disabled the SPARQL query coloring.")]),e._v(" "),n("li",[e._v("Temporarly disabled the 'Load OWL Individuals into DB'\nfunctionality.")]),e._v(" "),n("li",[e._v("Add improved search filters in the mapping manager (Issues: #37,\n#54).")]),e._v(" "),n("li",[e._v("Add 'show short URIs' option in the query results to hide long URI\nstrings.")]),e._v(" "),n("li",[e._v("Add 'select all', 'select none', 'expand all' and 'collapse\nall' buttons for easy browsing in the mapping tree (Issues: #35,\n#36).")]),e._v(" "),n("li",[e._v("Add mapping validation with respect to the vocabulary in the\nontology (Issues: #42).")]),e._v(" "),n("li",[e._v("Add input validation to many parts of the GUI (Issues: #63, #64,\n#65, #67, #68, #69, #70, #71, #76).")]),e._v(" "),n("li",[e._v("Fix the save query functionality in the Query manager (Issues:\n#57).")]),e._v(" "),n("li",[e._v("Fix the persistency of user preferences when opening/closing Protege\n(Issues: #58).")]),e._v(" "),n("li",[e._v("Fix the exceptions that appeared when loading/saving/reloading\nontologies (Issues: #59, #60, #61, #75).")]),e._v(" "),n("li",[e._v("Fix problems with several progress dialogs in the GUI (Issues: #50,\n#87).")]),e._v(" "),n("li",[e._v("Fix problems in the 'tuple count' functionality (Issues: #82,\n#84).")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{438:function(e,t,n){"use strict";n.r(t);var a=n(51),o=Object(a.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"release-notes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#release-notes"}},[e._v("#")]),e._v(" Release notes")]),e._v(" "),n("h2",{attrs:{id:"_5-2-0-august-16-2024"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-2-0-august-16-2024"}},[e._v("#")]),e._v(" 5.2.0 (August 16, 2024)")]),e._v(" "),n("h4",{attrs:{id:"new-features"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Extract user information (ID, group, role) from HTTP headers and make it available to special SQL functions "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/753",target:"_blank",rel:"noopener"}},[e._v("#753"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Insert user info in the query log "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/768",target:"_blank",rel:"noopener"}},[e._v("#768"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Compression option added to the materialization "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/797",target:"_blank",rel:"noopener"}},[e._v("#797"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"optimizations"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#optimizations"}},[e._v("#")]),e._v(" Optimizations")]),e._v(" "),n("ul",[n("li",[e._v("Left join optimizations:\n"),n("ul",[n("li",[e._v("Pruning the right child when unused and cardinality doesn't matter "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/752",target:"_blank",rel:"noopener"}},[e._v("#752"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("More non-nullability constraints extracted from the ancestors for transferring self-left-joins based on functional dependencies "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/761",target:"_blank",rel:"noopener"}},[e._v("#761"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Self-left-join elimination with nullable determinants of functional dependencies "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/783",target:"_blank",rel:"noopener"}},[e._v("#783"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Self-left join elimination on nullable functional dependency determinants made robust to provenance variables and trivial functional dependencies "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/804",target:"_blank",rel:"noopener"}},[e._v("#804"),n("OutboundLink")],1)])])]),e._v(" "),n("li",[e._v("Unique constraint and variable non requirement inference with distinct nodes improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/756",target:"_blank",rel:"noopener"}},[e._v("#756"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Simplification of conjunctions and disjunctions of equalities "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/755",target:"_blank",rel:"noopener"}},[e._v("#755"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Propagation of foreign keys from basic lenses to parents "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/759",target:"_blank",rel:"noopener"}},[e._v("#759"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Functional dependency inference for unions improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/760",target:"_blank",rel:"noopener"}},[e._v("#760"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Optimization to the SPARQL "),n("code",[e._v("strStartsWith")]),e._v(" function "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/801",target:"_blank",rel:"noopener"}},[e._v("#801"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("IRI decomposition with more than 1 argument when some arguments are nullable enabled "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/809",target:"_blank",rel:"noopener"}},[e._v("#809"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Removal of distincts below joins when there is a "),n("code",[e._v("limit 1")]),e._v(" above")]),e._v(" "),n("li",[e._v("Year extraction from timestamps with DuckDB optimized")])]),e._v(" "),n("h4",{attrs:{id:"refactoring"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("T-mapping and related optimizations refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/769",target:"_blank",rel:"noopener"}},[e._v("#769"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("B-node label anonymization pushed into the IQTree "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/772",target:"_blank",rel:"noopener"}},[e._v("#772"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Handling environment variables with the CLI refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/814",target:"_blank",rel:"noopener"}},[e._v("#814"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Robust simplification for GeoSPARQL functions "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/808",target:"_blank",rel:"noopener"}},[e._v("#808"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Wrapping a values node into a lens at mapping processing time added (disabled by default; see property "),n("code",[e._v("ontop.wrapMappingValuesNodesInLenses")]),e._v(")")]),e._v(" "),n("li",[e._v("Non-nullable variables are not used anymore for right provenance from a left join (was preventing some optimizations)")])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[n("code",[e._v(" = true")]),e._v(" issue with SQLServer and Oracle fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/758",target:"_blank",rel:"noopener"}},[e._v("#758"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Connection test for Trino and H2 fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/767",target:"_blank",rel:"noopener"}},[e._v("#767"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Mysql datetime conversion is now encoded to UTF8 to avoid collation error "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/779",target:"_blank",rel:"noopener"}},[e._v("#779"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Missing spaces in string format pattern with MySQL added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/784",target:"_blank",rel:"noopener"}},[e._v("#784"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Configuration classes now use injector suppliers "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/794",target:"_blank",rel:"noopener"}},[e._v("#794"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("MS SQL Server identifiers are now treated not case-sensitive (even if quoted) "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/805",target:"_blank",rel:"noopener"}},[e._v("#805"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Incorrect time zone format in xsd:dateTime for Redshift's "),n("code",[e._v("TIMESTAMP")]),e._v(" data type fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/807",target:"_blank",rel:"noopener"}},[e._v("#807"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Database constraints were ignored by Ontop CLI "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/777",target:"_blank",rel:"noopener"}},[e._v("#777"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Error with the CLI during the R2RML to OBDA mapping conversion fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/799",target:"_blank",rel:"noopener"}},[e._v("#799"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("code",[e._v("TIMESTAMP WITH TIME ZONE")]),e._v(" is now recognized for H2")]),e._v(" "),n("li",[e._v("Typing nulls for "),n("code",[e._v("DATE")]),e._v(" with Dremio fixed")]),e._v(" "),n("li",[e._v("Missing minutes from the DuckDB time zone added")]),e._v(" "),n("li",[e._v("Invalid URNs for the triple patterns generated when converting the mapping to R2RML fixed")]),e._v(" "),n("li",[e._v("Error with constant in order-by involving a VALUES node fixed")]),e._v(" "),n("li",[e._v("Missed duplicate elimination for some overlapping IRI templates fixed")]),e._v(" "),n("li",[e._v("Incorrect content types returned for CSV and TSV results of a SPARQL query fixed")])]),e._v(" "),n("p",[n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/24?closed=1",target:"_blank",rel:"noopener"}},[e._v("Milestone on Github"),n("OutboundLink")],1)]),e._v(" "),n("h2",{attrs:{id:"_5-1-2-january-17-2024"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-2-january-17-2024"}},[e._v("#")]),e._v(" 5.1.2 (January 17, 2024)")]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-2"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[e._v("Conflict between columns in case of a self-join in the bootstrapper "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/786",target:"_blank",rel:"noopener"}},[e._v("#786"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Handling of casts for different versions of MySQL and MariaDB "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/787",target:"_blank",rel:"noopener"}},[e._v("#787"),n("OutboundLink")],1)])]),e._v(" "),n("p",[e._v("Several dependencies updated, including JQuery ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/780",target:"_blank",rel:"noopener"}},[e._v("#780"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("h2",{attrs:{id:"_5-1-1-november-22-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-1-november-22-2023"}},[e._v("#")]),e._v(" 5.1.1 (November 22, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-features-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-2"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Option to expose system tables added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/744",target:"_blank",rel:"noopener"}},[e._v("#744"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Standard deviation and variance functions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/735",target:"_blank",rel:"noopener"}},[e._v("#735"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Option to disable the registration of custom SPARQL aggregation functions "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/746",target:"_blank",rel:"noopener"}},[e._v("#746"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-3"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("p",[e._v("See "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/23?closed=1",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/milestone/23?closed=1"),n("OutboundLink")],1)]),e._v(" "),n("h2",{attrs:{id:"_5-1-0-august-15-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-0-august-15-2023"}},[e._v("#")]),e._v(" 5.1.0 (August 15, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-features-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-3"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for "),n("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#flattenlens"}},[e._v("flatten lenses")]),e._v(" added "),n("em",[e._v("(beta)")]),e._v(" "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/622",target:"_blank",rel:"noopener"}},[e._v("#622"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/625",target:"_blank",rel:"noopener"}},[e._v("#625"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/628",target:"_blank",rel:"noopener"}},[e._v("#628"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/629",target:"_blank",rel:"noopener"}},[e._v("#629"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/633",target:"_blank",rel:"noopener"}},[e._v("#633"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/635",target:"_blank",rel:"noopener"}},[e._v("#635"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/636",target:"_blank",rel:"noopener"}},[e._v("#636"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/637",target:"_blank",rel:"noopener"}},[e._v("#637"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/638",target:"_blank",rel:"noopener"}},[e._v("#638"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/639",target:"_blank",rel:"noopener"}},[e._v("#639"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/640",target:"_blank",rel:"noopener"}},[e._v("#640"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/641",target:"_blank",rel:"noopener"}},[e._v("#641"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/642",target:"_blank",rel:"noopener"}},[e._v("#642"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/643",target:"_blank",rel:"noopener"}},[e._v("#643"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/661",target:"_blank",rel:"noopener"}},[e._v("#661"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/715",target:"_blank",rel:"noopener"}},[e._v("#715"),n("OutboundLink")],1)],1),e._v(" "),n("li",[e._v("Support for "),n("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#unionlens"}},[e._v("union lenses")]),e._v(" added "),n("em",[e._v("(beta)")]),e._v(" "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/612",target:"_blank",rel:"noopener"}},[e._v("#612"),n("OutboundLink")],1)],1),e._v(" "),n("li",[e._v("Support for XSD cast functions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/630",target:"_blank",rel:"noopener"}},[e._v("#630"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for date-trunc and more date extraction functions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for a separate RDF file for facts added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/666",target:"_blank",rel:"noopener"}},[e._v("#666"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Options to ignore invalid mapping entries "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/631",target:"_blank",rel:"noopener"}},[e._v("#631"),n("OutboundLink")],1),e._v(" and lenses "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/709",target:"_blank",rel:"noopener"}},[e._v("#709"),n("OutboundLink")],1),e._v(" added")]),e._v(" "),n("li",[e._v("Partial support for regular expressions in SQL Server added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/702",target:"_blank",rel:"noopener"}},[e._v("#702"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for DynamoDB using the CData connector added "),n("em",[e._v("(beta)")]),e._v(" "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/693",target:"_blank",rel:"noopener"}},[e._v("#693"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"optimizations-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#optimizations-2"}},[e._v("#")]),e._v(" Optimizations")]),e._v(" "),n("ul",[n("li",[e._v("Upwards propagation of lens unique constraints added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/668",target:"_blank",rel:"noopener"}},[e._v("#668"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Left join optimizations:\n"),n("ul",[n("li",[e._v("Reducing left joins to inner joins when the right child has a left join "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/662",target:"_blank",rel:"noopener"}},[e._v("#662"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Merging left joins nested on the left "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/663",target:"_blank",rel:"noopener"}},[e._v("#663"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/686",target:"_blank",rel:"noopener"}},[e._v("#686"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Robustness to nullable joining columns "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/667",target:"_blank",rel:"noopener"}},[e._v("#667"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Pruning the right of a left join when not contributing")])])]),e._v(" "),n("li",[e._v("VALUES node decomposition added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/680",target:"_blank",rel:"noopener"}},[e._v("#680"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Functional dependency inference added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/681",target:"_blank",rel:"noopener"}},[e._v("#681"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Reduction of aggregation nodes with no aggregation functional terms to distinct added")]),e._v(" "),n("li",[e._v("Transitive closure of functional dependencies added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/732",target:"_blank",rel:"noopener"}},[e._v("#732"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"refactoring-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-2"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Substitutions refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/616",target:"_blank",rel:"noopener"}},[e._v("#616"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Typing for math operators added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/706",target:"_blank",rel:"noopener"}},[e._v("#706"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("QuotedIDFactory refactored "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/644",target:"_blank",rel:"noopener"}},[e._v("#644"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Removal of non-required variables improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/669",target:"_blank",rel:"noopener"}},[e._v("#669"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for the STRING datatype for DuckDB added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/646",target:"_blank",rel:"noopener"}},[e._v("#646"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for SAMPLE at the database level added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/660",target:"_blank",rel:"noopener"}},[e._v("#660"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-4"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[e._v("Support LIMIT/OFFSET in SQL Server improved "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/676",target:"_blank",rel:"noopener"}},[e._v("#676"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/679",target:"_blank",rel:"noopener"}},[e._v("#679"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/682",target:"_blank",rel:"noopener"}},[e._v("#682"),n("OutboundLink")],1),e._v(", "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/721",target:"_blank",rel:"noopener"}},[e._v("#721"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Extraction of unique constraints in Oracle made more consistent "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/695",target:"_blank",rel:"noopener"}},[e._v("#695"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Metadata extraction for DuckDB made more robust "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/687",target:"_blank",rel:"noopener"}},[e._v("#687"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Missing casts when using Bnode templates added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/657",target:"_blank",rel:"noopener"}},[e._v("#657"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Invalid SPARQL UNION translation fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/651",target:"_blank",rel:"noopener"}},[e._v("#651"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Empty results for CONSTRUCT queries with unions and different variables fixed "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/652",target:"_blank",rel:"noopener"}},[e._v("#652"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"documentation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[e._v("#")]),e._v(" Documentation")]),e._v(" "),n("ul",[n("li",[e._v("Dedicated pages for each supported database (for instance "),n("a",{attrs:{href:"https://ontop-vkg.org/guide/databases/athena",target:"_blank",rel:"noopener"}},[e._v("AWS Athena"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/lenses/"}},[e._v("Tutorial about lenses")])],1),e._v(" "),n("li",[n("a",{attrs:{href:"/tutorial/materialization/materialization"}},[e._v("Tutorial about materialization")])])]),e._v(" "),n("h2",{attrs:{id:"_5-0-2-march-9-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-2-march-9-2023"}},[e._v("#")]),e._v(" 5.0.2 (March 9, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-features-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-4"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for Trino "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/599",target:"_blank",rel:"noopener"}},[e._v("#599"),n("OutboundLink")],1),e._v(", PrestoDB "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/601",target:"_blank",rel:"noopener"}},[e._v("#601"),n("OutboundLink")],1),e._v(", AWS Athena "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/602",target:"_blank",rel:"noopener"}},[e._v("#602"),n("OutboundLink")],1),e._v(", DuckDB "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/604",target:"_blank",rel:"noopener"}},[e._v("#604"),n("OutboundLink")],1),e._v(", AWS Redshift "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/605",target:"_blank",rel:"noopener"}},[e._v("#605"),n("OutboundLink")],1),e._v(" and Google BigQuery "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/615",target:"_blank",rel:"noopener"}},[e._v("#615"),n("OutboundLink")],1),e._v(" added")]),e._v(" "),n("li",[e._v("Declare some columns as IRI-safe in lenses "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/587",target:"_blank",rel:"noopener"}},[e._v("#587"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for arbitrary JDBC properties added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/606",target:"_blank",rel:"noopener"}},[e._v("#606"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bugfixes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Missing TLS cypher suite JRE modules added to the Docker image")]),e._v(" "),n("li",[e._v("More system schemas are now ignored in Oracle "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/591",target:"_blank",rel:"noopener"}},[e._v("#591"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"tooling"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[e._v("Scaffolding tool"),n("OutboundLink")],1),e._v(" created to make it easier to implement a new SQL dialect adapter.")])]),e._v(" "),n("h2",{attrs:{id:"_5-0-1-january-29-2023"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-1-january-29-2023"}},[e._v("#")]),e._v(" 5.0.1 (January 29, 2023)")]),e._v(" "),n("h4",{attrs:{id:"new-feature"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-feature"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),n("ul",[n("li",[e._v("DB metadata extraction for MS Access added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/589",target:"_blank",rel:"noopener"}},[e._v("#589"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("JRE-embedded Ontop-Protégé bundles with Protégé-5.6.0-beta-2 are now provided")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-3"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Support for Spark SQL improved and tests added in the CI")]),e._v(" "),n("li",[e._v("All the tables (besides excluded ones) in Oracle are now extracted, not just the user's ones")])]),e._v(" "),n("p",[e._v("Several dependencies updated.")]),e._v(" "),n("h2",{attrs:{id:"_5-0-0-december-31-2022"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-0-december-31-2022"}},[e._v("#")]),e._v(" 5.0.0 (December 31, 2022)")]),e._v(" "),n("h4",{attrs:{id:"important-changes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#important-changes"}},[e._v("#")]),e._v(" Important changes")]),e._v(" "),n("ul",[n("li",[e._v("Java 11 or newer is required")]),e._v(" "),n("li",[e._v("Ontop's Protégé plugin now requires at least Protégé 5.6-beta")]),e._v(" "),n("li",[e._v("RDF4J bindings updated to 4.1.0")]),e._v(" "),n("li",[e._v("The module "),n("code",[e._v("ontop-owlapi")]),e._v(" is not published anymore. We recommend using "),n("code",[e._v("ontop-rdf4j")]),e._v(" instead")]),e._v(" "),n("li",[e._v("RDF4J workbench modules removed")]),e._v(" "),n("li",[e._v("Docker image moved to "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[n("code",[e._v("ontop/ontop")]),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Ontop views renamed "),n("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")])])]),e._v(" "),n("h4",{attrs:{id:"new-features-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-5"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for SPARQL rules for the extending the VKG added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/576",target:"_blank",rel:"noopener"}},[e._v("#576"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("The "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[e._v("Docker image"),n("OutboundLink")],1),e._v(" now also supported the ARM64 architecture and allows to run all the CLI commands "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/532",target:"_blank",rel:"noopener"}},[e._v("#532"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for Snowflake added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/520",target:"_blank",rel:"noopener"}},[e._v("#520"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for MariaDB added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/271",target:"_blank",rel:"noopener"}},[e._v("#271"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("N-Triples and N-quads are now supported by the SPARQL endpoint "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/566",target:"_blank",rel:"noopener"}},[e._v("#566"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Option to fully reformulate the SPARQL query into SQL added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/577",target:"_blank",rel:"noopener"}},[e._v("#577"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Experimental support for flatten lenses added (only for PostgreSQL)")])]),e._v(" "),n("h4",{attrs:{id:"new-optimizations"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-optimizations"}},[e._v("#")]),e._v(" New optimizations")]),e._v(" "),n("ul",[n("li",[e._v("Optimization of joins with a union of class definitions added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/543",target:"_blank",rel:"noopener"}},[e._v("#543"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Optimizations for generic queries with limit added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/578",target:"_blank",rel:"noopener"}},[e._v("#578"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Optimization for queries retrieving all the properties or classes in use in the VKG added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/581",target:"_blank",rel:"noopener"}},[e._v("#581"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"refactoring-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-4"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("New module for testing dialects in the Github CI pipeline added "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/568",target:"_blank",rel:"noopener"}},[e._v("#568"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("JSQLParser updated to 4.4")]),e._v(" "),n("li",[e._v("Ontop's Protégé plugin isolated from Ontop modules "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/278",target:"_blank",rel:"noopener"}},[e._v("#278"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for Databricks (Apache Spark) improved")])]),e._v(" "),n("p",[e._v("Many bugfixes. See also "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/16?closed=1",target:"_blank",rel:"noopener"}},[e._v("its milestone on Github"),n("OutboundLink")],1),e._v(".")]),e._v(" "),n("h2",{attrs:{id:"_4-2-2-november-18-2022"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-2-november-18-2022"}},[e._v("#")]),e._v(" 4.2.2 (November 18, 2022)")]),e._v(" "),n("h4",{attrs:{id:"new-features-6"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-6"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for Protege 5.6-beta under Java 11 and Java 17")]),e._v(" "),n("li",[e._v("Support for the Databricks-specific JDBC driver "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/554",target:"_blank",rel:"noopener"}},[e._v("#554"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for LIMIT/OFFSET in SQL Server 2008 "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/531",target:"_blank",rel:"noopener"}},[e._v("#531"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Support for materialized views in PostgreSQL "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/541",target:"_blank",rel:"noopener"}},[e._v("#541"),n("OutboundLink")],1)])]),e._v(" "),n("h4",{attrs:{id:"bugfixes-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-2"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("VALUES handling with Teiid "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/525",target:"_blank",rel:"noopener"}},[e._v("#525"),n("OutboundLink")],1)]),e._v(" "),n("li",[e._v("Metadata extraction for Dremio of schema names with dots")]),e._v(" "),n("li",[e._v("Typo in registration of Oracle factories "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/557",target:"_blank",rel:"noopener"}},[e._v("#557"),n("OutboundLink")],1)])]),e._v(" "),n("p",[e._v("Preventive update of dependencies including Jackson and Gson to address potential vulnerabilities.")]),e._v(" "),n("h2",{attrs:{id:"_4-2-1-april-20-2022"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-1-april-20-2022"}},[e._v("#")]),e._v(" 4.2.1 (April 20, 2022)")]),e._v(" "),n("h4",{attrs:{id:"new-feature-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-feature-2"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),n("ul",[n("li",[e._v("Support for partial serialized DB metadata, when "),n("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")]),e._v(" is enabled.")])]),e._v(" "),n("h4",{attrs:{id:"bugfixes-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-3"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Not renamed variable in sub-query with a distinct ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/417",target:"_blank",rel:"noopener"}},[e._v("#417"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("OBDA to R2RML conversion: require mapping entry IDs to be unique.")]),e._v(" "),n("li",[e._v("Lang tags for constants in R2RML were ignored.")]),e._v(" "),n("li",[e._v("Several fixes related to VALUES.")]),e._v(" "),n("li",[e._v("Better HTTP codes for the ontology download endpoint.")])]),e._v(" "),n("p",[e._v("The Jackson and Spring Boot dependencies have been preventively updated (to 2.13.2.2 and 2.6.6 respectively) to address potential vulnerabilities ("),n("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/CVE-2020-36518",target:"_blank",rel:"noopener"}},[e._v("CVE-2020-36518"),n("OutboundLink")],1),e._v(" and "),n("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/cve-2022-22965",target:"_blank",rel:"noopener"}},[e._v("CVE-2022-22965"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("h2",{attrs:{id:"_4-2-0-december-30-2021"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-0-december-30-2021"}},[e._v("#")]),e._v(" 4.2.0 (December 30, 2021)")]),e._v(" "),n("h4",{attrs:{id:"new-features-7"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-7"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for Apache Spark ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/422",target:"_blank",rel:"noopener"}},[e._v("#422"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Support for time functions added ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/478",target:"_blank",rel:"noopener"}},[e._v("#478"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Support for the "),n("code",[e._v("IN")]),e._v(" SPARQL function added.")]),e._v(" "),n("li",[e._v('Datatypes can be extracted from non-supported source queries in the mapping (treated internally as "black-box" views). Disabled by default (see '),n("a",{attrs:{href:"/guide/advanced/configuration"}},[n("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(").")]),e._v(" "),n("li",[e._v("TBox triples (e.g. sub-classes, domains and ranges) can be added to the default RDF graph. Disabled by default (see "),n("a",{attrs:{href:"/guide/advanced/configuration"}},[n("code",[e._v("ontop.enableFactExtractionWithTBox")])]),e._v(").")]),e._v(" "),n("li",[e._v("Support for "),n("a",{attrs:{href:"/guide/advanced/views"}},[e._v("Ontop join views")]),e._v(" added.")]),e._v(" "),n("li",[e._v("Support for arbitrary levels of Ontop views added (views over views).")]),e._v(" "),n("li",[e._v("Better integrity constraint extraction for Ontop basic and join views.")]),e._v(" "),n("li",[e._v("Non-null information can now be specified for Ontop views.")]),e._v(" "),n("li",[e._v("Support for b-node facts added.")]),e._v(" "),n("li",[e._v("The default query of the SPARQL endpoint portal is now configurable ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/454",target:"_blank",rel:"noopener"}},[e._v("#454"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Contextually injective IRI templates with numeric or UUID arguments are now decomposed ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/363",target:"_blank",rel:"noopener"}},[e._v("#363"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("JSON-LD serialization now supported by the materializer ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/481",target:"_blank",rel:"noopener"}},[e._v("#481"),n("OutboundLink")],1),e._v(").")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-5"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Support for Java >= 8. Ontop decoupled from Protégé so as to update several common libraries ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/467",target:"_blank",rel:"noopener"}},[e._v("#467"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v('RDF facts provided by the ontology file are now internally grouped together into values blocks (sorts of "in-memory tables") instead of being splitted into large unions. Enabled by default (see '),n("a",{attrs:{href:"/guide/advanced/configuration"}},[n("code",[e._v("ontop.enableValuesNode")])]),e._v(").")]),e._v(" "),n("li",[e._v("Unions are lifted above aggregations when possible.")]),e._v(" "),n("li",[e._v("Docker image updated to JRE 11.")]),e._v(" "),n("li",[e._v("Mutable intermediate queries are not used anymore.")]),e._v(" "),n("li",[e._v("Stronger handling of non well-designed "),n("code",[e._v("OPTIONAL")]),e._v(" blocks.")]),e._v(" "),n("li",[e._v("Stronger handling of "),n("code",[e._v("ORDER BY")]),e._v(" in sub-queries.")]),e._v(" "),n("li",[e._v("Type extractor relaxed ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/438",target:"_blank",rel:"noopener"}},[e._v("#438"),n("OutboundLink")],1),e._v(") to tolerate slightly different datatypes.")]),e._v(" "),n("li",[e._v("JDBC distinct result set removed.")]),e._v(" "),n("li",[e._v("JDBC user name and password are not required anymore. Useful when passed in the JDBC URL.")]),e._v(" "),n("li",[e._v("The Command-Line Interface of the bootstrapper has been refactored (invalid options removed, comments improved).")])]),e._v(" "),n("p",[e._v("Many bugfixes (see for instance "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/14?closed=1",target:"_blank",rel:"noopener"}},[e._v("our Github bugtracker"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("h2",{attrs:{id:"_4-1-1-july-23-2021"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-1-july-23-2021"}},[e._v("#")]),e._v(" 4.1.1 (July 23, 2021)")]),e._v(" "),n("h4",{attrs:{id:"bugfixes-4"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-4"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Bugs related to GeoSPARQL support ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/428",target:"_blank",rel:"noopener"}},[e._v("#428"),n("OutboundLink")],1),e._v(","),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/434",target:"_blank",rel:"noopener"}},[e._v("#434"),n("OutboundLink")],1),e._v(" )")]),e._v(" "),n("li",[e._v("Issue with ORDER BY and LIMIT for MS SQL ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/225",target:"_blank",rel:"noopener"}},[e._v("#225"),n("OutboundLink")],1),e._v(","),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/412",target:"_blank",rel:"noopener"}},[e._v("#412"),n("OutboundLink")],1),e._v(")")])]),e._v(" "),n("h4",{attrs:{id:"new-features-8"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-8"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Teiid support ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/336",target:"_blank",rel:"noopener"}},[e._v("#336"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Various improvements of the Protégé plugin")])]),e._v(" "),n("h2",{attrs:{id:"_4-1-0-february-28-2021"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-0-february-28-2021"}},[e._v("#")]),e._v(" 4.1.0 (February 28, 2021)")]),e._v(" "),n("h4",{attrs:{id:"changed-behavior"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"/guide%C3%A9cli#ontop-mapping-to-r2rml"}},[e._v("OBDA to R2RML mapping conversion")]),e._v(" now requires by default access to DB metadata (through credentials or as a serialized file). This requirement can be bypassed with the argument "),n("code",[e._v("--force")]),e._v(".")]),e._v(" "),n("li",[e._v("By default, DESCRIBE queries only return the triples where the described IRI appears as subject. To also consider the triples where it appears as object, set the parameter "),n("code",[e._v("ontop.includeFixedObjectPositionInDescribe")]),e._v(" to true.")]),e._v(" "),n("li",[e._v("The Docker endpoint image is now based on Debian ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/394",target:"_blank",rel:"noopener"}},[e._v("#394"),n("OutboundLink")],1),e._v("), not on Alpine anymore.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-9"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-9"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support for GeoSPARQL functions added ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/335",target:"_blank",rel:"noopener"}},[e._v("#335"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[n("a",{attrs:{href:"/guide/advanced/logging"}},[e._v("Rich JSON-based query logging")]),e._v(" added.")]),e._v(" "),n("li",[n("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("New endpoint for predefined queries")]),e._v(" added (beta). It enables the specification of custom low-latency Web APIs in a declarative manner.")]),e._v(" "),n("li",[e._v("Support for the "),n("code",[e._v("IF")]),e._v(", "),n("code",[e._v("IRI")]),e._v(", "),n("code",[e._v("BNODE")]),e._v(" SPARQL functions added.")]),e._v(" "),n("li",[e._v("Support for Dremio added.")]),e._v(" "),n("li",[e._v("DB metadata can now be loaded from files instead of connecting to the database.")]),e._v(" "),n("li",[e._v("Bnode labels are now anonymized on-the-fly. Bnode templates can safely use PII.")]),e._v(" "),n("li",[e._v("Sensitive JDBC information (user name, password, URL) can now be passed as arguments or environment variables (for Docker) instead of being written in the properties file. Docker secrets are also supported for further security.")]),e._v(" "),n("li",[e._v("New left join optimization techniques added. General functional dependencies are now taken into account. Sensitivity to left join ordering reduced.")]),e._v(" "),n("li",[n("a",{attrs:{href:"/guide/advanced/caching"}},[e._v("HTTP caching")]),e._v(" headers can now be returned by the Ontop SPARQL endpoint.")]),e._v(" "),n("li",[e._v("Native Protégé bundles for each platform (Windows, MacOS, Linux) with JRE 8 embedded.")]),e._v(" "),n("li",[e._v("Basic support for Ontop views added (experimental), which, in particular, allows specifying integrity constraints on views defined at the Ontop level.")])]),e._v(" "),n("h4",{attrs:{id:"removal"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#removal"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),n("ul",[n("li",[e._v("As announced earlier, the RDF4J Workbench-based bundles are not shipped anymore. However, the webapps war file can still be built with Maven.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-6"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-6"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Drastic reduction of memory consumption when processing SPARQL queries ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/370",target:"_blank",rel:"noopener"}},[e._v("#370"),n("OutboundLink")],1),e._v("), which is significant for materializing large RDF graphs.")]),e._v(" "),n("li",[e._v("Better file resource handling ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/368",target:"_blank",rel:"noopener"}},[e._v("#368"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Distinct lifting improved.")]),e._v(" "),n("li",[e._v("Self-join elimination based on functional dependencies re-implemented.")]),e._v(" "),n("li",[e._v("Decomposition of heterogeneous IRI templates enabled.")]),e._v(" "),n("li",[e._v("Lexical value space is now considered when decomposing IRIs.")]),e._v(" "),n("li",[e._v("Protégé plugin codebase cleaned, with parts of UI streamlined and redesigned. Improved syntax highlighting in target and source queries. Mapping validation extended. Multiple open ontologies supported ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/282",target:"_blank",rel:"noopener"}},[e._v("#282"),n("OutboundLink")],1),e._v(" and "),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/175",target:"_blank",rel:"noopener"}},[e._v("#175"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("RDF4J external binding management refactored.")]),e._v(" "),n("li",[e._v("Bnode handling refactored.")]),e._v(" "),n("li",[e._v("Java 11 support.")]),e._v(" "),n("li",[e._v("Better handling of column names when converting OBDA mappings into R2RML, which now uses DB metadata.")]),e._v(" "),n("li",[e._v("CONSTRUCT and DESCRIBE query handling refactored.")]),e._v(" "),n("li",[e._v("Parser for OBDA mappings refactored.")]),e._v(" "),n("li",[e._v("Character encoding in R2RML templates refactored.")]),e._v(" "),n("li",[e._v("Default file encoding set to UTF-8. Particularly useful on Windows. Can be overridden if needed.")]),e._v(" "),n("li",[n("a",{attrs:{href:"/dev/build"}},[e._v("Build script")]),e._v(" refactored. Now fully based on Maven ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/pull/393",target:"_blank",rel:"noopener"}},[e._v("#393"),n("OutboundLink")],1),e._v(").")]),e._v(" "),n("li",[e._v("Base Docker image updated.")]),e._v(" "),n("li",[e._v("PostgreSQL transaction handling (in streaming mode) improved.")]),e._v(" "),n("li",[e._v("Timeout support extended to non-SELECT queries.")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_4-0-3-october-16-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-3-october-16-2020"}},[e._v("#")]),e._v(" 4.0.3 (October 16, 2020)")]),e._v(" "),n("h4",{attrs:{id:"bugfixes-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-5"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Wrong IRI decomposition ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/358",target:"_blank",rel:"noopener"}},[e._v("#358"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Logback config file ignored by Ontop CLI ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/361",target:"_blank",rel:"noopener"}},[e._v("#361"),n("OutboundLink")],1),e._v(")")])]),e._v(" "),n("h2",{attrs:{id:"_4-0-2-september-3-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-2-september-3-2020"}},[e._v("#")]),e._v(" 4.0.2 (September 3, 2020)")]),e._v(" "),n("ul",[n("li",[e._v("Fixed Named Graphs (quad) grammar in the target of the Ontop native mapping language.")])]),e._v(" "),n("h2",{attrs:{id:"_4-0-1-august-28-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-1-august-28-2020"}},[e._v("#")]),e._v(" 4.0.1 (August 28, 2020)")]),e._v(" "),n("h4",{attrs:{id:"new-features-and-bugfixes"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-and-bugfixes"}},[e._v("#")]),e._v(" New features and bugfixes")]),e._v(" "),n("ul",[n("li",[e._v("Named Graphs (quad) are supported in materialization ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/343",target:"_blank",rel:"noopener"}},[e._v("#343"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Removal of Jena as a dependency ("),n("a",{attrs:{href:"https://github.com/ontop/ontop/issues/349",target:"_blank",rel:"noopener"}},[e._v("#349"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[n("code",[e._v("com.mysql.cj.jdbc.Driver")]),e._v(" is now also recognized. Non-recognized drivers now use the default SQL factories instead of the mock-up one.")])]),e._v(" "),n("h2",{attrs:{id:"_4-0-0-july-31-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-july-31-2020"}},[e._v("#")]),e._v(" 4.0.0 (July 31, 2020)")]),e._v(" "),n("h4",{attrs:{id:"refactoring-7"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-7"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Dependencies updated (e.g. RDF4J 3.3.0)")]),e._v(" "),n("li",[e._v("SERIAL datatypes of PostgreSQL better handled")]),e._v(" "),n("li",[e._v("Anonymous blank nodes are now supported in CONSTRUCT blocks")]),e._v(" "),n("li",[e._v("JSON-LD now supported for graph queries")]),e._v(" "),n("li",[e._v("Denodo support improved.")])]),e._v(" "),n("p",[e._v("Few bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_4-0-0-rc-1-july-8-2020"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-rc-1-july-8-2020"}},[e._v("#")]),e._v(" 4.0.0-rc-1 (July 8, 2020)")]),e._v(" "),n("h4",{attrs:{id:"changed-behavior-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior-2"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),n("ul",[n("li",[e._v("Streaming mode is enabled by default for query answering. It fetches data by batches of 500 results.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-10"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-10"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support of GROUP_CONCAT added. All the standard SPARQL aggregation functions are now supported.")]),e._v(" "),n("li",[e._v("Named graphs are now supported.")]),e._v(" "),n("li",[e._v("Support of Denodo added. Support of Dremio is postponed to 4.1.")]),e._v(" "),n("li",[e._v("Support XML catalog file added (beta). It enables resolving "),n("code",[e._v("owl:imports")]),e._v(" assertions from the ontology by loading local files instead of fetching remote URLs. It is available in Protégé and with the "),n("code",[e._v("ontop endpoint")]),e._v(" CLI command.")]),e._v(" "),n("li",[e._v("DB metadata extraction CLI command added (experimental).")]),e._v(" "),n("li",[e._v("CASE and CAST is now supported in the mapping.")]),e._v(" "),n("li",[e._v("Streaming mode for query answering added.")])]),e._v(" "),n("h4",{attrs:{id:"deprecation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deprecation"}},[e._v("#")]),e._v(" Deprecation")]),e._v(" "),n("ul",[n("li",[e._v("The RDF4J Workbench-based SPARQL endpint is deprecated. Tomcat, Jetty bundles and webapps (.war files) will be removed in a future version. Users are recommended to switch to the "),n("code",[e._v("ontop endpoint")]),e._v(" CLI or its Docker image.")])]),e._v(" "),n("h4",{attrs:{id:"removal-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#removal-2"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),n("ul",[n("li",[e._v("The Mapping Assistant panel has been removed from the Ontop Protégé plugin.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-8"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-8"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("SQL parsing of the mapping improved. JSQLParser's version has been updated.")]),e._v(" "),n("li",[e._v("Metadata extraction refactored, and SQLDialectAdapter has been eliminated.")]),e._v(" "),n("li",[e._v("Meta-mapping management improved.")]),e._v(" "),n("li",[e._v("Non-recognized SQL functions in the mapping are now only assumed to be deterministic. Other assumptions have been removed.")]),e._v(" "),n("li",[e._v("Internal data nodes now create variables only for database columns that are used in the query. This sparse usage of variables strongly improve reformulation time and log readibility when using tables with 100+ columns in the mapping.")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_4-0-0-beta-1-december-23-2019"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-beta-1-december-23-2019"}},[e._v("#")]),e._v(" 4.0.0-beta-1 (December 23, 2019)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviors"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),n("ul",[n("li",[e._v("Cardinality is now enforced by default (duplicates are removed at\nthe mapping level). This is required to support most of the\naggregation functions.")]),e._v(" "),n("li",[e._v("Functions in the SQL queries of the mapping that are unknown to\nOntop do no cause the creation of SQL views anymore. The strategy\nregarding SQL functions moved from white-list to black-list.")]),e._v(" "),n("li",[e._v("Types returned by supported SPARQL functions now strictly follow the\nSPARQL 1.1 specification.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-11"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-11"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("SPARQL Aggregation functions SUM, COUNT, AVG, MIN, MAX are now\nsupported. SAMPLE is currently implemented as MIN.")]),e._v(" "),n("li",[e._v("Joins over terms that are constructed using different functions are\nnow supported.")]),e._v(" "),n("li",[e._v("Some functions (such as IRI templates) can now be post-processed\n(that is, they are not always included in the SQL query anymore).\nGenerated SQL queries are generally less verbose than before.")]),e._v(" "),n("li",[e._v("The Ontop endpoint now has the portal option, where predefined\nqueries are shown in the Web interface.")]),e._v(" "),n("li",[e._v("The NULLIF SQL function is now supported and optimized. Useful for\nfiltering out some unwanted values in the mapping assertions.")]),e._v(" "),n("li",[e._v("OPTIONALs outside the well-designed fragment are now supported.\nWeakly well-designed queries encoding preferences are optimized.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-9"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-9"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("The typing system have been entirely redesigned. RDF types and\ndatabase types are now clearly separated. Each database engine can\nnow bring in its own data types.")]),e._v(" "),n("li",[e._v("The Datalog data structure (from version 1.x) for representing\nqueries internally has been removed.")]),e._v(" "),n("li",[e._v("Function symbol creation and optimization has been entirely\nrefactored. They are constructed by two factories, the\nFunctionSymbolFactory and the DBFunctionSymbolFactory.")]),e._v(" "),n("li",[e._v("Most of the logic of SQLDialectAdapter has been moved to\nDBFunctionSymbolFactory and DBTypeFactory. Each database engine is\nexpected to have its own implementation of these new interfaces.")]),e._v(" "),n("li",[e._v("The SPARQL translation has been rewritten (was formerly translating\ninto Datalog).")]),e._v(" "),n("li",[e._v("The SQL generator has been rewritten (was formerly translating from\nDatalog).")])]),e._v(" "),n("h4",{attrs:{id:"temporary-limitation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#temporary-limitation"}},[e._v("#")]),e._v(" Temporary limitation")]),e._v(" "),n("ul",[n("li",[e._v("Due to a complete refactoring of the SQL dialect management, only\nthe H2, MySQL, PostgreSQL, Oracle, SQL server and DB2 dialects are\nsupported in this beta. Dremio and Denodo dialects are expected to\nbe supported in a next beta release.")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_3-0-1-december-9-2019"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-1-december-9-2019"}},[e._v("#")]),e._v(" 3.0.1 (December 9, 2019)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviors-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-2"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),n("ul",[n("li",[e._v("Protégé: no property file (resp. mapping file) is created if no data\nsource (resp. mapping assertion) is specified by the user.")])]),e._v(" "),n("h4",{attrs:{id:"new-features-12"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-12"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Ontop endpoint now supports R2RML files and doesn't require an\nontology.")]),e._v(" "),n("li",[e._v("Materialization: N-triples format is now supported.")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-10"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-10"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Rewriting of the tree-witness rewriter (now independent from\nDatalog)")])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-5"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-5"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),n("ul",[n("li",[e._v("Protégé: fixed issues related to prefix management.")]),e._v(" "),n("li",[e._v("Reasoning: issue related to the handling of inverse properties\nfixed.")])]),e._v(" "),n("h2",{attrs:{id:"_3-0-0-august-23-2019"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-august-23-2019"}},[e._v("#")]),e._v(" 3.0.0 (August 23, 2019)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviors-3"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-3"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),n("ul",[n("li",[e._v("The `rdfs:range` of a data property is not used anymore for\ninferring the non-specified datatype in a mapping assertion but for\nvalidating the datatype once specified or inferred. Datatype\ninference is now based on the DB datatype and follows the R2RML\nnatural mapping (https://www.w3.org/TR/r2rml/#natural-mapping)")])]),e._v(" "),n("h4",{attrs:{id:"new-features-13"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-13"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Support of Protege 5.5")]),e._v(" "),n("li",[e._v("Support of BNode in R2RML")]),e._v(" "),n("li",[e._v("Basic support for the `geo:wktLiteral` datatype (#256)")]),e._v(" "),n("li",[e._v("New command-line interface for SPARQL endpoint")]),e._v(" "),n("li",[e._v("Docker container for SPARQL endpoint\n(https://hub.docker.com/r/ontop/ontop-endpoint)")]),e._v(" "),n("li",[e._v("Preliminary support of Dremio")]),e._v(" "),n("li",[e._v("Preliminary support of Denodo")]),e._v(" "),n("li",[e._v("The ordering of SPARQL variables is now preserved (#291)")]),e._v(" "),n("li",[e._v("N-Triples output for materialization added")]),e._v(" "),n("li",[e._v("The SQL translation now appears as a sub-tab in the Protégé Ontop\nSPARQL tab")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-11"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-11"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("The triple predicate is now systematically used in the mapping and\nduring query unfolding")]),e._v(" "),n("li",[e._v("Atom predicates and function symbols are now clearly distinguished")]),e._v(" "),n("li",[e._v("The Datalog-based data structure is not used anymore at mapping\nprocessing time and by the default rewriter")]),e._v(" "),n("li",[e._v("Query containment-based optimizations applied to the mapping after\nsaturation improved")]),e._v(" "),n("li",[e._v("The materializer is now based on RDF4J (instead of OWLAPI)")])]),e._v(" "),n("h4",{attrs:{id:"project-organisation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#project-organisation"}},[e._v("#")]),e._v(" Project organisation")]),e._v(" "),n("ul",[n("li",[e._v("Release of Ontop on both SourceForge and GitHub (#274)")]),e._v(" "),n("li",[e._v("A new repository for the tutorial\n(https://github.com/ontop/ontop-tutorial)")])]),e._v(" "),n("p",[e._v("Many bugfixes.")]),e._v(" "),n("h2",{attrs:{id:"_3-0-0-beta-2-february-28-2018"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-2-february-28-2018"}},[e._v("#")]),e._v(" 3.0.0-beta-2 (February 28, 2018)")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviours"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),n("ul",[n("li",[e._v("The JDBC driver class name is now required in Protégé (issue #248)")])]),e._v(" "),n("h4",{attrs:{id:"new-features-14"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-14"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Novel left join optimization techniques (issue #230)")]),e._v(" "),n("li",[e._v("LIMIT appended to test SQL queries and SPARQL queries in Protégé")]),e._v(" "),n("li",[e._v("Report illegal usage of Fully qualified column names (FQDN) in the\ntarget part of a mapping assertion")]),e._v(" "),n("li",[e._v("Support for the SPARQL isNumeric function")])]),e._v(" "),n("h4",{attrs:{id:"refactoring-12"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-12"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),n("ul",[n("li",[e._v("Internal representation of the ontology improved")]),e._v(" "),n("li",[e._v("Improvement of the intermediate query representation (issues #235,\n#236)")]),e._v(" "),n("li",[e._v("Switch to ANTLR4 to parse ontop native mapping (issues #238, #239)")]),e._v(" "),n("li",[e._v("Make ResultSet.next() robust (issue #219)")]),e._v(" "),n("li",[e._v("More robust handling of IRI-safe encoding (issue #245)")])]),e._v(" "),n("h4",{attrs:{id:"bug-fixes-6"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-6"}},[e._v("#")]),e._v(" Bug Fixes")]),e._v(" "),n("p",[e._v("Many, see "),n("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/7?closed=1",target:"_blank",rel:"noopener"}},[e._v("closed issues"),n("OutboundLink")],1),e._v(".")]),e._v(" "),n("h2",{attrs:{id:"_3-0-0-beta-1-august-11-2017"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-1-august-11-2017"}},[e._v("#")]),e._v(" 3.0.0-beta-1 (August 11, 2017)")]),e._v(" "),n("p",[e._v("Note that this is the first release from version 3 series with many\ninternal refactoring and improvements, and bug fixes. However, these\nchanges also cause incompatibility with Ontop v1. See "),n("a",{attrs:{href:"MigrationGuideV1toV3",title:"wikilink"}},[e._v("the migration\nguide")]),e._v(".")]),e._v(" "),n("h4",{attrs:{id:"changed-behaviours-2"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours-2"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),n("ul",[n("li",[e._v("JDBC connection information is stored in a separate properties file")]),e._v(" "),n("li",[e._v("Fully qualified columns (table.column) are not allowed in the target\npart of the mapping language. One has to explicitly create an alias\n(e.g. table.column AS table_column) and use the alias in the\ntarget. (complying with R2RML)")]),e._v(" "),n("li",[e._v("The rules for datatype type inference and checking are changed. Now\nwe use only mapping and database to infer the datatypes (complying\nwith R2RML), and the (range axioms) in the ontologies to check the\ncompatibility (complying with OWL).")])]),e._v(" "),n("h4",{attrs:{id:"new-features-15"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#new-features-15"}},[e._v("#")]),e._v(" New features")]),e._v(" "),n("ul",[n("li",[e._v("Major refactoring of the internal structure of the Ontop system")]),e._v(" "),n("li",[e._v("Databases for Integration Tests have been dockerized.")]),e._v(" "),n("li",[e._v("Upgrade Sesame to the latest version of RDF4J (v2.2.2).")]),e._v(" "),n("li",[e._v("The redesigned OWLAPI and RDF4J API bindings of Ontop API (see\nexamples: "),n("a",{attrs:{href:"https://github.com/ontop/ontop-api-examples",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop-api-examples"),n("OutboundLink")],1),e._v(")")]),e._v(" "),n("li",[e._v("Upgrade of R2RML API to v0.6.0")]),e._v(" "),n("li",[e._v("Official support of both Tomcat and Jetty (v9) for deploying a\nSPARQL endpoint")]),e._v(" "),n("li",[e._v("Better support of Optional (bugfix #190)")]),e._v(" "),n("li",[e._v('Protege: support for "Synchronize Reasoner" in the Reasoner menu')]),e._v(" "),n("li",[e._v("Improved error messages for incorrect mapping")]),e._v(" "),n("li",[e._v("CLI tool for converting Mapping from v1 to v3")])]),e._v(" "),n("h2",{attrs:{id:"_1-18-1-june-16-2017"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-1-june-16-2017"}},[e._v("#")]),e._v(" 1.18.1 (June 16, 2017)")]),e._v(" "),n("ul",[n("li",[n("p",[e._v("Return a correct extension for files in ontop cli materializer\n(issue #145)")])]),e._v(" "),n("li",[n("p",[e._v("Materialize support non-http resource uris")])]),e._v(" "),n("li",[n("p",[e._v("Bug Fixes")]),e._v(" "),n("ul",[n("li",[e._v("Small fixes in cli (issues #127, #141, #188)")]),e._v(" "),n("li",[e._v("PostgreSQL JDBC driver fix for quotation marks")]),e._v(" "),n("li",[e._v("Remove unknown property warning for owl:sameAs")]),e._v(" "),n("li",[e._v("Remove duplicate annotations during materialization (issues\n#183 #186)")]),e._v(" "),n("li",[e._v("Generate different file names for properties and classes during\nmaterialization with separate files (issue #165)")]),e._v(" "),n("li",[e._v("R2RML\n"),n("ul",[n("li",[e._v("Small changes in api")]),e._v(" "),n("li",[e._v("Fix R2RML import of SQL query (issues #181 #182)")]),e._v(" "),n("li",[e._v("Fix export from OBDA mapping to R2RML (issues #158 #159\n#160)")])])]),e._v(" "),n("li",[e._v("Fix in SPARQL use of filter and values with a IRI (issue #191)")]),e._v(" "),n("li",[e._v("Fix handling of mysql metadata with lower_case_table_names\nsetting on (issue #192)")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-18-0-may-26-2016"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-0-may-26-2016"}},[e._v("#")]),e._v(" 1.18.0 (May 26, 2016)")]),e._v(" "),n("ul",[n("li",[e._v("Protege\n"),n("ul",[n("li",[e._v("Redesigned materialization gui")]),e._v(" "),n("li",[e._v("Upgrade to Protege 5.0.0")])])]),e._v(" "),n("li",[e._v("Support of querying annotation property from ontology (issue #105)\n(disabled by default)")]),e._v(" "),n("li",[e._v("Support of the use of owl:sameAs in mappings (disabled by default)")]),e._v(" "),n("li",[e._v("Package names have been unified to it.unibz.inf.ontop")]),e._v(" "),n("li",[e._v("Upgrade OWLAPI to v4.2.5")]),e._v(" "),n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Fix obda-to-r2rml convert for template like <{uri}> (issue\n#97)")]),e._v(" "),n("li",[e._v("Fix an issue in Protege when renaming data source.")]),e._v(" "),n("li",[e._v("Fix error messages in protege mapping assistant panel and SPARQL\nquery")]),e._v(" "),n("li",[e._v("Fix issue with multiple schemas (issue #99)")]),e._v(" "),n("li",[e._v("Fix internal SQL conversion for Teiid jdbc driver")]),e._v(" "),n("li",[e._v("Fix support of anonymous ontology (issue #101)")]),e._v(" "),n("li",[e._v("Fix warning message in Protege (issue #102)")]),e._v(" "),n("li",[e._v("Fix xml uri (issue #104)")]),e._v(" "),n("li",[e._v("Fix r2rml api, error predicateMap with template (issue #107)")]),e._v(" "),n("li",[e._v("Fix in Protege import of additional ontology and add classes and\nproperties of imported ontologies at runtime (issues #106\n#108)")]),e._v(" "),n("li",[e._v("Fix querying URI constants (issue #111)")]),e._v(" "),n("li",[e._v("Fix error message creating new mapping (issue #120)")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-17-1-february-16-2016"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-1-february-16-2016"}},[e._v("#")]),e._v(" 1.17.1 (February 16, 2016)")]),e._v(" "),n("ul",[n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Fix an issue when creating new datasource in Protege")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-17-0-february-4-2016"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-0-february-4-2016"}},[e._v("#")]),e._v(" 1.17.0 (February 4, 2016)")]),e._v(" "),n("ul",[n("li",[e._v("Protege\n"),n("ul",[n("li",[e._v("Ontop protege plugin now available on official Protege Plugin\nRepository!")]),e._v(" "),n("li",[e._v("Upgrade Protege to 5.0.0-beta-21 (latest version)")]),e._v(" "),n("li",[e._v("Ontop protege plugin is packed as one jar now -- no need for\nseparated OSGI JDBC configuration jars")]),e._v(" "),n("li",[e._v("do not generate .obda and .q file when no datasource is present")]),e._v(" "),n("li",[e._v("General improvement of UI -- more intuitive and less confusion")])])]),e._v(" "),n("li",[e._v("Support for Annotation Properties in mappings")]),e._v(" "),n("li",[e._v("Improvement of Ontop mapping language for URIs/Literals retrieved\nfrom DB columns")]),e._v(" "),n("li",[e._v("Support for SPARQL VALUES keyword for SPARQL federation")]),e._v(" "),n("li",[e._v("Java 8")]),e._v(" "),n("li",[e._v("Upgrade OWLAPI to v4.1.3 (latest version)")]),e._v(" "),n("li",[e._v("Bash Completion for command line interface")]),e._v(" "),n("li",[e._v("Better structured Wiki: "),n("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/wiki"),n("OutboundLink")],1)])]),e._v(" "),n("h2",{attrs:{id:"_1-16-1-november-16-2015"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-1-november-16-2015"}},[e._v("#")]),e._v(" 1.16.1 (November 16, 2015)")]),e._v(" "),n("ul",[n("li",[e._v("Optimizations exploiting foreign key constraints over multiple\ncolumns")]),e._v(" "),n("li",[e._v("Improvement in the RDB2RDF compliance test (contributed by Evren\nSrin)")])]),e._v(" "),n("h2",{attrs:{id:"_1-16-0-october-14-2015"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-0-october-14-2015"}},[e._v("#")]),e._v(" 1.16.0 (October 14, 2015)")]),e._v(" "),n("ul",[n("li",[e._v("Support for "),n("a",{attrs:{href:"OntopSPARQLFunctions",title:"wikilink"}},[e._v(" SPARQL functions ")])]),e._v(" "),n("li",[e._v("Support for column oriented RDBMS "),n("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v("\nMonetDB")])]),e._v(" "),n("li",[e._v("Support for cloud RDBMS "),n("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v(" SAP HANA")])]),e._v(" "),n("li",[e._v("New Optimization technique: "),n("a",{attrs:{href:"Implicit-database-constraints",title:"wikilink"}},[e._v("\nImplicit-database-constraints")])]),e._v(" "),n("li",[e._v("New Optimization technique: "),n("a",{attrs:{href:"Exact-Mappings",title:"wikilink"}},[e._v("\nExact-Mappings")])]),e._v(" "),n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Handling quotes in the WHERE clause of SQL query in mappings .")]),e._v(" "),n("li",[e._v("Allow multiple subjects in the target of mapping of Ontop native\nsyntax.")]),e._v(" "),n("li",[e._v("Return correct value from datetime columns using jtds driver")]),e._v(" "),n("li",[e._v("Fix the translation of LIMIT with ORDER BY in oracle database")]),e._v(" "),n("li",[e._v("Fix a bug in MetaMappingExpander")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-15-0-may-13-2015"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-15-0-may-13-2015"}},[e._v("#")]),e._v(" 1.15.0 (May 13, 2015)")]),e._v(" "),n("ul",[n("li",[e._v("Upgrade the Protege plugin to Protégé 5")]),e._v(" "),n("li",[e._v("New Command line interface")]),e._v(" "),n("li",[e._v("Better support for SPARQL BIND")]),e._v(" "),n("li",[e._v("Support for SPARQL Concat and Replace")]),e._v(" "),n("li",[e._v("Support for SQL Concat and Replace (in the mappings)")]),e._v(" "),n("li",[e._v("Support for xsd:dateTimeStamp")]),e._v(" "),n("li",[e._v("Improved Optimization techniques (Contribution by Roman Konchakov)")]),e._v(" "),n("li",[e._v("Implementation of Autoclosable interface for core classes in the API\nto support `try with resource`.")]),e._v(" "),n("li",[e._v("Create a sub-query when SELECT DISTINCT is used in the mappings.")]),e._v(" "),n("li",[e._v("Bug Fixes\n"),n("ul",[n("li",[e._v("Handle the 30-characters limit for variable names in Oracle.")]),e._v(" "),n("li",[e._v("Fix the mapping render of Protege when multiple subjects are in\nthe target of mapping.")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-14-0-november-4-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-14-0-november-4-2014"}},[e._v("#")]),e._v(" 1.14.0 (November 4, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Added support in ontology and mappings for datatypes xsd:int,\nxsd:long, xsd:positiveInteger, xsd:negativeInteger,\nxsd:nonPositiveInteger, xsd:nonNegativeInteger, xsd:float")]),e._v(" "),n("li",[e._v("Optimized implementations of TBox classifications, and query\ncontainment checking, which are much faster than before")]),e._v(" "),n("li",[e._v("Validation for Sesame Workbench made stronger. It prevents\nrepositories with an invalid configuration to be created.")]),e._v(" "),n("li",[e._v("Bug Fixes:\n"),n("ul",[n("li",[e._v("Fix SPARQL functions (str(), lang()) to use rdfs:Literal instead\nof xsd:string")]),e._v(" "),n("li",[e._v("Issue converting datatypes of R2RML constants")]),e._v(" "),n("li",[e._v("Support UNICODE characters in TurtleParser")]),e._v(" "),n("li",[e._v("Catch exceptions for Protege R2RML Export")]),e._v(" "),n("li",[e._v("Fix conversion from ontop mappings to R2RML of language tag and\ntriples")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-13-1-september-29-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-1-september-29-2014"}},[e._v("#")]),e._v(" 1.13.1 (September 29, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Bug Fixes:\n"),n("ul",[n("li",[e._v("The redundant query elimination optimization sometimes does not\nhandle facts properly")]),e._v(" "),n("li",[e._v("Some warning messages related to datatype range axioms are\nambiguous")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-13-0-september-25-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-0-september-25-2014"}},[e._v("#")]),e._v(" 1.13.0 (September 25, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Support for providing implicit DB Constraints (e.g. foreign keys) to\nOntop to generate efficient SQL")]),e._v(" "),n("li",[e._v("Command line feature to generate pretty R2RML")]),e._v(" "),n("li",[e._v("Stream output in the Protege Plugin")]),e._v(" "),n("li",[e._v("Support for Regex in mappings")]),e._v(" "),n("li",[e._v("Proper handling of datatypes in ontology and mappings")]),e._v(" "),n("li",[e._v("Support for hsql database")]),e._v(" "),n("li",[e._v("Support for datatypes xsd:date, xsd:time and xsd:gYear")]),e._v(" "),n("li",[e._v("Bug Fixes:\n"),n("ul",[n("li",[e._v("Issue with nested equivalences in unfolder")]),e._v(" "),n("li",[e._v("Problem with multiple join conditions in R2RML")]),e._v(" "),n("li",[e._v("Cancelling running queries in Protege")]),e._v(" "),n("li",[e._v("Blank lines in generated sql causes problems for oracle")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-12-0-june-26-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-0-june-26-2014"}},[e._v("#")]),e._v(" 1.12.0 (June 26, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Support for finding empty concepts and properties")]),e._v(" "),n("li",[e._v("Integration with a new R2RML API")]),e._v(" "),n("li",[e._v("Less restrictive mode for JDBC driver validation")]),e._v(" "),n("li",[e._v("Faster TBox reasoner implementation")]),e._v(" "),n("li",[e._v('Optional "Replace" Statement in the SQL translation. When\n"Replace" is off the SQL performs much better.')]),e._v(" "),n("li",[e._v("Several Bug Fixes:\n"),n("ul",[n("li",[e._v("Issue with 'true' in Oracle")]),e._v(" "),n("li",[e._v("Meta-mapping editing in Protege")]),e._v(" "),n("li",[e._v("Problem with regex in Oracle")]),e._v(" "),n("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-11-0-february-19-2014"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-11-0-february-19-2014"}},[e._v("#")]),e._v(" 1.11.0 (February 19, 2014)")]),e._v(" "),n("ul",[n("li",[e._v("Support for Consistency Checking")]),e._v(" "),n("li",[e._v("Improved Performance")]),e._v(" "),n("li",[e._v("Support for Multi-schema queries")]),e._v(" "),n("li",[e._v("New SQL parser for the mapping based on JSQLParser.")]),e._v(" "),n("li",[e._v("Extended the supported SQL language: IN, BETWEEN, LIKE, etc.")]),e._v(" "),n("li",[e._v("Extended the supported SPARQL: BIND")]),e._v(" "),n("li",[e._v("Improved the Treewitness rewriting algorithm.")]),e._v(" "),n("li",[e._v("Upgraded to Sesame 2.7.10")]),e._v(" "),n("li",[e._v("General clean-up")]),e._v(" "),n("li",[e._v("Fixed a number of bugs:\n"),n("ul",[n("li",[e._v("Translation of SAPRQL REGEX into SQL")]),e._v(" "),n("li",[e._v("Infinite loop triggered by some nested Optionals")]),e._v(" "),n("li",[e._v("Several issues with Construct")]),e._v(" "),n("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),n("h2",{attrs:{id:"_1-10-0-december-16-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-10-0-december-16-2013"}},[e._v("#")]),e._v(" 1.10.0 (December 16, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Ontop under Apache license")]),e._v(" "),n("li",[e._v("Ontop packages in central maven repository")])]),e._v(" "),n("h2",{attrs:{id:"_1-9-0-september-18-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-9-0-september-18-2013"}},[e._v("#")]),e._v(" 1.9.0 (September 18, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Update to Sesame 2.7.6 (latest)")]),e._v(" "),n("li",[e._v("Validation of datatypes w.r.t. XMLSchema specification")]),e._v(" "),n("li",[e._v("New hybrid Abox functionality support")]),e._v(" "),n("li",[e._v("Removed all dependencies to Jena")]),e._v(" "),n("li",[e._v("Removed wrong/unnecessary dependencies")]),e._v(" "),n("li",[e._v("Turtle parser can handle variables in the predicate")]),e._v(" "),n("li",[e._v("Mappings with URI templates in class or properties suppot")]),e._v(" "),n("li",[e._v("First version of mapping splitter")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception when the URI in Protege plugin was\nempty")]),e._v(" "),n("li",[e._v("Bug fix: Literal and literal with language tag handling")]),e._v(" "),n("li",[e._v("Bug fix: Shutdown of Sesame repoConnection")]),e._v(" "),n("li",[e._v("Bug fix: Object column literal gerenation in R2RML")]),e._v(" "),n("li",[e._v("Bug fix: Queries that would not finish execution")]),e._v(" "),n("li",[e._v("Bug fix: Unexpected bindings in unfolder")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception in ontology translation in the case\nof unsupported axiom")]),e._v(" "),n("li",[e._v("Bug fix: OWL class assertion generation, inverted arguments")]),e._v(" "),n("li",[e._v("Bug fix: SameTerm in sparql algebra to datalog translation")]),e._v(" "),n("li",[e._v("Bug fix: URI template matcher to find most specific matches first")]),e._v(" "),n("li",[e._v("Bug fix: Construct queries")]),e._v(" "),n("li",[e._v("Bug fix: Describe queries")])]),e._v(" "),n("h2",{attrs:{id:"_1-8-0-july-29-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-8-0-july-29-2013"}},[e._v("#")]),e._v(" 1.8.0 (July 29, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Improve error message and better exception handling.")]),e._v(" "),n("li",[e._v("Change the representation of "),n("code",[e._v("null")]),e._v(" value in BindingSet")]),e._v(" "),n("li",[e._v("Modified the computation of the LeftJoin to support empty evaluation\nin its second argument.")]),e._v(" "),n("li",[e._v("Changed the type of the semantic index table for integer data\nproperty assertion from INT to BIGINT to be able to handle\n"),n("code",[e._v("xsd:integer")]),e._v(" type")]),e._v(" "),n("li",[e._v("Set index creation during Quest startup")]),e._v(" "),n("li",[e._v("Implement new feature for bootstrapping, command line scripts,\nintegration in ontoPro plugin")]),e._v(" "),n("li",[e._v("Updated the URI templates in Turtle mapping syntax to make it\nsimpler and closer to Turtle. Now quotes, question marks and\nclass/property declarations are no longer required")])]),e._v(" "),n("p",[e._v("For example, in the previous syntax:")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(' <"test;person/{?id}"> a :MyClass; :hasName {?name}.\n')])])]),n("p",[e._v("becomes simply")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(" test:person/{id} a :MyClass ; :hasName {name} .\n")])])]),n("ul",[n("li",[e._v('Support "%", "=", ";" characters in the URI template.')])]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(" :class/{id};{name}%{class type}\n")])])]),n("ul",[n("li",[e._v("Bug fix: Major bugs in execution handling SPARQL Construct and\nSPARQL Describe queries.")]),e._v(" "),n("li",[e._v("Bug fix: Issues related to commits and batch sizes in\nQuestOWLStatement")]),e._v(" "),n("li",[e._v("Bug fix: Issue with URI template matcher that generates "),n("code",[e._v("null")]),e._v(' in\ncase failed template (now it generates URI("xxxx") where xxx is\nthe URI that was being matched.)')]),e._v(" "),n("li",[e._v("Bug fix: Issue in existential clause in tree-witness algorithm")]),e._v(" "),n("li",[e._v("Bug fix: Issue in the maximum size of URI that has more than 400\ncharacters")]),e._v(" "),n("li",[e._v("Bug fix: Issue in some data that can not be tracked when inserted\ninto the database. In particular if the data comes from\nclasses/properties that were simplified by the equivalence\nresolution.")]),e._v(" "),n("li",[e._v("Bug fix: Issue in exception handling during index creation in\nsemantic index test.")]),e._v(" "),n("li",[e._v("Bug fix: Issue in SQL parser that it doesn't capture the scope\nwithin parentheses in the WHERE clause.")]),e._v(" "),n("li",[e._v("Remove table and column identifier quotes in the SQL target query\nstring so that the parser can parse properly. For example:")])]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(' SELECT "Student"."sid" from "Student"\n')])])]),n("p",[e._v("will become:")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",[n("code",[e._v(" SELECT Student.sid from Student\n")])])]),n("ul",[n("li",[e._v("New semantic index implementation with integer references for URIs\nfor faster query answering (faster joins on integers instead of\nstrings)")])]),e._v(" "),n("p",[n("strong",[e._v("Ontop source code")])]),e._v(" "),n("ul",[n("li",[e._v("Ontop is now in GitHub!")]),e._v(" "),n("li",[e._v("Cleaner and slimmer project structure. We removed obsolete classes\nand tests.")]),e._v(" "),n("li",[e._v("Code refactor in Materialiser API, MinimalCQProducer and\nConstruct-Describe query execution.")]),e._v(" "),n("li",[e._v("More complete test cases for testing Quest features, e.g.,\nTree-Witness rewriting, Data materialiser, SQL parser, SPARQL\nConstruct, SPARQL Describe, SPARQL Optional, Database metadata and\nQuery completeness.")]),e._v(" "),n("li",[e._v("Support JUnit4 test cases.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha2-rev-2305-april-5-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2305-april-5-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2305, April 5, 2013)")]),e._v(" "),n("ul",[n("li",[e._v("Support for importing/exporting R2RML mappings")]),e._v(" "),n("li",[e._v('Support for automated mapping generation as defined by the "Direct\nMapping" W3C specification')]),e._v(" "),n("li",[e._v("Various options for data materialization (similar to dump-rdf in\nD2RQ)")]),e._v(" "),n("li",[e._v("Support for concurrent queries in the SPARQL endpoint through\nconnection pooling")]),e._v(" "),n("li",[e._v("Better support for Oracle, Postgres, SQL Server and DB2")]),e._v(" "),n("li",[e._v("Improved the SQL queries generated by Quest by avoiding some\noperations when unnecessary (e.g., casting), and placing optimally\nthe JOIN conditions in the SQL query.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha2-rev-2178-february-7-2013"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2178-february-7-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2178, February 7, 2013)")]),e._v(" "),n("p",[n("strong",[e._v("-ontopQuest-")])]),e._v(" "),n("ul",[n("li",[e._v("Mapping optimiser: improved the generation of OR mappings")]),e._v(" "),n("li",[e._v("Mapping optimiser: improved the simplification of mappings using\nFOREIGN KEYS")]),e._v(" "),n("li",[e._v("Query optimiser: Improved the query optimiser to avoid generation of\nredundant JOINs and redundant UNIONs w.r.t. FOREIGN KEYs")]),e._v(" "),n("li",[e._v("Support percent encoding in strings in URI templates as defined by\nthe R2RML standard.")]),e._v(" "),n("li",[e._v("Better propagation of Exception messages in the Sesame provider")]),e._v(" "),n("li",[e._v("New "),n("strong",[e._v("scripts for querying quest")]),e._v(" from the command line")])]),e._v(" "),n("p",[n("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),n("ul",[n("li",[n("strong",[e._v("Introducing mapping assistant")]),e._v(". A new GUI-based tool for creating\nmappings. This is an experimental GUI to help you create mappings in\na faster way, please help us improve it by reporting any issues you\nmay find. (See "),n("a",{attrs:{href:"ObdalibPluginMappingAssistant",title:"wikilink"}},[e._v("\nguideliness")]),e._v(").")]),e._v(" "),n("li",[e._v('Users can set the max number of tuples returned in "OBDA Query"\ntab.')])]),e._v(" "),n("p",[n("strong",[e._v("Mapping language features (-ontopQuest- and -ontopCore-)")])]),e._v(" "),n("ul",[n("li",[e._v("Support URI identifier obtained directly from the database (no using\nURI template).")]),e._v(" "),n("li",[e._v("Support multiple lines when wrting SQL source query (See "),n("a",{attrs:{href:"ObdalibObdaFile#SourceandMappingDeclaration",title:"wikilink"}},[e._v(" feature\nnotes")]),e._v(")")])]),e._v(" "),n("p",[n("strong",[e._v("Bug fixes")])]),e._v(" "),n("ul",[n("li",[e._v("Bug fix: Issue with MySQL and UTF8 characters (Korean in particular)")]),e._v(" "),n("li",[e._v('Bug fix: Issue with "unbound variable freshX_X found while\ngenerating SQL" fixed.')]),e._v(" "),n("li",[e._v("Bug fix: Inverse minimum cardinality assertion was being ignored.")]),e._v(" "),n("li",[e._v("Bug fix: Source SQL query doesn't accept parenthesis in WHERE\nclause.")]),e._v(" "),n("li",[e._v("Bug fix: JDBC connection doesn't recover when connection lost.")]),e._v(" "),n("li",[e._v("Bug fix: Sesame virtual repository fails to read Quest preferences.")]),e._v(" "),n("li",[e._v("Bug fix: CSV export function only exports 101 tuples instead of all\nthe tuples.")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception in the query result table.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-2039-december-30-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-2039-december-30-2012"}},[e._v("#")]),e._v(" 1.7-alpha (rev 2039, December 30, 2012)")]),e._v(" "),n("p",[n("strong",[e._v("SPARQL support")])]),e._v(" "),n("ul",[n("li",[e._v("Support for most SPARQL built in functions, e.g., arithmetics, type\nchecking, etc.")]),e._v(" "),n("li",[e._v("Support for CONSTRUCT and DESCRIBE result forms")]),e._v(" "),n("li",[e._v("Support for OPTIONAL and bound, which allow you to have NEGATION in\nthe usual SPARQL 1.0 style.")]),e._v(" "),n("li",[e._v('Support for variables in ANY position, e.g., to allow queries such\nas SELECT ?p ?v WHERE { ?x :name "John Smith". ?x ?p ?v }')]),e._v(" "),n("li",[e._v("Stronger compliance to standard RDF and SPARQL semantics for FILTER\nexpressions")])]),e._v(" "),n("p",[n("strong",[e._v("Performance")])]),e._v(" "),n("ul",[n("li",[e._v("Multiple improvements to the SPARQL-to-rule translation, mapping and\nTBox optimization algorithms.")]),e._v(" "),n("li",[e._v("New algorithm for query rewriting w.r.t. the TBox that increases the\nperformance of query answering by many orders of magnitude when\ninference w.r.t. to existential constants is enabled. The\nimplementation has been contributed by Dr. Roman Kontchakov.")]),e._v(" "),n("li",[e._v("New benchmarks. We tested against Virtuoso triple store, Virtuoso\nRDF views and D2R Server using the BSBM and FishMark benchmarks.")])]),e._v(" "),n("p",[n("strong",[e._v("APIs and Accessibility")])]),e._v(" "),n("ul",[n("li",[e._v('Completely new Sesame API provider, now users of Sesame can create\n"Virtual RDF repositories" with -ontop-')]),e._v(" "),n("li",[e._v("SPARQL end-point support through integration with Sesame's\nworkbench")])]),e._v(" "),n("p",[n("strong",[e._v("Mapping language")])]),e._v(" "),n("ul",[n("li",[e._v('Improved support for default literal types, now it conforms with the\nR2RML "Natural Mapping" specification')]),e._v(" "),n("li",[e._v("Support for language tags obtained from the DB")]),e._v(" "),n("li",[e._v("Proper support for constants in the mappings")]),e._v(" "),n("li",[e._v("Proper internal handling of NULL values in the database (as\nrecommended by the R2RML standard)")])]),e._v(" "),n("p",[n("strong",[e._v("Database support")])]),e._v(" "),n("ul",[n("li",[e._v("Restored support for Oracle, DB2 and SQL Server")]),e._v(" "),n("li",[e._v("Improved support and performance over MySQL")])]),e._v(" "),n("p",[n("strong",[e._v("Documentation")])]),e._v(" "),n("ul",[n("li",[e._v("Revised and extended all technical documentation")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1692-august-16-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1692-august-16-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1692 (August 16, 2012)")]),e._v(" "),n("p",[n("strong",[e._v("-ontop- general")])]),e._v(" "),n("ul",[n("li",[e._v("New file content for the OBDA output file. The file is no longer in\nXML format but instead it uses plain text for simplicity (Issue:\n#244).")]),e._v(" "),n("li",[e._v("Improved error messages when the system initializes, parses\nmappings, fails to")])]),e._v(" "),n("p",[n("code",[e._v("execute queries, etc.")]),n("br"),e._v(" "),n("code")]),e._v(" "),n("p",[n("strong",[e._v("-ontopPro- Protege plugin")])]),e._v(" "),n("ul",[n("li",[e._v("Support Protégé 4.2")]),e._v(" "),n("li",[e._v("Add cancel button during query execution to terminate the process\nimmediately.")]),e._v(" "),n("li",[e._v("Add help button to guide filling data source parameters.")]),e._v(" "),n("li",[e._v("The plugin no longer introduces prefix definitions")]),e._v(" "),n("li",[e._v('Implemented "Cancel" function for query execution')]),e._v(" "),n("li",[e._v("New shortcut CONTROL + T to test mappings in the mapping creator")]),e._v(" "),n("li",[e._v("Fixed several issues with prefix management and rendering of")])]),e._v(" "),n("p",[n("code",[e._v("URIs short forms")])]),e._v(" "),n("ul",[n("li",[e._v("Improved GUI, hints and suggestions for JDBC connections, improved\nTAB navigation")])]),e._v(" "),n("p",[n("code",[e._v("in all dialogs")])]),e._v(" "),n("ul",[n("li",[e._v("Bug fix: Improve error reporting and stack trace printing (Issue:\n#255, #262)")]),e._v(" "),n("li",[e._v("Bug fix: The target and source string got saved partially if\nnewlines are used.")]),e._v(" "),n("li",[e._v("Bug fix: The OBDA model doesn't get loaded if the query has an\nexception.")]),e._v(" "),n("li",[e._v("Improved error management during .obda and query file load")]),e._v(" "),n("li",[e._v("Fixed null pointer exception and blank window that appear in cases\nwhere the .owl file")])]),e._v(" "),n("p",[n("code",[e._v("in OWL/RDF contained different default ns and a default prefix")])]),e._v(" "),n("p",[n("strong",[e._v("-ontopQuest- OWL Reasoner")])]),e._v(" "),n("ul",[n("li",[e._v("Added support for SPARQL query modifiers: ORDER BY, OFFSET and LIMIT\n(Issue: #261).")]),e._v(" "),n("li",[e._v("Add query caching to speed up the system performance, now repeated\nquery execution will not require SQL generation every time.")]),e._v(" "),n("li",[e._v("Relaxed on punning checks to allow loading of DBPedia and similar\nontologies.")]),e._v(" "),n("li",[e._v("EXPERIMENTAL: Added support for mixed ABoxes for class assertions,\ni.e., most data comes from the mappings but a bit of data is also\nallowed in the ABox, e.g., global facts Planet('mars')")]),e._v(" "),n("li",[e._v("Improved support for MySQL, Postgres, DB2 and SQL Server dialects")]),e._v(" "),n("li",[e._v("Added a warnings when axioms are being ignored because of being out\nof OWL 2 QL")]),e._v(" "),n("li",[e._v("Improved error reporting on failed connections")]),e._v(" "),n("li",[e._v("Improved support for SQL AS for table and column renaming in\nmappings")]),e._v(" "),n("li",[e._v("New way to generate SQL. SQL now includes typing information and is\npretty printed.")]),e._v(" "),n("li",[e._v("Bug fix: Fixed issue with INVALID URI that appeared when mappings\nused data that contained invalid characters for URI's (e.g., white\nspace) Now we call URIEncode (Jena's) before returning the value.")]),e._v(" "),n("li",[e._v("Bug fix: Exception when importing data as ABox individuals.")]),e._v(" "),n("li",[e._v("Bug fix: Exception when null values is used as constants.")]),e._v(" "),n("li",[e._v("Bug fix: Exception if ambiguous column names are used in SQL\nqueries.")]),e._v(" "),n("li",[e._v("Bug fix: Wrong URI shorten if there are two or more namespaces with\noverlapping strings.")]),e._v(" "),n("li",[e._v("Bug fix: Null pointer exception due to inconsistent OBDA model\nidentifier string.")]),e._v(" "),n("li",[e._v("Bug fix: Unknown signature in the SELECT clause if the name is a\nqualified name and it comes from a view (Issue: #259)")]),e._v(" "),n("li",[e._v("Bug fix: Exception when using URIs as a constant values in SPARQL.")]),e._v(" "),n("li",[e._v("Bug fix: Prefix Manager accepts any string including invalid prefix\nnames.")])]),e._v(" "),n("p",[e._v("Known issues:")]),e._v(" "),n("ul",[n("li",[e._v("The ORDER BY modifier is not ready for columns with literal datatype")]),e._v(" "),n("li",[e._v("Issues with MySQL in non-ANSI mode")]),e._v(" "),n("li",[e._v("DateTime data properties in Oracle can crash the system.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1529-june-12-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1529-june-12-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1529 (June 12, 2012)")]),e._v(" "),n("p",[n("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),n("ul",[n("li",[e._v("Better layout, fonts and command icons.")]),e._v(" "),n("li",[e._v("Better query saving mechanism (Issue: #248)")]),e._v(" "),n("li",[e._v("Better error reporting to users and crash handling (Issue:\n#255, 256)")]),e._v(" "),n("li",[e._v("Pretty printing of SQL queries (Issue: #254)")]),e._v(" "),n("li",[e._v("Re-enabled the export function in the Query Interface panel (Issue:\n#213, #250)")]),e._v(" "),n("li",[e._v("Improved syntax-error messages in the mapping editor tooltip")]),e._v(" "),n("li",[e._v("Cleaned console messages")]),e._v(" "),n("li",[e._v('Added "Number of sources" indicator to show how many sources are\nalready declared in the OBDA model.')]),e._v(" "),n("li",[e._v("Improved ESC and CONTROL+ENTER shortcuts in most dialogs in the GUI.")]),e._v(" "),n("li",[e._v("Replaced JDBC Driver text box with an editable Combo Box with\ndefault driver string.")]),e._v(" "),n("li",[e._v("Better OBDA statistics table (Issue: #251)")]),e._v(" "),n("li",[e._v("Bug fix: CRITICAL stability issue that would rise an end-less cycle\nof warning messages when Quest crashed.")]),e._v(" "),n("li",[e._v('Bug fix: issue with final dot "." in mappings.')])]),e._v(" "),n("p",[n("strong",[e._v("-ontopQuest-")])]),e._v(" "),n("ul",[n("li",[e._v("Added support for data-type UUIDs for SQL Server (Issue: #253)")]),e._v(" "),n("li",[e._v("Now we create forward-only and concur-read-only JDBC Statements by\ndefault to allow for server side cursors.")]),e._v(" "),n("li",[e._v("Bug fix: issue with SQL parser and table renamings in SQL queries\n(Issue: #259)")]),e._v(" "),n("li",[e._v("Bug fix: issue with NULL pointer when primary key optimization in\nunfolding when there is a join on primary condition but atoms are\nnot unifiable.")])]),e._v(" "),n("p",[e._v("Known issues:")]),e._v(" "),n("ul",[n("li",[e._v("Oracle is unstable")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1479-may-22-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1479-may-22-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1479 (May 22, 2012)")]),e._v(" "),n("p",[e._v("Quest performance and features:")]),e._v(" "),n("ul",[n("li",[e._v("T-Mappings algorithm optimization: Combine disjunctive conditions in\nOR clauses instead of multiple mappings. This reduces the size of\nthe final query and improves its performance. (Issue: #237)")])]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("Support using IS NULL and IS NOT NULL in SQL query (Issue: #200).")]),e._v(" "),n("li",[e._v("Support using UNION in SPARQL queries.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v("Fix packing problem in Windows XP (Issue: #228)")]),e._v(" "),n("li",[e._v("Fix packing problem in Linux")]),e._v(" "),n("li",[e._v("Fix unresponsive plugin when using mapping filter (Issue: #217).")]),e._v(" "),n("li",[e._v("Fix unresponsive plugin when inserting a new mapping (Issue: #232).")]),e._v(" "),n("li",[e._v("Fix support for MySQL in both virtual and classic mode (Issue:\n#238).")]),e._v(" "),n("li",[e._v("Fix support for Oracle in virtual mode (Issue: #226).")]),e._v(" "),n("li",[e._v('Fix issue where creating or modifying a mapping would not trigger a\n"ontology out of synch" flag.')])]),e._v(" "),n("p",[e._v("Known Issue:")]),e._v(" "),n("ul",[n("li",[e._v("Oracle still has some issues in classic mode.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1446-may-4-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1446-may-4-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1446 (May 4, 2012)")]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("Add support on writing qualified name for atom predicates.")]),e._v(" "),n("li",[e._v("Add coloring for atoms typed Individual in the target query.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v('Fix the "Show Short URIs" feature in the query panel.')])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1440-may-2-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1440-may-2-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1440 (May 2, 2012)")]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("Support writing URI constants in target queries (Issue: #227)")])]),e._v(" "),n("p",[e._v("General:")]),e._v(" "),n("ul",[n("li",[e._v("Better system logging for recording exceptions.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v("Fix the null pointer exception due to the old OBDA preferences.")]),e._v(" "),n("li",[e._v("Fix bugs related to vocabulary prefixes.")])]),e._v(" "),n("h2",{attrs:{id:"_1-7-alpha-rev-1427-april-17-2012"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1427-april-17-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1427 (April 17, 2012)")]),e._v(" "),n("p",[e._v("Quest performance and features:")]),e._v(" "),n("ul",[n("li",[e._v("Implemented the T-Mappings mapping optimization algorithm improved\nperformance of query rewriting in Virtual Mode. Now query rewriting\nis as fast in virtual ABox mode as in classic ABox mode (Issue:\n#169)")]),e._v(" "),n("li",[e._v("Implemented a new query containment algorithm that is many times\nfaster than before.")]),e._v(" "),n("li",[e._v("Added data source analysis to obtain DB metadata for SQL query\ngeneration.")]),e._v(" "),n("li",[e._v("Added analysis of SQL queries in the mappings to produce better SQL\nqueries.")]),e._v(" "),n("li",[e._v("Added "),n("strong",[e._v("SQL JOIN ELIMINATION")]),e._v(" using PRIMARY KEY metadata.")]),e._v(" "),n("li",[e._v("Added mappings optimization using query containment w.r.t.\nconstraints")]),e._v(" "),n("li",[e._v("Added initial support for "),n("strong",[e._v("FILTER")])]),e._v(" "),n("li",[e._v("Added support for typed constants in SPARQL queries (Issue: #157)")]),e._v(" "),n("li",[e._v("Small updates to internal API for speed of equality, hash and clone\ncomputation")])]),e._v(" "),n("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),n("ul",[n("li",[e._v("New Turtle-like syntax for mappings allows for more succinct and\neasy to read mappings.")]),e._v(" "),n("li",[e._v("Added support for LANGUAGE tag for the Literal datatype (Issue:\n#198)")]),e._v(" "),n("li",[e._v("Added support for datatypes in the OBDA mapping axioms (Issue:\n#147, #194, #196)")]),e._v(" "),n("li",[e._v("Added URI templates for URI creation in mapping mapping axioms\n(Issue: #151)")]),e._v(" "),n("li",[e._v("New feature for typing literals in mapping axioms (Issue: #194,\n#207)")])]),e._v(" "),n("p",[e._v("General:")]),e._v(" "),n("ul",[n("li",[e._v("Added support for OWL API 3 (Issue: #98)")]),e._v(" "),n("li",[e._v("Internal refactoring of all modules and packages for a cleaner API")])]),e._v(" "),n("p",[e._v("ontopPro:")]),e._v(" "),n("ul",[n("li",[e._v("The plugin is now compatible with Protege 4.1 (Issue: #99)")]),e._v(" "),n("li",[e._v("The plugin has a new and fresh GUI display.")]),e._v(" "),n("li",[e._v("Stronger integration with Protege's refactoring mechanism")]),e._v(" "),n("li",[e._v("The ABox materializer can import data complete with datatype\ninformation (Issue: #195)")]),e._v(" "),n("li",[e._v("The target query use Turtle syntax for better display and management\n(Issue: #204)")]),e._v(" "),n("li",[e._v("The plugin has Class/Property panel for better navigation and\nfiltering.")])]),e._v(" "),n("p",[e._v("Bug Fixes:")]),e._v(" "),n("ul",[n("li",[e._v("Fixed a problem with the encoding of axioms of the form\nsubClassOf(Person, hasFather some Person)")]),e._v(" "),n("li",[e._v("Fixed issues with open and dead JDBC connections")]),e._v(" "),n("li",[e._v("Cleaned OWLReasoner synchronization issue")]),e._v(" "),n("li",[e._v("Fixed null pointer exceptions related to incorrect mappings")]),e._v(" "),n("li",[e._v("Proper error handling for translating an empty datalog program\n(Issue: #197)")]),e._v(" "),n("li",[e._v('Fixed the "Attach Prefixes" feature in the OBDA Query panel\n(Issue: #211)')]),e._v(" "),n("li",[e._v("Fixed issue regarding xsd:dateTime (Issue: #199)")])]),e._v(" "),n("h2",{attrs:{id:"_1-6-1-october-19-2011"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-1-october-19-2011"}},[e._v("#")]),e._v(" 1.6.1 (October 19, 2011)")]),e._v(" "),n("ul",[n("li",[e._v("Fast patch in the query translation module.")])]),e._v(" "),n("h2",{attrs:{id:"_1-6-october-18-2011"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-october-18-2011"}},[e._v("#")]),e._v(" 1.6 (October 18, 2011)")]),e._v(" "),n("ul",[n("li",[e._v("Allow fast navigation using TAB key in the new mapping form (Issue:\n#92)")]),e._v(" "),n("li",[e._v("Allow SQL query execution in the mapping tree (Issue: #104)")]),e._v(" "),n("li",[e._v("Improvement in the error message deliveries (Issues: #107, #112,\n#118)")]),e._v(" "),n("li",[e._v('Improvement in the data source management tab, including adding\n"Test Connection" button (Issues: #108, #111, #114)')]),e._v(" "),n("li",[e._v("Add OBDA model statistics report (Issues: #106, #117)")]),e._v(" "),n("li",[e._v("Add support for adding integrated data source in Teiid (Issue: #89)")]),e._v(" "),n("li",[e._v("Fix the unresponsive cancel button during importing OWL Individuals\n(Issue: #88)")]),e._v(" "),n("li",[e._v("Fix CSV header in the exported query result (Issue: #120)")]),e._v(" "),n("li",[e._v("Fix connection failure when users change the parameters (Issue:\n#121)")]),e._v(" "),n("li",[e._v("Fix the password field so now the text is hidden (Issue: #113)")]),e._v(" "),n("li",[e._v("Fix query selection in the OBDA query tab (Issue: #91)")]),e._v(" "),n("li",[e._v("Fix import failure when storing very long record values (Issue:\n#95)")]),e._v(" "),n("li",[e._v("Fix import failure when storing records that contain single quotes\n(Issue: #96)")])]),e._v(" "),n("h2",{attrs:{id:"_1-5-1-rc1-july-15-2011"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-5-1-rc1-july-15-2011"}},[e._v("#")]),e._v(" 1.5.1-RC1 (July 15, 2011)")]),e._v(" "),n("ul",[n("li",[e._v("Significant code refactoring in the plugin. This effort makes the\ncode easier to debug and to extend, and is almost ready for Protege\n4.1 and OWL-API 3.0 support.")]),e._v(" "),n("li",[e._v("Term renaming. Modified the term 'Mapping Head' to 'Target\nQuery' and 'Mapping Body' to 'Source Query' to maintain the\nconsistency with the literature.")]),e._v(" "),n("li",[e._v("Temporarly disabled the SPARQL query coloring.")]),e._v(" "),n("li",[e._v("Temporarly disabled the 'Load OWL Individuals into DB'\nfunctionality.")]),e._v(" "),n("li",[e._v("Add improved search filters in the mapping manager (Issues: #37,\n#54).")]),e._v(" "),n("li",[e._v("Add 'show short URIs' option in the query results to hide long URI\nstrings.")]),e._v(" "),n("li",[e._v("Add 'select all', 'select none', 'expand all' and 'collapse\nall' buttons for easy browsing in the mapping tree (Issues: #35,\n#36).")]),e._v(" "),n("li",[e._v("Add mapping validation with respect to the vocabulary in the\nontology (Issues: #42).")]),e._v(" "),n("li",[e._v("Add input validation to many parts of the GUI (Issues: #63, #64,\n#65, #67, #68, #69, #70, #71, #76).")]),e._v(" "),n("li",[e._v("Fix the save query functionality in the Query manager (Issues:\n#57).")]),e._v(" "),n("li",[e._v("Fix the persistency of user preferences when opening/closing Protege\n(Issues: #58).")]),e._v(" "),n("li",[e._v("Fix the exceptions that appeared when loading/saving/reloading\nontologies (Issues: #59, #60, #61, #75).")]),e._v(" "),n("li",[e._v("Fix problems with several progress dialogs in the GUI (Issues: #50,\n#87).")]),e._v(" "),n("li",[e._v("Fix problems in the 'tuple count' functionality (Issues: #82,\n#84).")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/62.d2593334.js b/assets/js/62.c00199c1.js similarity index 99% rename from assets/js/62.d2593334.js rename to assets/js/62.c00199c1.js index 17f5831b2..6a538b189 100644 --- a/assets/js/62.d2593334.js +++ b/assets/js/62.c00199c1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{439:function(e,t,r){"use strict";r.r(t);var o=r(51),a=Object(o.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"faq"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),r("p",[e._v("Some Frequently Asked Questions")]),e._v(" "),r("h2",{attrs:{id:"general"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#general"}},[e._v("#")]),e._v(" General")]),e._v(" "),r("h3",{attrs:{id:"which-mapping-syntaxes-are-supported"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#which-mapping-syntaxes-are-supported"}},[e._v("#")]),e._v(" Which mapping syntaxes are supported?")]),e._v(" "),r("p",[e._v("We support "),r("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML"),r("OutboundLink")],1),e._v(" and our own mapping syntax, which can be automatically converted into R2RML using Ontop CLI command "),r("a",{attrs:{href:"/guide/cli#ontop-mapping-to-r2rml"}},[r("code",[e._v("ontop mapping to-r2rml")])])]),e._v(" "),r("h3",{attrs:{id:"is-it-open-source"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#is-it-open-source"}},[e._v("#")]),e._v(" Is it open source?")]),e._v(" "),r("p",[e._v("Yes! Ontop is available under the Apache License, Version 2.0.")]),e._v(" "),r("h3",{attrs:{id:"how-can-i-report-a-bug-or-ask-other-questions"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-report-a-bug-or-ask-other-questions"}},[e._v("#")]),e._v(" How can I report a bug or ask other questions?")]),e._v(" "),r("p",[e._v("You can get in touch with us through "),r("a",{attrs:{href:"/community/support"}},[e._v("our support channels")]),e._v(" and "),r("RouterLink",{attrs:{to:"/community/contributing/"}},[e._v("contribute to the project")]),e._v("\nby, for instance, filing a "),r("a",{attrs:{href:"/community/contributing/bug-report"}},[e._v("bug report")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"does-ontop-support-sparql-update"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#does-ontop-support-sparql-update"}},[e._v("#")]),e._v(" Does Ontop support SPARQL Update?")]),e._v(" "),r("p",[e._v("No, as for now, Ontop is a read-only system, it does not support "),r("a",{attrs:{href:"https://www.w3.org/TR/sparql11-update/",target:"_blank",rel:"noopener"}},[e._v("SPARQL Update queries"),r("OutboundLink")],1),e._v(" but only SELECT, CONSTRUCT, ASK and DESCRIBE queries. For more details, see "),r("a",{attrs:{href:"/guide/compliance"}},[e._v("the compliance page")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"how-to-set-the-log-level-to-debug"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-to-set-the-log-level-to-debug"}},[e._v("#")]),e._v(" How to set the log level to debug?")]),e._v(" "),r("p",[e._v("For both the Docker image and the CLI, set the environment variable "),r("code",[e._v("ONTOP_LOG_LEVEL")]),e._v(" to "),r("code",[e._v("debug")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"protege"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege"}},[e._v("#")]),e._v(" Protégé")]),e._v(" "),r("h3",{attrs:{id:"no-suitable-driver-found-for-driver"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-suitable-driver-found-for-driver"}},[e._v("#")]),e._v(" No suitable driver found for .. (driver)")]),e._v(" "),r("p",[e._v("You need to download and install the right JDBC driver in Protégé.\nThis is required in order to query using SPARQL and use other features of Ontop. To add a new JDBC Driver:")]),e._v(" "),r("ul",[r("li",[e._v("in Protégé, go to "),r("em",[e._v("Preference")]),e._v(" -> "),r("em",[e._v("JDBC Drivers")]),e._v(" tab;")]),e._v(" "),r("li",[e._v("add a new entry;")]),e._v(" "),r("li",[e._v("type a description, e.g., "),r("em",[e._v("PostgreSQL JDBC Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type the driver’s class string, e.g., "),r("em",[e._v("org.postgresql.Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type or select the location of the driver’s JAR file, e.g., "),r("em",[e._v("postgresql-8.4-701.jdbc4.jar")]),e._v(";")]),e._v(" "),r("li",[e._v("click OK .")])]),e._v(" "),r("p",[e._v("See also\n"),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ontopProInstallation#setting-up-the-jdbc-drivers-in-protege",target:"_blank",rel:"noopener"}},[e._v("Setting up JDBC Drivers"),r("OutboundLink")],1),e._v("\nand "),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ObdalibPluginJDBC",target:"_blank",rel:"noopener"}},[e._v("JDBC Information"),r("OutboundLink")],1),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"no-jdbc-drivers-tab-in-the-preferences"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-jdbc-drivers-tab-in-the-preferences"}},[e._v("#")]),e._v(' No "JDBC drivers" tab in the preferences')]),e._v(" "),r("p",[e._v("You probably can see the following message in the Protégé console:")]),e._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[e._v("org.osgi.framework.BundleException: Activator start error in bundle org.protege.osgi.jdbc.prefs [20].)\norg.protege.osgi.jdbc.RegistryException: java.lang.ClassNotFoundException: org.h2.Driver\n")])])]),r("p",[e._v("Please go to the "),r("em",[e._v("Preferences")]),e._v(" and click on "),r("em",[e._v('"Reset preferences"')]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"protege-does-not-show-the-ontop-tabs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege-does-not-show-the-ontop-tabs"}},[e._v("#")]),e._v(" Protégé does not show the Ontop tabs")]),e._v(" "),r("p",[e._v("To see the tabs go to "),r("em",[e._v("Windows -> tabs -> Ontop Mappings and Ontop SPARQL")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"rdf4j-workbench-not-supported-anymore"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf4j-workbench-not-supported-anymore"}},[e._v("#")]),e._v(" RDF4J workbench (not supported anymore)")]),e._v(" "),r("h3",{attrs:{id:"why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[e._v("#")]),e._v(" Why RDF4J Workbench refuses to delete some repositories?")]),e._v(" "),r("p",[e._v("For deleting metadata about a repository, the RDF4J Workbench should be able to create an instance of this repository. However, if the repository configuration is invalid (due to, for instance to bad mapping and ontology files), such an instance cannot be created.\nTo avoid this situation, the configuration is validated in depth when a new repository is added to the Workbench. However, if the mapping and ontology files are changed afterwards, we offer no protection. One workaround is to create a valid repository with the same name and then to delete it. Another workaround is to delete it from the RDF4J console.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{440:function(e,t,r){"use strict";r.r(t);var o=r(51),a=Object(o.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"faq"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),r("p",[e._v("Some Frequently Asked Questions")]),e._v(" "),r("h2",{attrs:{id:"general"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#general"}},[e._v("#")]),e._v(" General")]),e._v(" "),r("h3",{attrs:{id:"which-mapping-syntaxes-are-supported"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#which-mapping-syntaxes-are-supported"}},[e._v("#")]),e._v(" Which mapping syntaxes are supported?")]),e._v(" "),r("p",[e._v("We support "),r("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML"),r("OutboundLink")],1),e._v(" and our own mapping syntax, which can be automatically converted into R2RML using Ontop CLI command "),r("a",{attrs:{href:"/guide/cli#ontop-mapping-to-r2rml"}},[r("code",[e._v("ontop mapping to-r2rml")])])]),e._v(" "),r("h3",{attrs:{id:"is-it-open-source"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#is-it-open-source"}},[e._v("#")]),e._v(" Is it open source?")]),e._v(" "),r("p",[e._v("Yes! Ontop is available under the Apache License, Version 2.0.")]),e._v(" "),r("h3",{attrs:{id:"how-can-i-report-a-bug-or-ask-other-questions"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-report-a-bug-or-ask-other-questions"}},[e._v("#")]),e._v(" How can I report a bug or ask other questions?")]),e._v(" "),r("p",[e._v("You can get in touch with us through "),r("a",{attrs:{href:"/community/support"}},[e._v("our support channels")]),e._v(" and "),r("RouterLink",{attrs:{to:"/community/contributing/"}},[e._v("contribute to the project")]),e._v("\nby, for instance, filing a "),r("a",{attrs:{href:"/community/contributing/bug-report"}},[e._v("bug report")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"does-ontop-support-sparql-update"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#does-ontop-support-sparql-update"}},[e._v("#")]),e._v(" Does Ontop support SPARQL Update?")]),e._v(" "),r("p",[e._v("No, as for now, Ontop is a read-only system, it does not support "),r("a",{attrs:{href:"https://www.w3.org/TR/sparql11-update/",target:"_blank",rel:"noopener"}},[e._v("SPARQL Update queries"),r("OutboundLink")],1),e._v(" but only SELECT, CONSTRUCT, ASK and DESCRIBE queries. For more details, see "),r("a",{attrs:{href:"/guide/compliance"}},[e._v("the compliance page")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"how-to-set-the-log-level-to-debug"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-to-set-the-log-level-to-debug"}},[e._v("#")]),e._v(" How to set the log level to debug?")]),e._v(" "),r("p",[e._v("For both the Docker image and the CLI, set the environment variable "),r("code",[e._v("ONTOP_LOG_LEVEL")]),e._v(" to "),r("code",[e._v("debug")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"protege"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege"}},[e._v("#")]),e._v(" Protégé")]),e._v(" "),r("h3",{attrs:{id:"no-suitable-driver-found-for-driver"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-suitable-driver-found-for-driver"}},[e._v("#")]),e._v(" No suitable driver found for .. (driver)")]),e._v(" "),r("p",[e._v("You need to download and install the right JDBC driver in Protégé.\nThis is required in order to query using SPARQL and use other features of Ontop. To add a new JDBC Driver:")]),e._v(" "),r("ul",[r("li",[e._v("in Protégé, go to "),r("em",[e._v("Preference")]),e._v(" -> "),r("em",[e._v("JDBC Drivers")]),e._v(" tab;")]),e._v(" "),r("li",[e._v("add a new entry;")]),e._v(" "),r("li",[e._v("type a description, e.g., "),r("em",[e._v("PostgreSQL JDBC Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type the driver’s class string, e.g., "),r("em",[e._v("org.postgresql.Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type or select the location of the driver’s JAR file, e.g., "),r("em",[e._v("postgresql-8.4-701.jdbc4.jar")]),e._v(";")]),e._v(" "),r("li",[e._v("click OK .")])]),e._v(" "),r("p",[e._v("See also\n"),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ontopProInstallation#setting-up-the-jdbc-drivers-in-protege",target:"_blank",rel:"noopener"}},[e._v("Setting up JDBC Drivers"),r("OutboundLink")],1),e._v("\nand "),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ObdalibPluginJDBC",target:"_blank",rel:"noopener"}},[e._v("JDBC Information"),r("OutboundLink")],1),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"no-jdbc-drivers-tab-in-the-preferences"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-jdbc-drivers-tab-in-the-preferences"}},[e._v("#")]),e._v(' No "JDBC drivers" tab in the preferences')]),e._v(" "),r("p",[e._v("You probably can see the following message in the Protégé console:")]),e._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[e._v("org.osgi.framework.BundleException: Activator start error in bundle org.protege.osgi.jdbc.prefs [20].)\norg.protege.osgi.jdbc.RegistryException: java.lang.ClassNotFoundException: org.h2.Driver\n")])])]),r("p",[e._v("Please go to the "),r("em",[e._v("Preferences")]),e._v(" and click on "),r("em",[e._v('"Reset preferences"')]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"protege-does-not-show-the-ontop-tabs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege-does-not-show-the-ontop-tabs"}},[e._v("#")]),e._v(" Protégé does not show the Ontop tabs")]),e._v(" "),r("p",[e._v("To see the tabs go to "),r("em",[e._v("Windows -> tabs -> Ontop Mappings and Ontop SPARQL")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"rdf4j-workbench-not-supported-anymore"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf4j-workbench-not-supported-anymore"}},[e._v("#")]),e._v(" RDF4J workbench (not supported anymore)")]),e._v(" "),r("h3",{attrs:{id:"why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[e._v("#")]),e._v(" Why RDF4J Workbench refuses to delete some repositories?")]),e._v(" "),r("p",[e._v("For deleting metadata about a repository, the RDF4J Workbench should be able to create an instance of this repository. However, if the repository configuration is invalid (due to, for instance to bad mapping and ontology files), such an instance cannot be created.\nTo avoid this situation, the configuration is validated in depth when a new repository is added to the Workbench. However, if the mapping and ontology files are changed afterwards, we offer no protection. One workaround is to create a valid repository with the same name and then to delete it. Another workaround is to delete it from the RDF4J console.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/63.2c41f570.js b/assets/js/63.ab25da0d.js similarity index 97% rename from assets/js/63.2c41f570.js rename to assets/js/63.ab25da0d.js index b9db468a3..b805c854a 100644 --- a/assets/js/63.2c41f570.js +++ b/assets/js/63.ab25da0d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{438:function(t,e,r){"use strict";r.r(e);var o=r(51),n=Object(o.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"work-with-us"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#work-with-us"}},[t._v("#")]),t._v(" Work with us")]),t._v(" "),r("p",[t._v("if you are enthusiastic in the Ontop system and the Virtual Knowledge Graph technology,\nthere are many opportunities, which range from a small course project, to a complete PhD study, or a full time developer position.")]),t._v(" "),r("h2",{attrs:{id:"free-university-of-bozen-bolzano"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#free-university-of-bozen-bolzano"}},[t._v("#")]),t._v(" Free University of Bozen-Bolzano")]),t._v(" "),r("p",[t._v("At the "),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[t._v("In2Data research group"),r("OutboundLink")],1),t._v(" at the KBDB group of Free University of Bozen-Bolzano, we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student course project")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("PhD student positions ("),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/phd/",target:"_blank",rel:"noopener"}},[t._v("https://www.inf.unibz.it/krdb/phd/"),r("OutboundLink")],1),t._v(")")]),t._v(" "),r("li",[t._v("Research assistant / Scientific programmer / PostDoc researcher positions")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[t._v("Prof. Diego Calvanese"),r("OutboundLink")],1),t._v(" or "),r("a",{attrs:{href:"https://www.ghxiao.org/",target:"_blank",rel:"noopener"}},[t._v("Dr. Guohui Xiao"),r("OutboundLink")],1),t._v(".")]),t._v(" "),r("h2",{attrs:{id:"ontopic"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontopic"}},[t._v("#")]),t._v(" Ontopic")]),t._v(" "),r("p",[t._v("At the company "),r("a",{attrs:{href:"https://ontopic.ai/",target:"_blank",rel:"noopener"}},[t._v("Ontopic s.r.l."),r("OutboundLink")],1),t._v(", we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student internship")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("Part time or full time developer positions.")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("code",[t._v("inquiry@ontopic.ai")]),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{439:function(t,e,r){"use strict";r.r(e);var o=r(51),n=Object(o.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"work-with-us"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#work-with-us"}},[t._v("#")]),t._v(" Work with us")]),t._v(" "),r("p",[t._v("if you are enthusiastic in the Ontop system and the Virtual Knowledge Graph technology,\nthere are many opportunities, which range from a small course project, to a complete PhD study, or a full time developer position.")]),t._v(" "),r("h2",{attrs:{id:"free-university-of-bozen-bolzano"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#free-university-of-bozen-bolzano"}},[t._v("#")]),t._v(" Free University of Bozen-Bolzano")]),t._v(" "),r("p",[t._v("At the "),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[t._v("In2Data research group"),r("OutboundLink")],1),t._v(" at the KBDB group of Free University of Bozen-Bolzano, we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student course project")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("PhD student positions ("),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/phd/",target:"_blank",rel:"noopener"}},[t._v("https://www.inf.unibz.it/krdb/phd/"),r("OutboundLink")],1),t._v(")")]),t._v(" "),r("li",[t._v("Research assistant / Scientific programmer / PostDoc researcher positions")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[t._v("Prof. Diego Calvanese"),r("OutboundLink")],1),t._v(" or "),r("a",{attrs:{href:"https://www.ghxiao.org/",target:"_blank",rel:"noopener"}},[t._v("Dr. Guohui Xiao"),r("OutboundLink")],1),t._v(".")]),t._v(" "),r("h2",{attrs:{id:"ontopic"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontopic"}},[t._v("#")]),t._v(" Ontopic")]),t._v(" "),r("p",[t._v("At the company "),r("a",{attrs:{href:"https://ontopic.ai/",target:"_blank",rel:"noopener"}},[t._v("Ontopic s.r.l."),r("OutboundLink")],1),t._v(", we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student internship")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("Part time or full time developer positions.")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("code",[t._v("inquiry@ontopic.ai")]),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/64.ef1c6023.js b/assets/js/64.f9acda2c.js similarity index 89% rename from assets/js/64.ef1c6023.js rename to assets/js/64.f9acda2c.js index 59bd18795..d793f23cf 100644 --- a/assets/js/64.ef1c6023.js +++ b/assets/js/64.f9acda2c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{441:function(t,s,a){"use strict";a.r(s);var o=a(51),e=Object(o.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"vocabularies-for-ontology-based-data-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vocabularies-for-ontology-based-data-access"}},[this._v("#")]),this._v(" Vocabularies for Ontology-Based Data Access")]),this._v(" "),s("p",[this._v("Coming soon!")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{442:function(t,s,a){"use strict";a.r(s);var o=a(51),e=Object(o.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"vocabularies-for-ontology-based-data-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vocabularies-for-ontology-based-data-access"}},[this._v("#")]),this._v(" Vocabularies for Ontology-Based Data Access")]),this._v(" "),s("p",[this._v("Coming soon!")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/65.637a5ac2.js b/assets/js/65.3f7e48f4.js similarity index 99% rename from assets/js/65.637a5ac2.js rename to assets/js/65.3f7e48f4.js index ed3cc131f..1b366c4ea 100644 --- a/assets/js/65.637a5ac2.js +++ b/assets/js/65.3f7e48f4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{442:function(e,t,a){"use strict";a.r(t);var r=a(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"research-team"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#research-team"}},[e._v("#")]),e._v(" Research team")]),e._v(" "),a("p",[e._v("Ontop is a project initiated by Diego Calvanese and Mariano Rodriguez-Muro in 2009 in "),a("a",{attrs:{href:"https://www.inf.unibz.it/krdb/",target:"_blank",rel:"noopener"}},[e._v("the KRDB research centre for Knowledge and Data"),a("OutboundLink")],1),e._v(" at "),a("a",{attrs:{href:"https://www.unibz.it/en/faculties/computer-science/",target:"_blank",rel:"noopener"}},[e._v("the Free University of Bolzano"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("A decade after, Ontop remains very active, both from a research and a software development point of view.")]),e._v(" "),a("h2",{attrs:{id:"researchers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#researchers"}},[e._v("#")]),e._v(" Researchers")]),e._v(" "),a("p",[e._v("Here we list the people who have been involved in the research side of the Ontop project.\nFor the development side, see "),a("a",{attrs:{href:"/community"}},[e._v("the community page")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"at-the-free-university-of-bozen-bolzano-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#at-the-free-university-of-bozen-bolzano-unibz"}},[e._v("#")]),e._v(" At the Free University of Bozen-Bolzano (Unibz)")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.ghxiao.org",target:"_blank",rel:"noopener"}},[e._v("Assistant Prof. Dr. Guohui Xiao"),a("OutboundLink")],1),e._v(" (Team Leader)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Diego Calvanese"),a("OutboundLink")],1),e._v(" (Scientific Coordinator)")]),e._v(" "),a("li",[e._v("Assistant Prof. Dr. Julien Corman")]),e._v(" "),a("li",[e._v("Assistant Prof. Dr. Davide Lanti")]),e._v(" "),a("li",[e._v("Assistant Prof. Dr. Alessandro Mosca (also affiliated at CNR-ISTC "),a("a",{attrs:{href:"https://www.loa.istc.cnr.it/",target:"_blank",rel:"noopener"}},[e._v("Laboratory for Applied Ontology (LOA)"),a("OutboundLink")],1)])]),e._v(" "),a("h3",{attrs:{id:"international-collaborations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#international-collaborations"}},[e._v("#")]),e._v(" International collaborations")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~roman/",target:"_blank",rel:"noopener"}},[e._v("Dr. Roman Kontchakov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~michael/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Michael Zakharyaschev"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.dcs.bbk.ac.uk/~vlad/",target:"_blank",rel:"noopener"}},[e._v("Dr. Vladislav Ryzhikov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.ii.uib.no/~dagh/",target:"_blank",rel:"noopener"}},[e._v("Dr. Dag Hovland"),a("OutboundLink")],1),e._v(" (Institutt for informatikk Universitetet i Oslo, Norway)")])]),e._v(" "),a("h3",{attrs:{id:"alumni-researchers-from-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#alumni-researchers-from-unibz"}},[e._v("#")]),e._v(" Alumni researchers from Unibz")]),e._v(" "),a("ul",[a("li",[e._v("Dr. Mariano Rodríguez-Muro (Google USA / Founder / Former Team Leader: 2011 – Oct. 2013)")]),e._v(" "),a("li",[e._v("Dr. Martin Rezk (Google USA / Former Team Leader: Oct. 2013 – Nov. 2015)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.kent.ac.uk/computing/people/3838/botoeva-elena",target:"_blank",rel:"noopener"}},[e._v("Dr. Elena Botoeva"),a("OutboundLink")],1),e._v(" (University of Kent, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://research.bcgl.fr",target:"_blank",rel:"noopener"}},[e._v("Dr. Benjamin Cogrel"),a("OutboundLink")],1),e._v(" ("),a("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic"),a("OutboundLink")],1),e._v(", Bolzano)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://scholar.google.it/citations?user=WYEhpZYAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Dr. Elem Güzel Kalaycı"),a("OutboundLink")],1),e._v(" (Virtual Vehicle Research GmbH, Austria)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.ntnu.edu/employees/linfang.ding",target:"_blank",rel:"noopener"}},[e._v("Dr. Linfang Ding"),a("OutboundLink")],1),e._v(" (Norwegian University of Science and Technology, Norway)")])]),e._v(" "),a("h2",{attrs:{id:"projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#projects"}},[e._v("#")]),e._v(" Projects")]),e._v(" "),a("p",[e._v("The development and the research around Ontop over the years have been mainly funded by research projects.")]),e._v(" "),a("h3",{attrs:{id:"current-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#current-projects"}},[e._v("#")]),e._v(" Current projects")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://www.cyclopsproject.eu/",target:"_blank",rel:"noopener"}},[e._v("CYCLOPS"),a("OutboundLink")],1),e._v(", EU Project")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://gepris.dfg.de/gepris/projekt/500249124?language=en",target:"_blank",rel:"noopener"}},[e._v("D2G2"),a("OutboundLink")],1),e._v(" (Dense and Deep Geographic Virtual Knowledge Graphs for Visual Analysis), funded by DFG and the province of Bolzano)")])]),e._v(" "),a("h3",{attrs:{id:"past-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#past-projects"}},[e._v("#")]),e._v(" Past projects")]),e._v(" "),a("ul",[a("li",[e._v("Thinking ONtologiES (TONES), EU FET project")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://optique-project.eu/",target:"_blank",rel:"noopener"}},[e._v("Optique"),a("OutboundLink")],1),e._v(" (Scalable End-User Access to Big Data) FP7 project")]),e._v(" "),a("li",[e._v("Ontology-based Data Access to NoSQL Database (OBDAM), Unibz project")]),e._v(" "),a("li",[e._v("Ontology-based analysis of temporal and streaming data (OBATS), Unibz project")]),e._v(" "),a("li",[e._v("IDEE (data integration in the energy sector), FESR Project")]),e._v(" "),a("li",[e._v("GeoVKG (geo-spatial VKG), Unibz project")]),e._v(" "),a("li",[e._v("High Quality Data Integration with Ontologies (QUADRO), Unibz project")]),e._v(" "),a("li",[e._v("High quality Open data Publishing and Enrichment (HOPE), Italian national PRIN (Research Projects of National Relevance)")]),e._v(" "),a("li",[e._v("PACMEL (VKG for process mining), CHIST-ERA EU Project")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.inode-project.eu/",target:"_blank",rel:"noopener"}},[e._v("INODE"),a("OutboundLink")],1),e._v(" (data management infrastructures), H2020 EU project")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{441:function(e,t,a){"use strict";a.r(t);var r=a(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"research-team"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#research-team"}},[e._v("#")]),e._v(" Research team")]),e._v(" "),a("p",[e._v("Ontop is a project initiated by Diego Calvanese and Mariano Rodriguez-Muro in 2009 in "),a("a",{attrs:{href:"https://www.inf.unibz.it/krdb/",target:"_blank",rel:"noopener"}},[e._v("the KRDB research centre for Knowledge and Data"),a("OutboundLink")],1),e._v(" at "),a("a",{attrs:{href:"https://www.unibz.it/en/faculties/computer-science/",target:"_blank",rel:"noopener"}},[e._v("the Free University of Bolzano"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("A decade after, Ontop remains very active, both from a research and a software development point of view.")]),e._v(" "),a("h2",{attrs:{id:"researchers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#researchers"}},[e._v("#")]),e._v(" Researchers")]),e._v(" "),a("p",[e._v("Here we list the people who have been involved in the research side of the Ontop project.\nFor the development side, see "),a("a",{attrs:{href:"/community"}},[e._v("the community page")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"at-the-free-university-of-bozen-bolzano-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#at-the-free-university-of-bozen-bolzano-unibz"}},[e._v("#")]),e._v(" At the Free University of Bozen-Bolzano (Unibz)")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.ghxiao.org",target:"_blank",rel:"noopener"}},[e._v("Assistant Prof. Dr. Guohui Xiao"),a("OutboundLink")],1),e._v(" (Team Leader)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Diego Calvanese"),a("OutboundLink")],1),e._v(" (Scientific Coordinator)")]),e._v(" "),a("li",[e._v("Assistant Prof. Dr. Julien Corman")]),e._v(" "),a("li",[e._v("Assistant Prof. Dr. Davide Lanti")]),e._v(" "),a("li",[e._v("Assistant Prof. Dr. Alessandro Mosca (also affiliated at CNR-ISTC "),a("a",{attrs:{href:"https://www.loa.istc.cnr.it/",target:"_blank",rel:"noopener"}},[e._v("Laboratory for Applied Ontology (LOA)"),a("OutboundLink")],1)])]),e._v(" "),a("h3",{attrs:{id:"international-collaborations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#international-collaborations"}},[e._v("#")]),e._v(" International collaborations")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~roman/",target:"_blank",rel:"noopener"}},[e._v("Dr. Roman Kontchakov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~michael/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Michael Zakharyaschev"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.dcs.bbk.ac.uk/~vlad/",target:"_blank",rel:"noopener"}},[e._v("Dr. Vladislav Ryzhikov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.ii.uib.no/~dagh/",target:"_blank",rel:"noopener"}},[e._v("Dr. Dag Hovland"),a("OutboundLink")],1),e._v(" (Institutt for informatikk Universitetet i Oslo, Norway)")])]),e._v(" "),a("h3",{attrs:{id:"alumni-researchers-from-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#alumni-researchers-from-unibz"}},[e._v("#")]),e._v(" Alumni researchers from Unibz")]),e._v(" "),a("ul",[a("li",[e._v("Dr. Mariano Rodríguez-Muro (Google USA / Founder / Former Team Leader: 2011 – Oct. 2013)")]),e._v(" "),a("li",[e._v("Dr. Martin Rezk (Google USA / Former Team Leader: Oct. 2013 – Nov. 2015)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.kent.ac.uk/computing/people/3838/botoeva-elena",target:"_blank",rel:"noopener"}},[e._v("Dr. Elena Botoeva"),a("OutboundLink")],1),e._v(" (University of Kent, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://research.bcgl.fr",target:"_blank",rel:"noopener"}},[e._v("Dr. Benjamin Cogrel"),a("OutboundLink")],1),e._v(" ("),a("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic"),a("OutboundLink")],1),e._v(", Bolzano)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://scholar.google.it/citations?user=WYEhpZYAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Dr. Elem Güzel Kalaycı"),a("OutboundLink")],1),e._v(" (Virtual Vehicle Research GmbH, Austria)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.ntnu.edu/employees/linfang.ding",target:"_blank",rel:"noopener"}},[e._v("Dr. Linfang Ding"),a("OutboundLink")],1),e._v(" (Norwegian University of Science and Technology, Norway)")])]),e._v(" "),a("h2",{attrs:{id:"projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#projects"}},[e._v("#")]),e._v(" Projects")]),e._v(" "),a("p",[e._v("The development and the research around Ontop over the years have been mainly funded by research projects.")]),e._v(" "),a("h3",{attrs:{id:"current-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#current-projects"}},[e._v("#")]),e._v(" Current projects")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://www.cyclopsproject.eu/",target:"_blank",rel:"noopener"}},[e._v("CYCLOPS"),a("OutboundLink")],1),e._v(", EU Project")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://gepris.dfg.de/gepris/projekt/500249124?language=en",target:"_blank",rel:"noopener"}},[e._v("D2G2"),a("OutboundLink")],1),e._v(" (Dense and Deep Geographic Virtual Knowledge Graphs for Visual Analysis), funded by DFG and the province of Bolzano)")])]),e._v(" "),a("h3",{attrs:{id:"past-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#past-projects"}},[e._v("#")]),e._v(" Past projects")]),e._v(" "),a("ul",[a("li",[e._v("Thinking ONtologiES (TONES), EU FET project")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://optique-project.eu/",target:"_blank",rel:"noopener"}},[e._v("Optique"),a("OutboundLink")],1),e._v(" (Scalable End-User Access to Big Data) FP7 project")]),e._v(" "),a("li",[e._v("Ontology-based Data Access to NoSQL Database (OBDAM), Unibz project")]),e._v(" "),a("li",[e._v("Ontology-based analysis of temporal and streaming data (OBATS), Unibz project")]),e._v(" "),a("li",[e._v("IDEE (data integration in the energy sector), FESR Project")]),e._v(" "),a("li",[e._v("GeoVKG (geo-spatial VKG), Unibz project")]),e._v(" "),a("li",[e._v("High Quality Data Integration with Ontologies (QUADRO), Unibz project")]),e._v(" "),a("li",[e._v("High quality Open data Publishing and Enrichment (HOPE), Italian national PRIN (Research Projects of National Relevance)")]),e._v(" "),a("li",[e._v("PACMEL (VKG for process mining), CHIST-ERA EU Project")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.inode-project.eu/",target:"_blank",rel:"noopener"}},[e._v("INODE"),a("OutboundLink")],1),e._v(" (data management infrastructures), H2020 EU project")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/66.31977579.js b/assets/js/66.60d5b021.js similarity index 99% rename from assets/js/66.31977579.js rename to assets/js/66.60d5b021.js index bd430d9da..4d9f9622a 100644 --- a/assets/js/66.31977579.js +++ b/assets/js/66.60d5b021.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{445:function(e,n,t){"use strict";t.r(n);var a=t(51),i=Object(a.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"formal-characterization-of-iqs"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#formal-characterization-of-iqs"}},[e._v("#")]),e._v(" Formal characterization of IQs")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: CHECK/UPDATE (2 years old and formatted in AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section aims at providing a more precise characterization of an "),t("em",[e._v("intermediate query")]),e._v(" ("),t("em",[e._v("IQ")]),e._v(" in what follows),\nwhich is the main query representation format used internally in Ontop.")]),e._v(" "),t("p",[e._v("An IQ is a standard (rooted and ordered) tree representation of an algebraic query expression.\nMore exactly,\nfor each node N of a well-formed IQ Q,\nthe maximal subtree or Q rooted in N represents a valid algebraic expression.")]),e._v(" "),t("p",[e._v("In order to give a more precise characterization of this algebra,\nwe will rely on its similarity with Relational Algebra ("),t("em",[e._v("RA")]),e._v(" in what follows),\nmore exactly the select/project/join/rename/union RA with named attributes (and no duplicate attribute),\nextended with additional operators supported by SQL DBMS (and relevant for Ontop's setting).\nThese additional operators are:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("left outer join (which corresponds to the SPARQL OPTIONAL operator),\nand")])]),e._v(" "),t("li",[t("p",[e._v("extended projection")])])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("As of now, difference is not supported.")])]),e._v(" "),t("p",[e._v("For readability,\nsome similarities with the SPARQL language will also be (informally) higlighted.")]),e._v(" "),t("p",[e._v("NOTE: This is only one possible way of characterizing the meaning of an IQ.\nOther options would be for instance relying on (a customized version of) the SPARQL algebra,\nor defining from scratch a full-fledged semantic.")]),e._v(" "),t("p",[e._v("link:notation[The first section] introduces some notational conventions,\nwhereas the following ones present the different types of nodes which may appear in an IQ,\nand how they relate to RA operands and operators.\nIn order to simplify notation,\ntheir interpretation is first given in terms of set semantics (which is also the standard interpretation of RA).")]),e._v(" "),t("p",[e._v("The extension to bag semantics has specific implications in an OBDA setting,\nand is discussed in link:bagSemantics[a dedicated Section].")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-algebraic-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-algebraic-expressions"}},[e._v("#")]),e._v(" Interpretation of algebraic expressions")]),e._v(" "),t("p",[e._v("We assume the following mutually disjoint sets:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("a countably infinite domain D being queried,")])]),e._v(" "),t("li",[t("p",[e._v("a countably infinite set V of variables names (similar to SPARQL variables,\nor to a lesser extent to RA attribute names).")])]),e._v(" "),t("li",[t("p",[e._v("a finite set P of predicates,\nand")])]),e._v(" "),t("li",[t("p",[e._v("For each p ∈ P with arity n > 0,\na set {p_1, .., p_n} of base attribute names.")])])]),e._v(" "),t("p",[e._v("A database instance will be viewed as a total function I over P,\nwhich,\nto each element p of its domain,\nassociates a set I(p) of partial functions from {p_1, .., p_n} to D.")]),e._v(" "),t("p",[e._v("The "),t("em",[e._v("signature")]),e._v(" sig(M) of an algebraic query expression M is the set of its base operands,\nand it is assumed that for any well-formed M,\nsig(M) ⊆ P holds.")]),e._v(" "),t("p",[e._v("Given a database instance I over P,\nthe "),t("em",[e._v("interpretation")]),e._v(" ||M|| of a well-formed algebraic expression M is built inductively out of all I(p) such that p ∈ sig(M),\nby application of algebraic operators.\nTo each element of its domain,\n||.|| associates a (possibly empty) set of partial functions from a unique subset var(M) of V to D.\nvar(M) will be called the "),t("em",[e._v("projected variables")]),e._v(" of M,\nand does not depend on ||.||,\nbut only on M.")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-iq-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-iq-nodes"}},[e._v("#")]),e._v(" Interpretation of IQ nodes")]),e._v(" "),t("p",[e._v("If Q is a well-formed IQ,\nthen nodes(Q) will designate its nodes.\nAnd by extension,\nif N ∈ nodes(Q),\nthen sig(N) (resp. ||N|| and var(N)) will designate the signature (resp. the interpretation and the projected variables) of the algebraic expression represented by (the maximal subtree of Q rooted in) N.")]),e._v(" "),t("h3",{attrs:{id:"boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#boolean-expressions"}},[e._v("#")]),e._v(" Boolean expressions")]),e._v(" "),t("p",[e._v("A "),t("em",[e._v("boolean expression")]),e._v(" in what follows designates a quantifier-free first-order formula,\nwith variables in V,\nconstants in D and predicates among the ones listed link:[in the dedicated section].")]),e._v(" "),t("p",[e._v("For instance,\nx ≠ y,\n(x ≥ 2) ∨ (x = z) and IsNotNull(x) are valid expressions.")]),e._v(" "),t("p",[e._v('Given a boolean expression φ and a partial function f : V ↦ D,\nthe formula φ[f] is obtained by replacing each variable x appearing in φ by f(x) if defined,\nand by NULL otherwise.\nThen the valuation val(φ[f]) of φ[f] corresponds to the one expected in SQL,\nand operators like "=" or ≥ are polymorphic.\nFor instance,\nfor any d ∈ D,\nval(d ≤ d) = TRUE,\nval(d ≠= d) = FALSE,\nval(NULL = d) = UNKNOWN,\nval(NULL ≤ d) = UNKNOWN,\netc.,')]),e._v(" "),t("p",[e._v("These boolean expressions are explicit RA selection conditions.\nImplicit selection conditions (exclusively equality between variables and/or constant) may also be expressed,\nfor instance by joining two algebraic expressions with shared variables (natural join).")]),e._v(" "),t("h2",{attrs:{id:"leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#leaf-node-types"}},[e._v("#")]),e._v(" Leaf node types")]),e._v(" "),t("h3",{attrs:{id:"data-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-node"}},[e._v("#")]),e._v(" Data node")]),e._v(" "),t("p",[e._v("Data nodes are prototypical leaf nodes of IQs.\nIntuitively,\na data node is similar to a SPARQL triple pattern,\nbut extended to n-uples.")]),e._v(" "),t("p",[e._v("Equivalently,\na data node may represent the application to some p ∈ P of a (possibly trivial) selection (σ in RA),\nfollowed by a variable renaming (ρ in RA).")]),e._v(" "),t("p",[e._v("Internally,\na data node N is characterized (using logical notation) with an expression of the form p(v~1~, .., v~n~),\nwhere p ∈ P,\nand each v~i~ is either a constant or a variable,\ni.e. v~i~ ∈ D ∪ V.\nIn addition,\nwe have var(N) = {v~1~, .., v~n~} ∩ V.")]),e._v(" "),t("p",[e._v("Constants and repeated variable names express selection in the expected way.")]),e._v(" "),t("p",[e._v("For instance,\nif N is characterized by p(x,x),\nthen it represents the RA expression ρ~[x/p1,x/p2]~ (σ~[p1=p2]~ p).")]),e._v(" "),t("p",[e._v("Therefore,\nif I(p) = { {p1 ↦ 1, p2 ↦ 2}, {p1 ↦ 3, p2 ↦ 3} },\nthen ||N|| = { {p1 ↦ 3, p2 ↦ 3} } will hold.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Second order queries")]),e._v(" "),t("p",[e._v('SPARQL triple patterns allow for querying over the name of an RDF property,\ni.e. the name of a binary predicate.\nIn an IQ,\nthe data node corresponding to such a triple pattern is characterized by a ternary predicate with a meaningless predicate name (currently "triple"),\nand the property name variable as first argument.\nFor instance,\na data node encoding the SPARQL triple pattern ?s ?p ?o (where ?p stands for RDF property names) will be characterized by the expression triple(p,s,o).')]),e._v(" "),t("p",[e._v('This mechanism may be extended in future versions to all predicates.\nIn other words,\nP may be reduced to a set of one predicate per arity ("pair", "triple, "quadruple", etc),\nwith the current (n-1 ary) predicate names as first argument.')])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Intensional VS extensional data nodes")]),e._v(" "),t("p",[e._v("Todo")])]),e._v(" "),t("h3",{attrs:{id:"empty-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#empty-node"}},[e._v("#")]),e._v(" Empty node")]),e._v(" "),t("p",[e._v("An empty node E can be viewed as a specific kind of data node (whether it should be considered as intensional or extensional is not important).\nThe evaluation of the subquery rooted in E will always be (similar to) the RA n-ary empty relation,\nwith n ≥ 0.")]),e._v(" "),t("p",[e._v("In other words,\nfor any database instance,\n||E|| = {} holds (although var(E) may be nonempty).")]),e._v(" "),t("p",[e._v("Alternatively,\nif var(E) = {v~1~, .., v~n~},\nassuming some p ∈ P with arity n,\n(the subtree whose only node is) E can be viewed as representing the RA expression ρ~[v1/p1,..,vn/pn]~ (σ~FALSE~ p).")]),e._v(" "),t("p",[e._v("The behavior of ||E|| as an operand is similar to the behavior of an empty relation in RA.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for union: ||E UNION M|| = ||M||,\nfor any M s.t. var(M) = var(E)")]),e._v(" "),t("li",[e._v("(Left and right) absorbing element for a natural join: ||E JOIN M|| = ||E||,\nfor any M")]),e._v(" "),t("li",[e._v("Left absorbing for left outer join,\nand right identity element if there is no join condition,\nor if the condition is met (right absorbing otherwise)")]),e._v(" "),t("li",[e._v("Fixpoint for selection.")])]),e._v(" "),t("h3",{attrs:{id:"true-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#true-node"}},[e._v("#")]),e._v(" True node")]),e._v(" "),t("p",[e._v("True nodes represent another limit case.\nThe evaluation of the subquery rooted in a true node T will always be (similar to) the RA nonempty but 0-ary relation.\nOr in other words,\nvar(T) = {},\nand for any database instance,\n||T|| = {f},\nwhere f has an empty domain.")]),e._v(" "),t("p",[e._v("The behavior of ||T|| as an operand is in most cases similar to the behavior of its RA counterpart.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for a natural join: ||T JOIN M|| = ||M||,\nfor any M")]),e._v(" "),t("li",[e._v("||T UNION T|| = ||T|| (see the section about link:bagSemantics[bag semantics] for the treatment of cardinalities in this specific case).")])]),e._v(" "),t("p",[e._v("As expected,\nT is also the right identity element for the left outer join operator:")]),e._v(" "),t("ul",[t("li",[e._v("||M LEFT JOIN T|| = ||M||,\nfor any M.")])]),e._v(" "),t("p",[e._v("In the case where T is the left operand,\nwe have:")]),e._v(" "),t("ul",[t("li",[e._v("||T LEFT JOIN M|| = ||M||,\nif ||M|| ≠ {}")]),e._v(" "),t("li",[e._v("||T LEFT JOIN M|| = ||T|| otherwise.")])]),e._v(" "),t("p",[e._v("Note that in RA,\nbecause the left outer join operator is traditionally defined in terms of join,\nprojection,\nunion and difference,\nthese two queries would be syntactically invalid (implying a difference and a union of two relations with different arities).\nIn IQs on the other hand,\nthe left outer join is viewed as a primitive operator.")]),e._v(" "),t("h2",{attrs:{id:"non-leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#non-leaf-node-types"}},[e._v("#")]),e._v(" Non-leaf node types")]),e._v(" "),t("h3",{attrs:{id:"inner-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#inner-join-node"}},[e._v("#")]),e._v(" Inner join node")]),e._v(" "),t("p",[e._v("An inner join node N represents the n-ary natural join of the evaluations of its children nodes,\nExplicit joining conditions can also be attached to it,\nin the form of a boolean expression φ~N~,\nas defined above.")]),e._v(" "),t("p",[e._v("It can be defined almost identically to its SPARQL counterpart.\nFirst,\nfor any two partial functions f and g from V to D,\nlet f ~ g hold iff for all x ∈ dom(f) ∩ dom(g),\nwe have f(x) = g(x).")]),e._v(" "),t("p",[e._v("Then algebraic operation represented by an inner join node with explicit joining condition φ,\ndenoted with JOIN~φ~,\nis defined by:")]),e._v(" "),t("p",[e._v("Then ||N_1 JOIN~φ~ N_2|| = { f ∪ g | (f,g) ∈ ||N1|| × ||N2|| and f ~ g holds and val(φ[f ∪ g]) = TRUE},\nand V(N_1 JOIN N_2) = v(N1) ∪ v(N2).")]),e._v(" "),t("p",[e._v("If there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 JOIN~1=1~ N2,\nabbreviated as N1 JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"left-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#left-join-node"}},[e._v("#")]),e._v(" Left join node")]),e._v(" "),t("p",[e._v("A left join node represents the RA binary natural left outer join (or SPARQL OPTIONAL) of the evaluations of its children nodes.\nThe left and right children nodes respectively stand for the left and right part of the join.")]),e._v(" "),t("p",[e._v("Explicit joining conditions may also be attached to it.")]),e._v(" "),t("p",[e._v("As for join nodes,\nthis algebraic operation can be defined similarly to its SPARQL counterpart.\nAn inner join node with explicit joining condition φ,\nrepresents the algebraic operation INNER JOIN~φ~,\ndefined by:")]),e._v(" "),t("p",[e._v("||N_1 INNER JOIN~φ~ N_2|| = ||N1 JOIN N2|| ∪ { f & isin ||N1|| | for all (g) ∈ ||N2||,\nf ~ g or val(φ[f ∪ g]) = TRUE does not hold}.")]),e._v(" "),t("p",[e._v("As for join nodes,\nif there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 INNER JOIN~1=1~ N2,\nabbreviated as N1 INNER JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"union-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#union-node"}},[e._v("#")]),e._v(" Union node")]),e._v(" "),t("h3",{attrs:{id:"construction-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#construction-node"}},[e._v("#")]),e._v(" Construction node")]),e._v(" "),t("p",[e._v("A construction represents a RA extended projection,\nfollowed by an attribute renaming.")]),e._v(" "),t("p",[e._v('"Extended" projection means here that some additional operations on the values of the projected attributes can be expressed,\nprototypically string concatenation to create URIs out of data values (but also for instance arithmetic operations).')]),e._v(" "),t("p",[e._v("Attribute renaming is always the second operation,\ni.e. it is alway performed on the output of the (extended) projection.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("optional projection and renaming")]),e._v(" "),t("p",[e._v("Both operations (extended projection and renaming) are in a sense optional,\nin that the projection with all selected attributes (and no non-trivial additional operation) is the identity operator,\nand so is renaming with empty substituion.\nSo in practice,\na construction node may encode one of these operations.")])])])}),[],!1,null,null,null);n.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{444:function(e,n,t){"use strict";t.r(n);var a=t(51),i=Object(a.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"formal-characterization-of-iqs"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#formal-characterization-of-iqs"}},[e._v("#")]),e._v(" Formal characterization of IQs")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: CHECK/UPDATE (2 years old and formatted in AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section aims at providing a more precise characterization of an "),t("em",[e._v("intermediate query")]),e._v(" ("),t("em",[e._v("IQ")]),e._v(" in what follows),\nwhich is the main query representation format used internally in Ontop.")]),e._v(" "),t("p",[e._v("An IQ is a standard (rooted and ordered) tree representation of an algebraic query expression.\nMore exactly,\nfor each node N of a well-formed IQ Q,\nthe maximal subtree or Q rooted in N represents a valid algebraic expression.")]),e._v(" "),t("p",[e._v("In order to give a more precise characterization of this algebra,\nwe will rely on its similarity with Relational Algebra ("),t("em",[e._v("RA")]),e._v(" in what follows),\nmore exactly the select/project/join/rename/union RA with named attributes (and no duplicate attribute),\nextended with additional operators supported by SQL DBMS (and relevant for Ontop's setting).\nThese additional operators are:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("left outer join (which corresponds to the SPARQL OPTIONAL operator),\nand")])]),e._v(" "),t("li",[t("p",[e._v("extended projection")])])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("As of now, difference is not supported.")])]),e._v(" "),t("p",[e._v("For readability,\nsome similarities with the SPARQL language will also be (informally) higlighted.")]),e._v(" "),t("p",[e._v("NOTE: This is only one possible way of characterizing the meaning of an IQ.\nOther options would be for instance relying on (a customized version of) the SPARQL algebra,\nor defining from scratch a full-fledged semantic.")]),e._v(" "),t("p",[e._v("link:notation[The first section] introduces some notational conventions,\nwhereas the following ones present the different types of nodes which may appear in an IQ,\nand how they relate to RA operands and operators.\nIn order to simplify notation,\ntheir interpretation is first given in terms of set semantics (which is also the standard interpretation of RA).")]),e._v(" "),t("p",[e._v("The extension to bag semantics has specific implications in an OBDA setting,\nand is discussed in link:bagSemantics[a dedicated Section].")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-algebraic-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-algebraic-expressions"}},[e._v("#")]),e._v(" Interpretation of algebraic expressions")]),e._v(" "),t("p",[e._v("We assume the following mutually disjoint sets:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("a countably infinite domain D being queried,")])]),e._v(" "),t("li",[t("p",[e._v("a countably infinite set V of variables names (similar to SPARQL variables,\nor to a lesser extent to RA attribute names).")])]),e._v(" "),t("li",[t("p",[e._v("a finite set P of predicates,\nand")])]),e._v(" "),t("li",[t("p",[e._v("For each p ∈ P with arity n > 0,\na set {p_1, .., p_n} of base attribute names.")])])]),e._v(" "),t("p",[e._v("A database instance will be viewed as a total function I over P,\nwhich,\nto each element p of its domain,\nassociates a set I(p) of partial functions from {p_1, .., p_n} to D.")]),e._v(" "),t("p",[e._v("The "),t("em",[e._v("signature")]),e._v(" sig(M) of an algebraic query expression M is the set of its base operands,\nand it is assumed that for any well-formed M,\nsig(M) ⊆ P holds.")]),e._v(" "),t("p",[e._v("Given a database instance I over P,\nthe "),t("em",[e._v("interpretation")]),e._v(" ||M|| of a well-formed algebraic expression M is built inductively out of all I(p) such that p ∈ sig(M),\nby application of algebraic operators.\nTo each element of its domain,\n||.|| associates a (possibly empty) set of partial functions from a unique subset var(M) of V to D.\nvar(M) will be called the "),t("em",[e._v("projected variables")]),e._v(" of M,\nand does not depend on ||.||,\nbut only on M.")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-iq-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-iq-nodes"}},[e._v("#")]),e._v(" Interpretation of IQ nodes")]),e._v(" "),t("p",[e._v("If Q is a well-formed IQ,\nthen nodes(Q) will designate its nodes.\nAnd by extension,\nif N ∈ nodes(Q),\nthen sig(N) (resp. ||N|| and var(N)) will designate the signature (resp. the interpretation and the projected variables) of the algebraic expression represented by (the maximal subtree of Q rooted in) N.")]),e._v(" "),t("h3",{attrs:{id:"boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#boolean-expressions"}},[e._v("#")]),e._v(" Boolean expressions")]),e._v(" "),t("p",[e._v("A "),t("em",[e._v("boolean expression")]),e._v(" in what follows designates a quantifier-free first-order formula,\nwith variables in V,\nconstants in D and predicates among the ones listed link:[in the dedicated section].")]),e._v(" "),t("p",[e._v("For instance,\nx ≠ y,\n(x ≥ 2) ∨ (x = z) and IsNotNull(x) are valid expressions.")]),e._v(" "),t("p",[e._v('Given a boolean expression φ and a partial function f : V ↦ D,\nthe formula φ[f] is obtained by replacing each variable x appearing in φ by f(x) if defined,\nand by NULL otherwise.\nThen the valuation val(φ[f]) of φ[f] corresponds to the one expected in SQL,\nand operators like "=" or ≥ are polymorphic.\nFor instance,\nfor any d ∈ D,\nval(d ≤ d) = TRUE,\nval(d ≠= d) = FALSE,\nval(NULL = d) = UNKNOWN,\nval(NULL ≤ d) = UNKNOWN,\netc.,')]),e._v(" "),t("p",[e._v("These boolean expressions are explicit RA selection conditions.\nImplicit selection conditions (exclusively equality between variables and/or constant) may also be expressed,\nfor instance by joining two algebraic expressions with shared variables (natural join).")]),e._v(" "),t("h2",{attrs:{id:"leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#leaf-node-types"}},[e._v("#")]),e._v(" Leaf node types")]),e._v(" "),t("h3",{attrs:{id:"data-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-node"}},[e._v("#")]),e._v(" Data node")]),e._v(" "),t("p",[e._v("Data nodes are prototypical leaf nodes of IQs.\nIntuitively,\na data node is similar to a SPARQL triple pattern,\nbut extended to n-uples.")]),e._v(" "),t("p",[e._v("Equivalently,\na data node may represent the application to some p ∈ P of a (possibly trivial) selection (σ in RA),\nfollowed by a variable renaming (ρ in RA).")]),e._v(" "),t("p",[e._v("Internally,\na data node N is characterized (using logical notation) with an expression of the form p(v~1~, .., v~n~),\nwhere p ∈ P,\nand each v~i~ is either a constant or a variable,\ni.e. v~i~ ∈ D ∪ V.\nIn addition,\nwe have var(N) = {v~1~, .., v~n~} ∩ V.")]),e._v(" "),t("p",[e._v("Constants and repeated variable names express selection in the expected way.")]),e._v(" "),t("p",[e._v("For instance,\nif N is characterized by p(x,x),\nthen it represents the RA expression ρ~[x/p1,x/p2]~ (σ~[p1=p2]~ p).")]),e._v(" "),t("p",[e._v("Therefore,\nif I(p) = { {p1 ↦ 1, p2 ↦ 2}, {p1 ↦ 3, p2 ↦ 3} },\nthen ||N|| = { {p1 ↦ 3, p2 ↦ 3} } will hold.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Second order queries")]),e._v(" "),t("p",[e._v('SPARQL triple patterns allow for querying over the name of an RDF property,\ni.e. the name of a binary predicate.\nIn an IQ,\nthe data node corresponding to such a triple pattern is characterized by a ternary predicate with a meaningless predicate name (currently "triple"),\nand the property name variable as first argument.\nFor instance,\na data node encoding the SPARQL triple pattern ?s ?p ?o (where ?p stands for RDF property names) will be characterized by the expression triple(p,s,o).')]),e._v(" "),t("p",[e._v('This mechanism may be extended in future versions to all predicates.\nIn other words,\nP may be reduced to a set of one predicate per arity ("pair", "triple, "quadruple", etc),\nwith the current (n-1 ary) predicate names as first argument.')])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Intensional VS extensional data nodes")]),e._v(" "),t("p",[e._v("Todo")])]),e._v(" "),t("h3",{attrs:{id:"empty-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#empty-node"}},[e._v("#")]),e._v(" Empty node")]),e._v(" "),t("p",[e._v("An empty node E can be viewed as a specific kind of data node (whether it should be considered as intensional or extensional is not important).\nThe evaluation of the subquery rooted in E will always be (similar to) the RA n-ary empty relation,\nwith n ≥ 0.")]),e._v(" "),t("p",[e._v("In other words,\nfor any database instance,\n||E|| = {} holds (although var(E) may be nonempty).")]),e._v(" "),t("p",[e._v("Alternatively,\nif var(E) = {v~1~, .., v~n~},\nassuming some p ∈ P with arity n,\n(the subtree whose only node is) E can be viewed as representing the RA expression ρ~[v1/p1,..,vn/pn]~ (σ~FALSE~ p).")]),e._v(" "),t("p",[e._v("The behavior of ||E|| as an operand is similar to the behavior of an empty relation in RA.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for union: ||E UNION M|| = ||M||,\nfor any M s.t. var(M) = var(E)")]),e._v(" "),t("li",[e._v("(Left and right) absorbing element for a natural join: ||E JOIN M|| = ||E||,\nfor any M")]),e._v(" "),t("li",[e._v("Left absorbing for left outer join,\nand right identity element if there is no join condition,\nor if the condition is met (right absorbing otherwise)")]),e._v(" "),t("li",[e._v("Fixpoint for selection.")])]),e._v(" "),t("h3",{attrs:{id:"true-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#true-node"}},[e._v("#")]),e._v(" True node")]),e._v(" "),t("p",[e._v("True nodes represent another limit case.\nThe evaluation of the subquery rooted in a true node T will always be (similar to) the RA nonempty but 0-ary relation.\nOr in other words,\nvar(T) = {},\nand for any database instance,\n||T|| = {f},\nwhere f has an empty domain.")]),e._v(" "),t("p",[e._v("The behavior of ||T|| as an operand is in most cases similar to the behavior of its RA counterpart.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for a natural join: ||T JOIN M|| = ||M||,\nfor any M")]),e._v(" "),t("li",[e._v("||T UNION T|| = ||T|| (see the section about link:bagSemantics[bag semantics] for the treatment of cardinalities in this specific case).")])]),e._v(" "),t("p",[e._v("As expected,\nT is also the right identity element for the left outer join operator:")]),e._v(" "),t("ul",[t("li",[e._v("||M LEFT JOIN T|| = ||M||,\nfor any M.")])]),e._v(" "),t("p",[e._v("In the case where T is the left operand,\nwe have:")]),e._v(" "),t("ul",[t("li",[e._v("||T LEFT JOIN M|| = ||M||,\nif ||M|| ≠ {}")]),e._v(" "),t("li",[e._v("||T LEFT JOIN M|| = ||T|| otherwise.")])]),e._v(" "),t("p",[e._v("Note that in RA,\nbecause the left outer join operator is traditionally defined in terms of join,\nprojection,\nunion and difference,\nthese two queries would be syntactically invalid (implying a difference and a union of two relations with different arities).\nIn IQs on the other hand,\nthe left outer join is viewed as a primitive operator.")]),e._v(" "),t("h2",{attrs:{id:"non-leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#non-leaf-node-types"}},[e._v("#")]),e._v(" Non-leaf node types")]),e._v(" "),t("h3",{attrs:{id:"inner-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#inner-join-node"}},[e._v("#")]),e._v(" Inner join node")]),e._v(" "),t("p",[e._v("An inner join node N represents the n-ary natural join of the evaluations of its children nodes,\nExplicit joining conditions can also be attached to it,\nin the form of a boolean expression φ~N~,\nas defined above.")]),e._v(" "),t("p",[e._v("It can be defined almost identically to its SPARQL counterpart.\nFirst,\nfor any two partial functions f and g from V to D,\nlet f ~ g hold iff for all x ∈ dom(f) ∩ dom(g),\nwe have f(x) = g(x).")]),e._v(" "),t("p",[e._v("Then algebraic operation represented by an inner join node with explicit joining condition φ,\ndenoted with JOIN~φ~,\nis defined by:")]),e._v(" "),t("p",[e._v("Then ||N_1 JOIN~φ~ N_2|| = { f ∪ g | (f,g) ∈ ||N1|| × ||N2|| and f ~ g holds and val(φ[f ∪ g]) = TRUE},\nand V(N_1 JOIN N_2) = v(N1) ∪ v(N2).")]),e._v(" "),t("p",[e._v("If there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 JOIN~1=1~ N2,\nabbreviated as N1 JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"left-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#left-join-node"}},[e._v("#")]),e._v(" Left join node")]),e._v(" "),t("p",[e._v("A left join node represents the RA binary natural left outer join (or SPARQL OPTIONAL) of the evaluations of its children nodes.\nThe left and right children nodes respectively stand for the left and right part of the join.")]),e._v(" "),t("p",[e._v("Explicit joining conditions may also be attached to it.")]),e._v(" "),t("p",[e._v("As for join nodes,\nthis algebraic operation can be defined similarly to its SPARQL counterpart.\nAn inner join node with explicit joining condition φ,\nrepresents the algebraic operation INNER JOIN~φ~,\ndefined by:")]),e._v(" "),t("p",[e._v("||N_1 INNER JOIN~φ~ N_2|| = ||N1 JOIN N2|| ∪ { f & isin ||N1|| | for all (g) ∈ ||N2||,\nf ~ g or val(φ[f ∪ g]) = TRUE does not hold}.")]),e._v(" "),t("p",[e._v("As for join nodes,\nif there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 INNER JOIN~1=1~ N2,\nabbreviated as N1 INNER JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"union-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#union-node"}},[e._v("#")]),e._v(" Union node")]),e._v(" "),t("h3",{attrs:{id:"construction-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#construction-node"}},[e._v("#")]),e._v(" Construction node")]),e._v(" "),t("p",[e._v("A construction represents a RA extended projection,\nfollowed by an attribute renaming.")]),e._v(" "),t("p",[e._v('"Extended" projection means here that some additional operations on the values of the projected attributes can be expressed,\nprototypically string concatenation to create URIs out of data values (but also for instance arithmetic operations).')]),e._v(" "),t("p",[e._v("Attribute renaming is always the second operation,\ni.e. it is alway performed on the output of the (extended) projection.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("optional projection and renaming")]),e._v(" "),t("p",[e._v("Both operations (extended projection and renaming) are in a sense optional,\nin that the projection with all selected attributes (and no non-trivial additional operation) is the identity operator,\nand so is renaming with empty substituion.\nSo in practice,\na construction node may encode one of these operations.")])])])}),[],!1,null,null,null);n.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/68.1f561b07.js b/assets/js/68.5b14c426.js similarity index 99% rename from assets/js/68.1f561b07.js rename to assets/js/68.5b14c426.js index dc30f3f12..1872e71de 100644 --- a/assets/js/68.1f561b07.js +++ b/assets/js/68.5b14c426.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{447:function(e,n,t){"use strict";t.r(n);var i=t(51),o=Object(i.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"intermediate-query-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#intermediate-query-optimization"}},[e._v("#")]),e._v(" Intermediate query optimization")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: UPDATE AND CHECK (2 years old, imported from AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section provides a high level description of different transformations which may be applied to "),t("a",{attrs:{href:"/dev/iq"}},[e._v("Intermediate Queries")]),e._v(" ("),t("em",[e._v("IQs")]),e._v(" in what follows) for optimization purposes.")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("p",[e._v("The different types of nodes of an IQ are presented "),t("a",{attrs:{href:"/dev/iq#query-nodes"}},[e._v("in the dedicated section")]),e._v(".\nThe following notation will also be use in the current document.")]),e._v(" "),t("h3",{attrs:{id:"sub-trees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sub-trees"}},[e._v("#")]),e._v(" (Sub)trees")]),e._v(" "),t("p",[e._v("If s is a tree,\nthen root(s) will designate its root.")]),e._v(" "),t("p",[e._v('If n is a node in an IQ Q,\nthen children~Q~(n) (resp. children(n) when Q is obvious from the context) will designate the immediate children of n in Q,\nand subtree~Q~(n) (resp. subtree(n)) the maximal subtree of Q rooted in n.\nIn addition,\na "subtree of Q" will be understood as a maximal subtree of Q rooted in some node of Q.\nFinally,\nchildSubtrees~Q~(n) (resp. childSubtrees(n)) will stand for {subtree~Q~(c) | c ∈ children~Q~(n)}')]),e._v(" "),t("h3",{attrs:{id:"projected-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#projected-variables"}},[e._v("#")]),e._v(" Projected variables")]),e._v(" "),t("p",[e._v("If s is a subtree in an IQ,\nthen var(s) will designate the "),t("em",[e._v("variables projected out by s")]),e._v(",\ndefined inductively as follows:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If root(s) explicitly projects out variables (construction node,\nunion node,\ndata node or empty node),\nthen var(s) is the set of such variables.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\nvar(s) = ⋃ ~s∈childSubtrees(n)~ var(s)")])])]),e._v(" "),t("p",[e._v("If e is an (explicit) join or filter condition,\nthen var(e) will designate the variables appearing in e.")]),e._v(" "),t("h2",{attrs:{id:"propagating-down-boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagating-down-boolean-expressions"}},[e._v("#")]),e._v(" Propagating down boolean expressions")]),e._v(" "),t("p",[e._v("This optimization is used for (some) NoSQL underlying DBMS.\nIt consists in transforming an input IQ into an equivalent one such that,\nwhenever possible,\nselections precede other algebraic operations.\nOr in other words,\nit consists in propagating (explicit) boolean expressions down the algebraic tree.")]),e._v(" "),t("p",[e._v("Three types of IQ nodes support boolean expressions,\nnamely:")]),e._v(" "),t("ul",[t("li",[e._v("filter nodes,")]),e._v(" "),t("li",[e._v("inner join nodes, and")]),e._v(" "),t("li",[e._v("left join nodes")])]),e._v(" "),t("p",[e._v("For each node n of one of these types,\nif n has an explicit boolean expression e attached to it,\nthen e is put into DNF,\nand each resulting conjunct may be propagated down independently.\nFor instance,\nn may be a filter node,\nand e the expression (x > y) ∧ (y ≠ z).\nThen (x > y) and (y ≠ z) may both be propagated down,\nindependently from each other.\nIf n is a node of one of the three types just mentioned,\nthen bool(n) will designate the set of such conjuncts.")]),e._v(" "),t("h3",{attrs:{id:"propagation-decision-and-recipient-selection"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagation-decision-and-recipient-selection"}},[e._v("#")]),e._v(" Propagation decision and recipient selection")]),e._v(" "),t("p",[e._v("Propagation decisions are primarily taken based on a comparison between:")]),e._v(" "),t("ul",[t("li",[e._v("the variables var(e) present in the conjunct e being propagated down,\nand")]),e._v(" "),t("li",[e._v("the variables var(s) projected out by each candidate subtree s for the propagation of e.")])]),e._v(" "),t("h4",{attrs:{id:"default-case-inner-join-of-filter-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case-inner-join-of-filter-provider-node"}},[e._v("#")]),e._v(" Default case (inner join of filter provider node)")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n).\nThe default rule to decide whether e can be propagated down from n is the following:\nfor each s ∈ childSubtrees(n),\nif var(e) ⊆ var(s),\nthen e can be propagated down to s.")]),e._v(" "),t("p",[e._v("An expression e being propagated down a subtree s also needs (a) new recipient node(s) to support it.\nThe recipients selection procedure is the following:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("if root(s) is neither a union node,\nconstruction node or left join node,\nthen it is the (only) recipient of e in s.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\neach s' ∈ childSubtrees(root(s)) recursively becomes a new candidate subtree for propagation.\nIf there no s' ∈ childSubtrees(root(s)) to which e can be propagated down,\nthen root(s) is the (only) recipient of e in s.\nNote that in a valid IQ,\nif s is a construction or union node,\nthen var(s) ⊆ var(s') must hold for each s' ∈ childSubtrees(root(s)),\ntherefore var(e) ⊆ var(s') holds by transitivity,\nsuch that root(s) cannot be the recipient for e in s.\nBut it may be the case if s is a left join node.")])])]),e._v(" "),t("p",[e._v('Finally,\nif a recipient node r for e in s (or s\') does not natively supports non-conditional boolean expressions,\ni.e. if r is neither a filter nor an inner join node,\nthen a new filter node is created as the (immediate) parent of r,\nin order to support e.\nAlternatively (as a form of syntactic sugar),\nif the node n initially providing e is the immediate parent of r,\nthen this new filter node is not needed,\nand e can remain attached to n,\nwhich in this case plays the role of "pseudo-recipient" of e in s.')]),e._v(" "),t("p",[e._v("Note that if n is the pseudo-recipient of e in s,\nthen from the above selection procedure,\nroot(s) must be a data node,\nempty node,\ntrue node,\nor a left join node with no child accepting e,\nwhich in all cases guarantees that e cannot be further propagated down s.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-provider-node"}},[e._v("#")]),e._v(" Specific case (left join provider node)")]),e._v(" "),t("p",[e._v("The propagation decision and recipient selection procedures are identical for a boolean conjunct e provided by a left join node n,\nbut with an exception:\ne may only be propagated down the subtree rooted in the right child of n.\nIndeed,\nif e was propagated down the left subtree,\nan additional selection would be added to the algebraic expression represented by that left branch,\nviolating the semantics of conditions attached to a left join (see link:intermediateQuery_detailed.adoc#leftjoinNode[the dedicated section] for an explanation).")]),e._v(" "),t("h3",{attrs:{id:"duplication-decision"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#duplication-decision"}},[e._v("#")]),e._v(" Duplication decision")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n) for some node n in an IQ Q.\nAnd let us assume that there is at least one s ∈ childSubtrees(n) to which e can be propagated,\nand that in each such s,\na proper recipient node for e,\ndifferent from n,\nhas been found (or in other words that n is not the pseudo-recipient of e for any such s).")]),e._v(" "),t("p",[e._v("Then the decision still needs to be taken whether e should remain attached to n,\n(i.e. be duplicated down) or not (i.e. be strictly pushed down).")]),e._v(" "),t("h4",{attrs:{id:"default-case"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case"}},[e._v("#")]),e._v(" Default case")]),e._v(" "),t("p",[e._v("By default,\nan attempt is made to strictly push down e if it can be propagated down to at least one s ∈ childSubtrees(n).\nSo in the default case,\nand provided n is not a pseudo-recipient for e in any s,\ne will not remain attached to n.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-rooted-candidate-subtree"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-rooted-candidate-subtree"}},[e._v("#")]),e._v(" Specific case (left-join-rooted candidate subtree)")]),e._v(" "),t("p",[e._v("If s is a candidate subtree for the propagation of e,\nand if a recipient node r in s has been found such that the path in Q from the provider node n of e to r comprises a left join node j and the right child j' of j,\nthen e will remain attached to the provider node n,\ni.e. e will be duplicated down,\ninstead of strictly pushed down.")]),e._v(" "),t("p",[e._v("This prevents an alteration of the semantic of the IQ.\nConsider for instance the following example (where r = j' for simplicity).")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("Let:")]),e._v(" "),t("ul",[t("li",[e._v("Q1 be a well-formed IQ")]),e._v(" "),t("li",[e._v("n1 be a filter node,\nn1 ∈ Q1,\nand bool(n1) = {e},\nwhere e is the expression x < 1")]),e._v(" "),t("li",[e._v("j1 be a left join node with (explicit) joining condition x ≤ y,\nand such that children(n1) = {j1}")]),e._v(" "),t("li",[e._v("l1 be the left child of j1,\nwith var(subtree(l1)) = {y}")]),e._v(" "),t("li",[e._v("r1 be a filter node and the right child of j1,\nwith var(subtree(r1)) = {x}")])]),e._v(" "),t("p",[e._v("Then r1 is a recipient for e.")]),e._v(" "),t("p",[e._v("Now consider the query Q2 identical to Q1,\nwhere n2 (resp. j2, r2, etc.) is the counterpart of n1 (resp. j1, r1, etc.),\nbut such that e has been pushed down to r2 (and therefore is not attached to n2 anymore).\nAnd let us assume a database instance defining an evaluation function ||.||,\nsuch that ||l1|| = { {y ↦ 2} } and ||r1|| = { {x ↦ 1} }.")]),e._v(" "),t("p",[e._v("Then ||j1|| = { {x ↦ 1, y ↦ 2} },\nand ||n1|| = { {} }.")]),e._v(" "),t("p",[e._v("But ||l2|| = { {y ↦ 2} } and ||r2|| = { {} } must also hold,\ntherefore ||j2|| = { {y ↦ 2} } and ||n2|| = { {y ↦ 2} },\nsuch that ||n1|| ≠ ||n2||.")])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{445:function(e,n,t){"use strict";t.r(n);var i=t(51),o=Object(i.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"intermediate-query-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#intermediate-query-optimization"}},[e._v("#")]),e._v(" Intermediate query optimization")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: UPDATE AND CHECK (2 years old, imported from AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section provides a high level description of different transformations which may be applied to "),t("a",{attrs:{href:"/dev/iq"}},[e._v("Intermediate Queries")]),e._v(" ("),t("em",[e._v("IQs")]),e._v(" in what follows) for optimization purposes.")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("p",[e._v("The different types of nodes of an IQ are presented "),t("a",{attrs:{href:"/dev/iq#query-nodes"}},[e._v("in the dedicated section")]),e._v(".\nThe following notation will also be use in the current document.")]),e._v(" "),t("h3",{attrs:{id:"sub-trees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sub-trees"}},[e._v("#")]),e._v(" (Sub)trees")]),e._v(" "),t("p",[e._v("If s is a tree,\nthen root(s) will designate its root.")]),e._v(" "),t("p",[e._v('If n is a node in an IQ Q,\nthen children~Q~(n) (resp. children(n) when Q is obvious from the context) will designate the immediate children of n in Q,\nand subtree~Q~(n) (resp. subtree(n)) the maximal subtree of Q rooted in n.\nIn addition,\na "subtree of Q" will be understood as a maximal subtree of Q rooted in some node of Q.\nFinally,\nchildSubtrees~Q~(n) (resp. childSubtrees(n)) will stand for {subtree~Q~(c) | c ∈ children~Q~(n)}')]),e._v(" "),t("h3",{attrs:{id:"projected-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#projected-variables"}},[e._v("#")]),e._v(" Projected variables")]),e._v(" "),t("p",[e._v("If s is a subtree in an IQ,\nthen var(s) will designate the "),t("em",[e._v("variables projected out by s")]),e._v(",\ndefined inductively as follows:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If root(s) explicitly projects out variables (construction node,\nunion node,\ndata node or empty node),\nthen var(s) is the set of such variables.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\nvar(s) = ⋃ ~s∈childSubtrees(n)~ var(s)")])])]),e._v(" "),t("p",[e._v("If e is an (explicit) join or filter condition,\nthen var(e) will designate the variables appearing in e.")]),e._v(" "),t("h2",{attrs:{id:"propagating-down-boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagating-down-boolean-expressions"}},[e._v("#")]),e._v(" Propagating down boolean expressions")]),e._v(" "),t("p",[e._v("This optimization is used for (some) NoSQL underlying DBMS.\nIt consists in transforming an input IQ into an equivalent one such that,\nwhenever possible,\nselections precede other algebraic operations.\nOr in other words,\nit consists in propagating (explicit) boolean expressions down the algebraic tree.")]),e._v(" "),t("p",[e._v("Three types of IQ nodes support boolean expressions,\nnamely:")]),e._v(" "),t("ul",[t("li",[e._v("filter nodes,")]),e._v(" "),t("li",[e._v("inner join nodes, and")]),e._v(" "),t("li",[e._v("left join nodes")])]),e._v(" "),t("p",[e._v("For each node n of one of these types,\nif n has an explicit boolean expression e attached to it,\nthen e is put into DNF,\nand each resulting conjunct may be propagated down independently.\nFor instance,\nn may be a filter node,\nand e the expression (x > y) ∧ (y ≠ z).\nThen (x > y) and (y ≠ z) may both be propagated down,\nindependently from each other.\nIf n is a node of one of the three types just mentioned,\nthen bool(n) will designate the set of such conjuncts.")]),e._v(" "),t("h3",{attrs:{id:"propagation-decision-and-recipient-selection"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagation-decision-and-recipient-selection"}},[e._v("#")]),e._v(" Propagation decision and recipient selection")]),e._v(" "),t("p",[e._v("Propagation decisions are primarily taken based on a comparison between:")]),e._v(" "),t("ul",[t("li",[e._v("the variables var(e) present in the conjunct e being propagated down,\nand")]),e._v(" "),t("li",[e._v("the variables var(s) projected out by each candidate subtree s for the propagation of e.")])]),e._v(" "),t("h4",{attrs:{id:"default-case-inner-join-of-filter-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case-inner-join-of-filter-provider-node"}},[e._v("#")]),e._v(" Default case (inner join of filter provider node)")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n).\nThe default rule to decide whether e can be propagated down from n is the following:\nfor each s ∈ childSubtrees(n),\nif var(e) ⊆ var(s),\nthen e can be propagated down to s.")]),e._v(" "),t("p",[e._v("An expression e being propagated down a subtree s also needs (a) new recipient node(s) to support it.\nThe recipients selection procedure is the following:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("if root(s) is neither a union node,\nconstruction node or left join node,\nthen it is the (only) recipient of e in s.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\neach s' ∈ childSubtrees(root(s)) recursively becomes a new candidate subtree for propagation.\nIf there no s' ∈ childSubtrees(root(s)) to which e can be propagated down,\nthen root(s) is the (only) recipient of e in s.\nNote that in a valid IQ,\nif s is a construction or union node,\nthen var(s) ⊆ var(s') must hold for each s' ∈ childSubtrees(root(s)),\ntherefore var(e) ⊆ var(s') holds by transitivity,\nsuch that root(s) cannot be the recipient for e in s.\nBut it may be the case if s is a left join node.")])])]),e._v(" "),t("p",[e._v('Finally,\nif a recipient node r for e in s (or s\') does not natively supports non-conditional boolean expressions,\ni.e. if r is neither a filter nor an inner join node,\nthen a new filter node is created as the (immediate) parent of r,\nin order to support e.\nAlternatively (as a form of syntactic sugar),\nif the node n initially providing e is the immediate parent of r,\nthen this new filter node is not needed,\nand e can remain attached to n,\nwhich in this case plays the role of "pseudo-recipient" of e in s.')]),e._v(" "),t("p",[e._v("Note that if n is the pseudo-recipient of e in s,\nthen from the above selection procedure,\nroot(s) must be a data node,\nempty node,\ntrue node,\nor a left join node with no child accepting e,\nwhich in all cases guarantees that e cannot be further propagated down s.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-provider-node"}},[e._v("#")]),e._v(" Specific case (left join provider node)")]),e._v(" "),t("p",[e._v("The propagation decision and recipient selection procedures are identical for a boolean conjunct e provided by a left join node n,\nbut with an exception:\ne may only be propagated down the subtree rooted in the right child of n.\nIndeed,\nif e was propagated down the left subtree,\nan additional selection would be added to the algebraic expression represented by that left branch,\nviolating the semantics of conditions attached to a left join (see link:intermediateQuery_detailed.adoc#leftjoinNode[the dedicated section] for an explanation).")]),e._v(" "),t("h3",{attrs:{id:"duplication-decision"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#duplication-decision"}},[e._v("#")]),e._v(" Duplication decision")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n) for some node n in an IQ Q.\nAnd let us assume that there is at least one s ∈ childSubtrees(n) to which e can be propagated,\nand that in each such s,\na proper recipient node for e,\ndifferent from n,\nhas been found (or in other words that n is not the pseudo-recipient of e for any such s).")]),e._v(" "),t("p",[e._v("Then the decision still needs to be taken whether e should remain attached to n,\n(i.e. be duplicated down) or not (i.e. be strictly pushed down).")]),e._v(" "),t("h4",{attrs:{id:"default-case"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case"}},[e._v("#")]),e._v(" Default case")]),e._v(" "),t("p",[e._v("By default,\nan attempt is made to strictly push down e if it can be propagated down to at least one s ∈ childSubtrees(n).\nSo in the default case,\nand provided n is not a pseudo-recipient for e in any s,\ne will not remain attached to n.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-rooted-candidate-subtree"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-rooted-candidate-subtree"}},[e._v("#")]),e._v(" Specific case (left-join-rooted candidate subtree)")]),e._v(" "),t("p",[e._v("If s is a candidate subtree for the propagation of e,\nand if a recipient node r in s has been found such that the path in Q from the provider node n of e to r comprises a left join node j and the right child j' of j,\nthen e will remain attached to the provider node n,\ni.e. e will be duplicated down,\ninstead of strictly pushed down.")]),e._v(" "),t("p",[e._v("This prevents an alteration of the semantic of the IQ.\nConsider for instance the following example (where r = j' for simplicity).")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("Let:")]),e._v(" "),t("ul",[t("li",[e._v("Q1 be a well-formed IQ")]),e._v(" "),t("li",[e._v("n1 be a filter node,\nn1 ∈ Q1,\nand bool(n1) = {e},\nwhere e is the expression x < 1")]),e._v(" "),t("li",[e._v("j1 be a left join node with (explicit) joining condition x ≤ y,\nand such that children(n1) = {j1}")]),e._v(" "),t("li",[e._v("l1 be the left child of j1,\nwith var(subtree(l1)) = {y}")]),e._v(" "),t("li",[e._v("r1 be a filter node and the right child of j1,\nwith var(subtree(r1)) = {x}")])]),e._v(" "),t("p",[e._v("Then r1 is a recipient for e.")]),e._v(" "),t("p",[e._v("Now consider the query Q2 identical to Q1,\nwhere n2 (resp. j2, r2, etc.) is the counterpart of n1 (resp. j1, r1, etc.),\nbut such that e has been pushed down to r2 (and therefore is not attached to n2 anymore).\nAnd let us assume a database instance defining an evaluation function ||.||,\nsuch that ||l1|| = { {y ↦ 2} } and ||r1|| = { {x ↦ 1} }.")]),e._v(" "),t("p",[e._v("Then ||j1|| = { {x ↦ 1, y ↦ 2} },\nand ||n1|| = { {} }.")]),e._v(" "),t("p",[e._v("But ||l2|| = { {y ↦ 2} } and ||r2|| = { {} } must also hold,\ntherefore ||j2|| = { {y ↦ 2} } and ||n2|| = { {y ↦ 2} },\nsuch that ||n1|| ≠ ||n2||.")])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/69.acaa691c.js b/assets/js/69.b83ed713.js similarity index 99% rename from assets/js/69.acaa691c.js rename to assets/js/69.b83ed713.js index 586aa0660..fbef19ef0 100644 --- a/assets/js/69.acaa691c.js +++ b/assets/js/69.b83ed713.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{444:function(a,n,e){"use strict";e.r(n);var o=e(51),i=Object(o.a)({},(function(){var a=this,n=a.$createElement,e=a._self._c||n;return e("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[e("h1",{attrs:{id:"publications"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#publications"}},[a._v("#")]),a._v(" Publications")]),a._v(" "),e("h2",{attrs:{id:"journals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#journals"}},[a._v("#")]),a._v(" Journals")]),a._v(" "),e("ol",[e("li",[e("strong",[a._v("Virtual Knowledge Graphs: An Overview of Systems and Use Cases.")]),a._v(" Guohui Xiao, Linfang Ding, Benjamin Cogrel, Diego Calvanese. Data Intelligence. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Ontop-spatial: Ontop of Geospatial Databases.")]),a._v(" Konstantina Bereta, Guohui Xiao, and Manolis Koubarakis. Journal of Web Semantics. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-Based Access To Temporal Data With Ontop: A Framework Proposal.")]),a._v(" Elem Güzel Kalaycı, Sebastian Brandt, Diego Calvanese, Vladislav Ryzhikov, Guohui Xiao, and Michael Zakharyaschev. International Journal of Applied Mathematics and Computer Science. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("VIG: Data Scaling for OBDA Benchmarks.")]),a._v(" Davide Lanti, Guohui Xiao, and Diego Calvanese. Semantic Web Journal. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-based Data Access - Beyond relational sources.")]),a._v(" Elena Botoeva, Diego Calvanese, Benjamin Cogrel, Julien Corman, Guohui Xiao. Intelligenza Artificiale. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Querying Log Data with Metric Temporal Logic.")]),a._v(" Sebastian\nBrandt, Elem Güzel Kalaycı, Vladislav Ryzhikov, Guohui Xiao, and\nMichael Zakharyaschev. Journal of Artificial Intelligence\nResearch, 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Ontop: Answering SPARQL Queries over Relational Databases.")]),a._v("\nDiego Calvanese, Benjamin Cogrel, Sarah Komla-Ebri, Roman\nKontchakov, Davide Lanti, Martin Rezk, Mariano Rodriguez-Muro,\nand Guohui Xiao. Semantic Web Journal. 2017 "),e("a",{attrs:{href:"http://www.semantic-web-journal.net/blog/semantic-web-journal-awards-2016",target:"_blank",rel:"noopener"}},[e("em",[a._v("(SWJ 2016\nOutstanding Paper\nAward)")]),e("OutboundLink")],1)]),a._v(" "),e("li",[e("strong",[a._v("Ontology Based Data Access in Statoil.")]),a._v(" Evgeny\nKharlamov, Dag Hovland, Martin G. Skjæveland, Dimitris Bilidas,\nErnesto Jiménez-Ruiz, Guohui Xiao, Ahmet Soylu, Davide Lanti,\nMartin Rezk, Dmitriy Zheleznyakov, Martin Giese, Hallstein Lie,\nYannis E. Ioannidis, Yannis Kotidis, Manolis Koubarakis, Arild\nWaaler. Journal of Web Semantics, 2017.")]),a._v(" "),e("li",[e("strong",[a._v("Efficient SPARQL-to-SQL with R2RML mappings")]),a._v(". Mariano\nRodriguez-Muro and Martin Rezk, J. of Web Semantics. 2015")]),a._v(" "),e("li",[e("strong",[a._v("Optique --- zooming in on big data access")]),a._v(". Martin Giese,\nPeter Haase, Ernesto Jiménez-Ruiz, Davide Lanti, Özgür Özçep,\nMartin Rezk, Riccardo Rosati, Ahmet Soylu, Guillermo\nVega-Gorgojo, Arild Waaler, and Guohui Xiao. IEEE Computer. 2015")])]),a._v(" "),e("h2",{attrs:{id:"conferences"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#conferences"}},[a._v("#")]),a._v(" Conferences")]),a._v(" "),e("ol",[e("li",[e("strong",[a._v("The Virtual Knowledge Graph System Ontop")]),a._v(". Guohui Xiao, Davide Lanti, Roman Kontchakov, Sarah Komla-Ebri, Elem Güzel-Kalayci, Linfang Ding, Julien Corman, Benjamin Cogrel, Diego Calvanese, and Elena Botoeva. ISWC (Resource), 2020.")]),a._v(" "),e("li",[e("strong",[a._v("Semantic Integration of Bosch Manufacturing Data Using Virtual Knowledge Graphs")]),a._v(". Elem Güzel Kalaycı, Irlan Grangel Gonález, Felix Lösch, Guohui Xiao, Anees ul-Mehdi, Evgeny Kharlamov, and Diego Calvanese. ISWC (In-Use), 2020.")]),a._v(" "),e("li",[e("strong",[a._v("Enriching Ontology-based Data Access with Provenance.")]),a._v(" Diego Calvanese, Davide Lanti, Ana Ozaki, Rafael Penaloza, and Guohui Xiao. IJCAI, 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Efficient Handling of SPARQL OPTIONAL for OBDA.")]),a._v(" Guohui Xiao,\nRoman Kontchakov, Benjamin Cogrel, Diego Calvanese, and Elena\nBotoeva. ISWC (Research), 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-based data access: A survey.")]),a._v(" Guohui Xiao, Diego Calvanese, Roman Kontchakov, Domenico Lembo, Antonella Poggi, Riccardo Rosati, Michael Zakharyaschev. IJCAI. 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Ontop-temporal: A Tool for Ontology-based Query Answering over Temporal Data.")]),a._v(" Elem Güzel Kalayci, Guohui Xiao, Vladislav Ryzhikov, Tahir Emre Kalayci, and Diego Calvanese. CIKM. 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Efficient Ontology-Based Data Integration with canonical IRIs")]),a._v(".\nGuohui Xiao, Dag Hovland, Dimitris Bilidas, Martin Rezk, Martin\nGiese, and Diego Calvanese. ESWC, 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Cost-Driven Ontology-Based Data Access.")]),a._v(" Davide\nLanti, Guohui Xiao, Diego Calvanese. ISWC (Research), 2017.")]),a._v(" "),e("li",[e("strong",[a._v("Semantic Rule-Based Equipment Diagnostics.")]),a._v(" Gulnar\nMehdi, Evgeny Kharlamov, Ognjen Savkovic, Guohui Xiao, Elem\nGüzel Kalayci, Sebastian Brandt, Ian Horrocks, Mikhail Roshchin,\nThomas A. Runkler. ISWC (In-Use), 2017. "),e("a",{attrs:{href:"https://iswc2017.semanticweb.org/program/awards/",target:"_blank",rel:"noopener"}},[a._v("(Best In-Use Paper\nAward)"),e("OutboundLink")],1)]),a._v(" "),e("li",[e("strong",[a._v("Ontology-Based Data Access with a Horn Fragment of Metric\nTemporal Logic.")]),a._v(" Sebastian Brandt, Elem Güzel Kalayci,\nRoman Kontchakov, Vladislav Ryzhikov, Guohui Xiao, Michael\nZakharyaschev. AAAI, 2017.")]),a._v(" "),e("li",[e("strong",[a._v("Beyond OWL 2 QL in OBDA: Rewritings and Approximations")]),a._v(".\nElena Botoeva, Diego Calvanese, Valerio Santarelli, Domenico\nFabio Savo, Alessandro Solimando and Guohui Xiao. AAAI, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-Based Data Access for Maritime Security")]),a._v(". Stefan\nBrüggemann, Konstantina Bereta, Guohui Xiao and Manolis\nKoubarakis. ESWC (In-Use), 2016.")]),a._v(" "),e("li",[e("strong",[a._v("OBDA Constraints for Effective Query Answering")]),a._v(". Dag Hovland,\nDavide Lanti, Martin Rezk and Guohui Xiao. RuleML, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("Towards Practical OBDA with Temporal Ontologies (Position\nPaper)")]),a._v(". Diego Calvanese, Elem Güzel Kalayci, Vladislav\nRyzhikov and Guohui Xiao. RR, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-based Integration of Cross-linked Datasets")]),a._v(". Diego\nCalvanese, Martin Giese, Dag Hovland and Martin Rezk (ISWC\n2015), 2015.")]),a._v(" "),e("li",[e("strong",[a._v("The NPD benchmark: Reality check for OBDA systems")]),a._v(". Davide\nLanti, Martin Rezk, Guohui Xiao, and Diego Calvanese. In Proc.\nof the 18th Int. Conf. on Extending Database Technology (EDBT\n2015). ACM Press, 2015.")]),a._v(" "),e("li",[e("strong",[a._v("Answering SPARQL Queries over Databases and under OWL 2 QL\nEntailment Regime")]),a._v(". Roman Kontchakov, Martin Rezk, Mariano\nRodriguez-Muro, Guohui Xiao, and Michael Zakharyaschev.\nInternational Semantic Web Conference (ISWC), 2014.")]),a._v(" "),e("li",[e("strong",[a._v("Rules and Ontology Based Data Access")]),a._v(". Guohui Xiao, Martin\nRezk, Mariano Rodriguez-Muro, and Diego Calvanese. Eighth\nInternational Conference on Web Reasoning and Rule Systems,\n(RR), 2014.")]),a._v(" "),e("li",[e("strong",[a._v("High Performance Query Answering over DL-Lite Ontologies.")]),a._v("\nMariano Rodriguez-Muro, Diego Calvanese. KR 2012")]),a._v(" "),e("li",[e("strong",[a._v("Quest: Effcient SPARQL-to-SQL for RDF and OWL.")]),a._v(" Mariano\nRodriguez-Muro, Josef Hardi, Diego Calvanese. ISWC (Posters &\nDemos) 2012")])]),a._v(" "),e("h2",{attrs:{id:"workshops"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#workshops"}},[a._v("#")]),a._v(" Workshops")]),a._v(" "),e("ol",[e("li",[e("strong",[a._v("Fast and Simple Data Scaling for OBDA Benchmarks")]),a._v(". Davide\nLanti, Guohui Xiao and Diego Calvanese. BLINK@ISWC, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("OBDA Beyond Relational DBs: A Study for MongoDB")]),a._v(". Elena\nBotoeva, Diego Calvanese, Benjamin Cogrel, Martin Rezk and\nGuohui Xiao. Description Logics, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("The ontop framework for ontology based data access.")]),a._v(" Timea\nBagosi, Diego Calvanese, Josef Hardi, Sarah Komla-Ebri, Davide\nLanti, Martin Rezk, Mariano Rodriguez-Muro, Mindaugas Slusnys,\nand Guohui Xiao. CSWS (Posters and Demos), Wuhan, China,\nAugust 2014.")]),a._v(" "),e("li",[e("strong",[a._v("The NPD benchmark for OBDA systems.")]),a._v(" Davide Lanti, Martin\nRezk, Mindaugas Slusnys, Guohui Xiao, and Diego Calvanese. SSWS\n2014")]),a._v(" "),e("li",[e("strong",[a._v("A scalable benchmark for OBDA systems: Preliminary report.")]),a._v("\nDiego Calvanese, Davide Lanti, Martin Rezk, Mindaugas Slusnys,\nand Guohui Xiao. ORE 2014")]),a._v(" "),e("li",[e("strong",[a._v("Query Rewriting and Optimisation with Database Dependencies in\nOntop.")]),a._v(" Mariano Rodriguez-Muro, Roman Kontchakov, Michael\nZakharyaschev: Description Logics 2013")]),a._v(" "),e("li",[e("strong",[a._v("Evaluating SPARQL-to-SQL Translation in Ontop.")]),a._v(" Mariano\nRodriguez-Muro, Martín Rezk, Josef Hardi, Mindaugas Slusnys,\nTimea Bagosi, Diego Calvanese: ORE 2013")]),a._v(" "),e("li",[e("strong",[a._v("OBDA with Ontop.")]),a._v(" Mariano Rodriguez-Muro, Roman Kontchakov,\nMichael Zakharyaschev: ORE 2013")]),a._v(" "),e("li",[e("strong",[a._v("Ontop at Work.")]),a._v(" Mariano Rodriguez-Muro, Roman Kontchakov,\nMichael Zakharyaschev. OWLED 2013")]),a._v(" "),e("li",[e("strong",[a._v("On Rewriting, Answering Queries in OBDA Systems for Big Data\n(Short Paper)")]),a._v(". Diego Calvanese, Ian Horrocks, Ernesto\nJiménez-Ruiz, Evgeny Kharlamov, Michael Meier, Mariano\nRodriguez-Muro, Dmitriy Zheleznyakov. OWLED 2013")]),a._v(" "),e("li",[e("strong",[a._v("Quest, an OWL 2 QL Reasoner for Ontology-based Data Access.")]),a._v("\nMariano Rodriguez-Muro, Diego Calvanese. OWLED 2012")])]),a._v(" "),e("h2",{attrs:{id:"tutorials-and-demos"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tutorials-and-demos"}},[a._v("#")]),a._v(" Tutorials and Demos")]),a._v(" "),e("ol",[e("li",[e("a",{attrs:{href:"https://github.com/ontopic-vkg/destination-tutorial",target:"_blank",rel:"noopener"}},[a._v("Destination Tutorial"),e("OutboundLink")],1),a._v(" given at the Knowledge Graph Conference 2021 by Diego Calvanese, Benjamin Cogrel and Guohui Xiao.")]),a._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/ontop/ontop-examples/tree/master/aixia-2018-tutorial/",target:"_blank",rel:"noopener"}},[a._v("Novel Developments in Ontology-Based Data Access and\nIntegration\n(NOBDI)"),e("OutboundLink")],1),a._v("\nDiego Calvanese, Benjamin Cogrel and Guohui Xiao. Full day\ntutorial, 17th International Conference of the Italian\nAssociation for Artificial Intelligence -- Trento, November\n20-23, 2018.")]),a._v(" "),e("li",[e("RouterLink",{attrs:{to:"/research/tutorials/cikm-2018/"}},[a._v("Semantic Technologies for Data Access and\nIntegration")]),a._v(".\nDiego Calvanese and Guohui Xiao. Full day tutorial, CIKM.\nTorino, 26 October 2018.")],1),a._v(" "),e("li",[e("a",{attrs:{href:"http://ontop.inf.unibz.it/ijcai-2018-tutorial/",target:"_blank",rel:"noopener"}},[a._v("Ontology-based Data Access: Theory and\nPractice"),e("OutboundLink")],1),a._v(".\nGuohui Xiao and Roman Konchakov. Full day tutorial, IJCAI 2018\nTutorial. Stockholm, July 14, 2018.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://ontop.inf.unibz.it/ekaw-2016-tutorial/",target:"_blank",rel:"noopener"}},[a._v("Mapping Management and Expressive Ontologies in Ontology-Based\nData Access"),e("OutboundLink")],1),a._v(".\nDiego Calvanese, Benjamin Cogrel and Guohui Xiao. Full day\ntutorial, EKAW. Bologna, November 19, 2016.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://esslli2016.unibz.it/wp-content/uploads/2015/10/ontop-esslli.pdf",target:"_blank",rel:"noopener"}},[a._v("Ontology-Based Data Access with\nOntop"),e("OutboundLink")],1),a._v(".\nBenjamin Cogrel. Lecture at the ESSLLI summer school, 2016.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://www.slideshare.net/guohuixiao/ontop-answering-sparql-queries-over-relational-databases/",target:"_blank",rel:"noopener"}},[a._v("Ontop: Answering SPARQL Queries over Relational\nDatabases"),e("OutboundLink")],1),a._v(".\nGuohui Xiao. Stanford, 2016.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://ontop.inf.unibz.it/iswc-2015-tutorial",target:"_blank",rel:"noopener"}},[a._v("Ontology-based Data Access: From Theory to\nPractice"),e("OutboundLink")],1),a._v(" (Diego\nCalvanese, Martin Rezk, Guohui Xiao. ISWC 2015 Tutorial)")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://www.ghxiao.org/talks/2014-csws-obda-talk.pdf",target:"_blank",rel:"noopener"}},[a._v("Ontology-based data access --- Theory and\nPractice"),e("OutboundLink")],1),a._v(".\n(Guohui Xiao, Summer School at CSWS2014, Wuhan, China)")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://rw2014.di.uoa.gr/?q=Schedule",target:"_blank",rel:"noopener"}},[a._v("An Introduction to Description Logics and Query\nRewriting."),e("OutboundLink")],1),a._v(" Roman\nKontchakov, Michael Zakharyaschev. Reasoning Web 2014")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://link.springer.com/chapter/10.1007%2F978-3-642-39784-4_5",target:"_blank",rel:"noopener"}},[a._v("Ontology-Based Data Access with Databases: A Short\nCourse."),e("OutboundLink")],1),a._v("\n(Roman Kontchakov, Mariano Rodriguez-Muro, Michael\nZakharyaschev. Reasoning Web 2013)")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://www.slideshare.net/marianomx/ontop-a-tutorial",target:"_blank",rel:"noopener"}},[a._v("Ontop: A Tutorial"),e("OutboundLink")],1),a._v("\n(Mariano Rodriguez-Muro, Vienna'13)")])]),a._v(" "),e("h2",{attrs:{id:"master-theses"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#master-theses"}},[a._v("#")]),a._v(" Master theses")]),a._v(" "),e("ul",[e("li",[a._v("Lukas Sundqvist: "),e("a",{attrs:{href:"https://ontop-vkg.org/publications/2022-sundqvist-rdf-star-ontop-msc-thesis.pdf",target:"_blank",rel:"noopener"}},[a._v("Extending VKG Systems with RDF-star Support"),e("OutboundLink")],1),a._v(", Free University of Bozen-Bolzano, March 2022.")])])])}),[],!1,null,null,null);n.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{446:function(a,n,e){"use strict";e.r(n);var o=e(51),i=Object(o.a)({},(function(){var a=this,n=a.$createElement,e=a._self._c||n;return e("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[e("h1",{attrs:{id:"publications"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#publications"}},[a._v("#")]),a._v(" Publications")]),a._v(" "),e("h2",{attrs:{id:"journals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#journals"}},[a._v("#")]),a._v(" Journals")]),a._v(" "),e("ol",[e("li",[e("strong",[a._v("Virtual Knowledge Graphs: An Overview of Systems and Use Cases.")]),a._v(" Guohui Xiao, Linfang Ding, Benjamin Cogrel, Diego Calvanese. Data Intelligence. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Ontop-spatial: Ontop of Geospatial Databases.")]),a._v(" Konstantina Bereta, Guohui Xiao, and Manolis Koubarakis. Journal of Web Semantics. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-Based Access To Temporal Data With Ontop: A Framework Proposal.")]),a._v(" Elem Güzel Kalaycı, Sebastian Brandt, Diego Calvanese, Vladislav Ryzhikov, Guohui Xiao, and Michael Zakharyaschev. International Journal of Applied Mathematics and Computer Science. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("VIG: Data Scaling for OBDA Benchmarks.")]),a._v(" Davide Lanti, Guohui Xiao, and Diego Calvanese. Semantic Web Journal. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-based Data Access - Beyond relational sources.")]),a._v(" Elena Botoeva, Diego Calvanese, Benjamin Cogrel, Julien Corman, Guohui Xiao. Intelligenza Artificiale. 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Querying Log Data with Metric Temporal Logic.")]),a._v(" Sebastian\nBrandt, Elem Güzel Kalaycı, Vladislav Ryzhikov, Guohui Xiao, and\nMichael Zakharyaschev. Journal of Artificial Intelligence\nResearch, 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Ontop: Answering SPARQL Queries over Relational Databases.")]),a._v("\nDiego Calvanese, Benjamin Cogrel, Sarah Komla-Ebri, Roman\nKontchakov, Davide Lanti, Martin Rezk, Mariano Rodriguez-Muro,\nand Guohui Xiao. Semantic Web Journal. 2017 "),e("a",{attrs:{href:"http://www.semantic-web-journal.net/blog/semantic-web-journal-awards-2016",target:"_blank",rel:"noopener"}},[e("em",[a._v("(SWJ 2016\nOutstanding Paper\nAward)")]),e("OutboundLink")],1)]),a._v(" "),e("li",[e("strong",[a._v("Ontology Based Data Access in Statoil.")]),a._v(" Evgeny\nKharlamov, Dag Hovland, Martin G. Skjæveland, Dimitris Bilidas,\nErnesto Jiménez-Ruiz, Guohui Xiao, Ahmet Soylu, Davide Lanti,\nMartin Rezk, Dmitriy Zheleznyakov, Martin Giese, Hallstein Lie,\nYannis E. Ioannidis, Yannis Kotidis, Manolis Koubarakis, Arild\nWaaler. Journal of Web Semantics, 2017.")]),a._v(" "),e("li",[e("strong",[a._v("Efficient SPARQL-to-SQL with R2RML mappings")]),a._v(". Mariano\nRodriguez-Muro and Martin Rezk, J. of Web Semantics. 2015")]),a._v(" "),e("li",[e("strong",[a._v("Optique --- zooming in on big data access")]),a._v(". Martin Giese,\nPeter Haase, Ernesto Jiménez-Ruiz, Davide Lanti, Özgür Özçep,\nMartin Rezk, Riccardo Rosati, Ahmet Soylu, Guillermo\nVega-Gorgojo, Arild Waaler, and Guohui Xiao. IEEE Computer. 2015")])]),a._v(" "),e("h2",{attrs:{id:"conferences"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#conferences"}},[a._v("#")]),a._v(" Conferences")]),a._v(" "),e("ol",[e("li",[e("strong",[a._v("The Virtual Knowledge Graph System Ontop")]),a._v(". Guohui Xiao, Davide Lanti, Roman Kontchakov, Sarah Komla-Ebri, Elem Güzel-Kalayci, Linfang Ding, Julien Corman, Benjamin Cogrel, Diego Calvanese, and Elena Botoeva. ISWC (Resource), 2020.")]),a._v(" "),e("li",[e("strong",[a._v("Semantic Integration of Bosch Manufacturing Data Using Virtual Knowledge Graphs")]),a._v(". Elem Güzel Kalaycı, Irlan Grangel Gonález, Felix Lösch, Guohui Xiao, Anees ul-Mehdi, Evgeny Kharlamov, and Diego Calvanese. ISWC (In-Use), 2020.")]),a._v(" "),e("li",[e("strong",[a._v("Enriching Ontology-based Data Access with Provenance.")]),a._v(" Diego Calvanese, Davide Lanti, Ana Ozaki, Rafael Penaloza, and Guohui Xiao. IJCAI, 2019.")]),a._v(" "),e("li",[e("strong",[a._v("Efficient Handling of SPARQL OPTIONAL for OBDA.")]),a._v(" Guohui Xiao,\nRoman Kontchakov, Benjamin Cogrel, Diego Calvanese, and Elena\nBotoeva. ISWC (Research), 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-based data access: A survey.")]),a._v(" Guohui Xiao, Diego Calvanese, Roman Kontchakov, Domenico Lembo, Antonella Poggi, Riccardo Rosati, Michael Zakharyaschev. IJCAI. 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Ontop-temporal: A Tool for Ontology-based Query Answering over Temporal Data.")]),a._v(" Elem Güzel Kalayci, Guohui Xiao, Vladislav Ryzhikov, Tahir Emre Kalayci, and Diego Calvanese. CIKM. 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Efficient Ontology-Based Data Integration with canonical IRIs")]),a._v(".\nGuohui Xiao, Dag Hovland, Dimitris Bilidas, Martin Rezk, Martin\nGiese, and Diego Calvanese. ESWC, 2018.")]),a._v(" "),e("li",[e("strong",[a._v("Cost-Driven Ontology-Based Data Access.")]),a._v(" Davide\nLanti, Guohui Xiao, Diego Calvanese. ISWC (Research), 2017.")]),a._v(" "),e("li",[e("strong",[a._v("Semantic Rule-Based Equipment Diagnostics.")]),a._v(" Gulnar\nMehdi, Evgeny Kharlamov, Ognjen Savkovic, Guohui Xiao, Elem\nGüzel Kalayci, Sebastian Brandt, Ian Horrocks, Mikhail Roshchin,\nThomas A. Runkler. ISWC (In-Use), 2017. "),e("a",{attrs:{href:"https://iswc2017.semanticweb.org/program/awards/",target:"_blank",rel:"noopener"}},[a._v("(Best In-Use Paper\nAward)"),e("OutboundLink")],1)]),a._v(" "),e("li",[e("strong",[a._v("Ontology-Based Data Access with a Horn Fragment of Metric\nTemporal Logic.")]),a._v(" Sebastian Brandt, Elem Güzel Kalayci,\nRoman Kontchakov, Vladislav Ryzhikov, Guohui Xiao, Michael\nZakharyaschev. AAAI, 2017.")]),a._v(" "),e("li",[e("strong",[a._v("Beyond OWL 2 QL in OBDA: Rewritings and Approximations")]),a._v(".\nElena Botoeva, Diego Calvanese, Valerio Santarelli, Domenico\nFabio Savo, Alessandro Solimando and Guohui Xiao. AAAI, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-Based Data Access for Maritime Security")]),a._v(". Stefan\nBrüggemann, Konstantina Bereta, Guohui Xiao and Manolis\nKoubarakis. ESWC (In-Use), 2016.")]),a._v(" "),e("li",[e("strong",[a._v("OBDA Constraints for Effective Query Answering")]),a._v(". Dag Hovland,\nDavide Lanti, Martin Rezk and Guohui Xiao. RuleML, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("Towards Practical OBDA with Temporal Ontologies (Position\nPaper)")]),a._v(". Diego Calvanese, Elem Güzel Kalayci, Vladislav\nRyzhikov and Guohui Xiao. RR, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("Ontology-based Integration of Cross-linked Datasets")]),a._v(". Diego\nCalvanese, Martin Giese, Dag Hovland and Martin Rezk (ISWC\n2015), 2015.")]),a._v(" "),e("li",[e("strong",[a._v("The NPD benchmark: Reality check for OBDA systems")]),a._v(". Davide\nLanti, Martin Rezk, Guohui Xiao, and Diego Calvanese. In Proc.\nof the 18th Int. Conf. on Extending Database Technology (EDBT\n2015). ACM Press, 2015.")]),a._v(" "),e("li",[e("strong",[a._v("Answering SPARQL Queries over Databases and under OWL 2 QL\nEntailment Regime")]),a._v(". Roman Kontchakov, Martin Rezk, Mariano\nRodriguez-Muro, Guohui Xiao, and Michael Zakharyaschev.\nInternational Semantic Web Conference (ISWC), 2014.")]),a._v(" "),e("li",[e("strong",[a._v("Rules and Ontology Based Data Access")]),a._v(". Guohui Xiao, Martin\nRezk, Mariano Rodriguez-Muro, and Diego Calvanese. Eighth\nInternational Conference on Web Reasoning and Rule Systems,\n(RR), 2014.")]),a._v(" "),e("li",[e("strong",[a._v("High Performance Query Answering over DL-Lite Ontologies.")]),a._v("\nMariano Rodriguez-Muro, Diego Calvanese. KR 2012")]),a._v(" "),e("li",[e("strong",[a._v("Quest: Effcient SPARQL-to-SQL for RDF and OWL.")]),a._v(" Mariano\nRodriguez-Muro, Josef Hardi, Diego Calvanese. ISWC (Posters &\nDemos) 2012")])]),a._v(" "),e("h2",{attrs:{id:"workshops"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#workshops"}},[a._v("#")]),a._v(" Workshops")]),a._v(" "),e("ol",[e("li",[e("strong",[a._v("Fast and Simple Data Scaling for OBDA Benchmarks")]),a._v(". Davide\nLanti, Guohui Xiao and Diego Calvanese. BLINK@ISWC, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("OBDA Beyond Relational DBs: A Study for MongoDB")]),a._v(". Elena\nBotoeva, Diego Calvanese, Benjamin Cogrel, Martin Rezk and\nGuohui Xiao. Description Logics, 2016.")]),a._v(" "),e("li",[e("strong",[a._v("The ontop framework for ontology based data access.")]),a._v(" Timea\nBagosi, Diego Calvanese, Josef Hardi, Sarah Komla-Ebri, Davide\nLanti, Martin Rezk, Mariano Rodriguez-Muro, Mindaugas Slusnys,\nand Guohui Xiao. CSWS (Posters and Demos), Wuhan, China,\nAugust 2014.")]),a._v(" "),e("li",[e("strong",[a._v("The NPD benchmark for OBDA systems.")]),a._v(" Davide Lanti, Martin\nRezk, Mindaugas Slusnys, Guohui Xiao, and Diego Calvanese. SSWS\n2014")]),a._v(" "),e("li",[e("strong",[a._v("A scalable benchmark for OBDA systems: Preliminary report.")]),a._v("\nDiego Calvanese, Davide Lanti, Martin Rezk, Mindaugas Slusnys,\nand Guohui Xiao. ORE 2014")]),a._v(" "),e("li",[e("strong",[a._v("Query Rewriting and Optimisation with Database Dependencies in\nOntop.")]),a._v(" Mariano Rodriguez-Muro, Roman Kontchakov, Michael\nZakharyaschev: Description Logics 2013")]),a._v(" "),e("li",[e("strong",[a._v("Evaluating SPARQL-to-SQL Translation in Ontop.")]),a._v(" Mariano\nRodriguez-Muro, Martín Rezk, Josef Hardi, Mindaugas Slusnys,\nTimea Bagosi, Diego Calvanese: ORE 2013")]),a._v(" "),e("li",[e("strong",[a._v("OBDA with Ontop.")]),a._v(" Mariano Rodriguez-Muro, Roman Kontchakov,\nMichael Zakharyaschev: ORE 2013")]),a._v(" "),e("li",[e("strong",[a._v("Ontop at Work.")]),a._v(" Mariano Rodriguez-Muro, Roman Kontchakov,\nMichael Zakharyaschev. OWLED 2013")]),a._v(" "),e("li",[e("strong",[a._v("On Rewriting, Answering Queries in OBDA Systems for Big Data\n(Short Paper)")]),a._v(". Diego Calvanese, Ian Horrocks, Ernesto\nJiménez-Ruiz, Evgeny Kharlamov, Michael Meier, Mariano\nRodriguez-Muro, Dmitriy Zheleznyakov. OWLED 2013")]),a._v(" "),e("li",[e("strong",[a._v("Quest, an OWL 2 QL Reasoner for Ontology-based Data Access.")]),a._v("\nMariano Rodriguez-Muro, Diego Calvanese. OWLED 2012")])]),a._v(" "),e("h2",{attrs:{id:"tutorials-and-demos"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tutorials-and-demos"}},[a._v("#")]),a._v(" Tutorials and Demos")]),a._v(" "),e("ol",[e("li",[e("a",{attrs:{href:"https://github.com/ontopic-vkg/destination-tutorial",target:"_blank",rel:"noopener"}},[a._v("Destination Tutorial"),e("OutboundLink")],1),a._v(" given at the Knowledge Graph Conference 2021 by Diego Calvanese, Benjamin Cogrel and Guohui Xiao.")]),a._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/ontop/ontop-examples/tree/master/aixia-2018-tutorial/",target:"_blank",rel:"noopener"}},[a._v("Novel Developments in Ontology-Based Data Access and\nIntegration\n(NOBDI)"),e("OutboundLink")],1),a._v("\nDiego Calvanese, Benjamin Cogrel and Guohui Xiao. Full day\ntutorial, 17th International Conference of the Italian\nAssociation for Artificial Intelligence -- Trento, November\n20-23, 2018.")]),a._v(" "),e("li",[e("RouterLink",{attrs:{to:"/research/tutorials/cikm-2018/"}},[a._v("Semantic Technologies for Data Access and\nIntegration")]),a._v(".\nDiego Calvanese and Guohui Xiao. Full day tutorial, CIKM.\nTorino, 26 October 2018.")],1),a._v(" "),e("li",[e("a",{attrs:{href:"http://ontop.inf.unibz.it/ijcai-2018-tutorial/",target:"_blank",rel:"noopener"}},[a._v("Ontology-based Data Access: Theory and\nPractice"),e("OutboundLink")],1),a._v(".\nGuohui Xiao and Roman Konchakov. Full day tutorial, IJCAI 2018\nTutorial. Stockholm, July 14, 2018.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://ontop.inf.unibz.it/ekaw-2016-tutorial/",target:"_blank",rel:"noopener"}},[a._v("Mapping Management and Expressive Ontologies in Ontology-Based\nData Access"),e("OutboundLink")],1),a._v(".\nDiego Calvanese, Benjamin Cogrel and Guohui Xiao. Full day\ntutorial, EKAW. Bologna, November 19, 2016.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://esslli2016.unibz.it/wp-content/uploads/2015/10/ontop-esslli.pdf",target:"_blank",rel:"noopener"}},[a._v("Ontology-Based Data Access with\nOntop"),e("OutboundLink")],1),a._v(".\nBenjamin Cogrel. Lecture at the ESSLLI summer school, 2016.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://www.slideshare.net/guohuixiao/ontop-answering-sparql-queries-over-relational-databases/",target:"_blank",rel:"noopener"}},[a._v("Ontop: Answering SPARQL Queries over Relational\nDatabases"),e("OutboundLink")],1),a._v(".\nGuohui Xiao. Stanford, 2016.")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://ontop.inf.unibz.it/iswc-2015-tutorial",target:"_blank",rel:"noopener"}},[a._v("Ontology-based Data Access: From Theory to\nPractice"),e("OutboundLink")],1),a._v(" (Diego\nCalvanese, Martin Rezk, Guohui Xiao. ISWC 2015 Tutorial)")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://www.ghxiao.org/talks/2014-csws-obda-talk.pdf",target:"_blank",rel:"noopener"}},[a._v("Ontology-based data access --- Theory and\nPractice"),e("OutboundLink")],1),a._v(".\n(Guohui Xiao, Summer School at CSWS2014, Wuhan, China)")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://rw2014.di.uoa.gr/?q=Schedule",target:"_blank",rel:"noopener"}},[a._v("An Introduction to Description Logics and Query\nRewriting."),e("OutboundLink")],1),a._v(" Roman\nKontchakov, Michael Zakharyaschev. Reasoning Web 2014")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://link.springer.com/chapter/10.1007%2F978-3-642-39784-4_5",target:"_blank",rel:"noopener"}},[a._v("Ontology-Based Data Access with Databases: A Short\nCourse."),e("OutboundLink")],1),a._v("\n(Roman Kontchakov, Mariano Rodriguez-Muro, Michael\nZakharyaschev. Reasoning Web 2013)")]),a._v(" "),e("li",[e("a",{attrs:{href:"http://www.slideshare.net/marianomx/ontop-a-tutorial",target:"_blank",rel:"noopener"}},[a._v("Ontop: A Tutorial"),e("OutboundLink")],1),a._v("\n(Mariano Rodriguez-Muro, Vienna'13)")])]),a._v(" "),e("h2",{attrs:{id:"master-theses"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#master-theses"}},[a._v("#")]),a._v(" Master theses")]),a._v(" "),e("ul",[e("li",[a._v("Lukas Sundqvist: "),e("a",{attrs:{href:"https://ontop-vkg.org/publications/2022-sundqvist-rdf-star-ontop-msc-thesis.pdf",target:"_blank",rel:"noopener"}},[a._v("Extending VKG Systems with RDF-star Support"),e("OutboundLink")],1),a._v(", Free University of Bozen-Bolzano, March 2022.")])])])}),[],!1,null,null,null);n.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/70.89ffe144.js b/assets/js/70.390c1b51.js similarity index 98% rename from assets/js/70.89ffe144.js rename to assets/js/70.390c1b51.js index 71af64548..0cae8df63 100644 --- a/assets/js/70.89ffe144.js +++ b/assets/js/70.390c1b51.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{449:function(e,t,a){"use strict";a.r(t);var n=a(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"cikm-2018-tutorial"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cikm-2018-tutorial"}},[e._v("#")]),e._v(" CIKM 2018 Tutorial")]),e._v(" "),a("h2",{attrs:{id:"semantic-technologies-for-data-access-and-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#semantic-technologies-for-data-access-and-integration"}},[e._v("#")]),e._v(" Semantic Technologies for Data Access and Integration")]),e._v(" "),a("h3",{attrs:{id:"presented-by"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#presented-by"}},[e._v("#")]),e._v(" Presented by")]),e._v(" "),a("p",[e._v("Diego Calvanese, Guohui Xiao")]),e._v(" "),a("h3",{attrs:{id:"time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#time"}},[e._v("#")]),e._v(" Time")]),e._v(" "),a("p",[e._v("Friday, 26 October 2018"),a("br"),e._v("\n08:15AM-09:45AM & 10:15AM-11:45AM & 01:00PM-02:30PM")]),e._v(" "),a("h3",{attrs:{id:"abstract"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#abstract"}},[e._v("#")]),e._v(" Abstract")]),e._v(" "),a("p",[e._v("In this tutorial, we cover such principles and the main (semantic)\ntechnologies underlying OBDA/I. In addition to the theoretical\nunderpinning, we provide participants also with a practical hands-on\nexperience on state-of-the-art tools. In this way, industry\npractitioners and researchers gain a good understanding of semantic\ntechnologies for OBDA/I, and are able to deploy them for their data\naccess and data integration needs in practical use-cases.")]),e._v(" "),a("h3",{attrs:{id:"schedule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#schedule"}},[e._v("#")]),e._v(" Schedule")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Session 1. 08:15AM-09:45AM")]),e._v(" "),a("ul",[a("li",[e._v("Motivation")]),e._v(" "),a("li",[e._v("Elements of OBDA systems")]),e._v(" "),a("li",[e._v("Semantic Web standards")])])]),e._v(" "),a("li",[a("p",[e._v("Session 2. 10:15AM-11:45AM")]),e._v(" "),a("ul",[a("li",[e._v("OBDA systems and Use cases (30 mins)")]),e._v(" "),a("li",[e._v("Hands-on with Protege (60min) [link]")])])]),e._v(" "),a("li",[a("p",[e._v("Session 3. 01:00PM-02:30PM")]),e._v(" "),a("ul",[a("li",[e._v("Query processing (rewriting) and optimization (60min)")]),e._v(" "),a("li",[e._v("Demo on integrating Web APIs using Ontop and Denodo (30min)")])]),e._v(" "),a("p",[e._v("All the slides are available at\n"),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/tree/master/cikm-2018-tutorial",target:"_blank",rel:"noopener"}},[e._v("GitHub"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"target-audience"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#target-audience"}},[e._v("#")]),e._v(" Target Audience")]),e._v(" "),a("p",[e._v("The target audience of the tutorial are researchers, PhD students,\nand practitioners, who are interested in deepening their theoretical\nunderstanding of semantic technologies for accessing and integrating\ndata, and in getting insight into recent developments in this area.")]),e._v(" "),a("h3",{attrs:{id:"prerequisite-knowledge"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#prerequisite-knowledge"}},[e._v("#")]),e._v(" Prerequisite Knowledge")]),e._v(" "),a("p",[e._v("We assume from participants basic knowledge on relational database\nfoundations (relational model, relational algebra and SQL) and\ntechnologies (use of relational engines, JDBC). Some knowledge of\nfirst-order logic might be useful, but is not required to follow the\ntutorial. Similarly, background in Semantic Web standards, such as\nRDF and SPARQL can be of help, although these notions are an\nintegral part of the tutorial, and are introduced and discussed in\nthe first part.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{447:function(e,t,a){"use strict";a.r(t);var n=a(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"cikm-2018-tutorial"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cikm-2018-tutorial"}},[e._v("#")]),e._v(" CIKM 2018 Tutorial")]),e._v(" "),a("h2",{attrs:{id:"semantic-technologies-for-data-access-and-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#semantic-technologies-for-data-access-and-integration"}},[e._v("#")]),e._v(" Semantic Technologies for Data Access and Integration")]),e._v(" "),a("h3",{attrs:{id:"presented-by"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#presented-by"}},[e._v("#")]),e._v(" Presented by")]),e._v(" "),a("p",[e._v("Diego Calvanese, Guohui Xiao")]),e._v(" "),a("h3",{attrs:{id:"time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#time"}},[e._v("#")]),e._v(" Time")]),e._v(" "),a("p",[e._v("Friday, 26 October 2018"),a("br"),e._v("\n08:15AM-09:45AM & 10:15AM-11:45AM & 01:00PM-02:30PM")]),e._v(" "),a("h3",{attrs:{id:"abstract"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#abstract"}},[e._v("#")]),e._v(" Abstract")]),e._v(" "),a("p",[e._v("In this tutorial, we cover such principles and the main (semantic)\ntechnologies underlying OBDA/I. In addition to the theoretical\nunderpinning, we provide participants also with a practical hands-on\nexperience on state-of-the-art tools. In this way, industry\npractitioners and researchers gain a good understanding of semantic\ntechnologies for OBDA/I, and are able to deploy them for their data\naccess and data integration needs in practical use-cases.")]),e._v(" "),a("h3",{attrs:{id:"schedule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#schedule"}},[e._v("#")]),e._v(" Schedule")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Session 1. 08:15AM-09:45AM")]),e._v(" "),a("ul",[a("li",[e._v("Motivation")]),e._v(" "),a("li",[e._v("Elements of OBDA systems")]),e._v(" "),a("li",[e._v("Semantic Web standards")])])]),e._v(" "),a("li",[a("p",[e._v("Session 2. 10:15AM-11:45AM")]),e._v(" "),a("ul",[a("li",[e._v("OBDA systems and Use cases (30 mins)")]),e._v(" "),a("li",[e._v("Hands-on with Protege (60min) [link]")])])]),e._v(" "),a("li",[a("p",[e._v("Session 3. 01:00PM-02:30PM")]),e._v(" "),a("ul",[a("li",[e._v("Query processing (rewriting) and optimization (60min)")]),e._v(" "),a("li",[e._v("Demo on integrating Web APIs using Ontop and Denodo (30min)")])]),e._v(" "),a("p",[e._v("All the slides are available at\n"),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/tree/master/cikm-2018-tutorial",target:"_blank",rel:"noopener"}},[e._v("GitHub"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"target-audience"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#target-audience"}},[e._v("#")]),e._v(" Target Audience")]),e._v(" "),a("p",[e._v("The target audience of the tutorial are researchers, PhD students,\nand practitioners, who are interested in deepening their theoretical\nunderstanding of semantic technologies for accessing and integrating\ndata, and in getting insight into recent developments in this area.")]),e._v(" "),a("h3",{attrs:{id:"prerequisite-knowledge"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#prerequisite-knowledge"}},[e._v("#")]),e._v(" Prerequisite Knowledge")]),e._v(" "),a("p",[e._v("We assume from participants basic knowledge on relational database\nfoundations (relational model, relational algebra and SQL) and\ntechnologies (use of relational engines, JDBC). Some knowledge of\nfirst-order logic might be useful, but is not required to follow the\ntutorial. Similarly, background in Semantic Web standards, such as\nRDF and SPARQL can be of help, although these notions are an\nintegral part of the tutorial, and are introduced and discussed in\nthe first part.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/71.122a990f.js b/assets/js/71.828a156a.js similarity index 98% rename from assets/js/71.122a990f.js rename to assets/js/71.828a156a.js index 088b5e487..d549dc988 100644 --- a/assets/js/71.122a990f.js +++ b/assets/js/71.828a156a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{446:function(t,e,o){"use strict";o.r(e);var i=o(51),a=Object(i.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"presentation"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#presentation"}},[t._v("#")]),t._v(" Presentation")]),t._v(" "),o("p",[t._v("In this tutorial, we will see how to design a Virtual Knowledge Graph (VKG) specification, how to deploy it as a SPARQL endpoint, how to consume it and further more advanced topics.")]),t._v(" "),o("h2",{attrs:{id:"requirements"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"http://www.oracle.com/technetwork/java/javase/downloads/index.html",target:"_blank",rel:"noopener"}},[t._v("Java 11"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("Latest version of Ontop from "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),o("OutboundLink")],1),t._v(" or "),o("a",{attrs:{href:"https://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("SourceForge"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("H2 with preloaded datasets "),o("a",{attrs:{href:"h2.zip"}},[t._v("h2.zip")])]),t._v(" "),o("li",[o("a",{attrs:{href:"https://git-scm.com/",target:"_blank",rel:"noopener"}},[t._v("Git"),o("OutboundLink")],1)])]),t._v(" "),o("h2",{attrs:{id:"clone-this-repository"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#clone-this-repository"}},[t._v("#")]),t._v(" Clone this repository")]),t._v(" "),o("p",[t._v("Before start, please clone this repository in order to download all the files")]),t._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[t._v("git clone https://github.com/ontop/ontop-tutorial.git\ncd ontop-tutorial\n")])])]),o("h2",{attrs:{id:"program"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#program"}},[t._v("#")]),t._v(" Program")]),t._v(" "),o("ol",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/setup.html"}},[t._v("Basics of VKG Modeling")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-1.html"}},[t._v("Mapping the first data source")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-2.html"}},[t._v("Mapping the second data source")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"endpoint"}},[t._v("Deploying an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-cli.html"}},[t._v("Using Ontop CLI")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("Using Ontop Docker image")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Interacting with an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Command Line Tools (curl, http)")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/jupyter.html"}},[t._v("Python and Jupyter Notebook")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"mapping"}},[t._v("Mapping Engineering")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("Role of primary keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("Role of foreign keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/uri-templates.html"}},[t._v("Choice of the URI templates")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/existential.html"}},[t._v("Bonus: existential reasoning")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("Materialization using Ontop")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("How to materialize data into a graph database using Ontop")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"federation"}},[t._v("Federating multiple databases")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/dremio/"}},[t._v("Ontop with Dremio")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/denodo/"}},[t._v("Ontop with Denodo")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"lenses"}},[t._v("Lenses")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("Basic Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/join-lens.html"}},[t._v("Join Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/sql-lens.html"}},[t._v("SQL Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/union-lens.html"}},[t._v("Union Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/flatten-lens.html"}},[t._v("Flatten Lens")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"external-tutorials"}},[t._v("External tutorials")])])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{449:function(t,e,o){"use strict";o.r(e);var i=o(51),a=Object(i.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"presentation"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#presentation"}},[t._v("#")]),t._v(" Presentation")]),t._v(" "),o("p",[t._v("In this tutorial, we will see how to design a Virtual Knowledge Graph (VKG) specification, how to deploy it as a SPARQL endpoint, how to consume it and further more advanced topics.")]),t._v(" "),o("h2",{attrs:{id:"requirements"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"http://www.oracle.com/technetwork/java/javase/downloads/index.html",target:"_blank",rel:"noopener"}},[t._v("Java 11"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("Latest version of Ontop from "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),o("OutboundLink")],1),t._v(" or "),o("a",{attrs:{href:"https://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("SourceForge"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("H2 with preloaded datasets "),o("a",{attrs:{href:"h2.zip"}},[t._v("h2.zip")])]),t._v(" "),o("li",[o("a",{attrs:{href:"https://git-scm.com/",target:"_blank",rel:"noopener"}},[t._v("Git"),o("OutboundLink")],1)])]),t._v(" "),o("h2",{attrs:{id:"clone-this-repository"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#clone-this-repository"}},[t._v("#")]),t._v(" Clone this repository")]),t._v(" "),o("p",[t._v("Before start, please clone this repository in order to download all the files")]),t._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[t._v("git clone https://github.com/ontop/ontop-tutorial.git\ncd ontop-tutorial\n")])])]),o("h2",{attrs:{id:"program"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#program"}},[t._v("#")]),t._v(" Program")]),t._v(" "),o("ol",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/setup.html"}},[t._v("Basics of VKG Modeling")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-1.html"}},[t._v("Mapping the first data source")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-2.html"}},[t._v("Mapping the second data source")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"endpoint"}},[t._v("Deploying an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-cli.html"}},[t._v("Using Ontop CLI")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("Using Ontop Docker image")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Interacting with an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Command Line Tools (curl, http)")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/jupyter.html"}},[t._v("Python and Jupyter Notebook")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"mapping"}},[t._v("Mapping Engineering")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("Role of primary keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("Role of foreign keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/uri-templates.html"}},[t._v("Choice of the URI templates")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/existential.html"}},[t._v("Bonus: existential reasoning")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("Materialization using Ontop")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("How to materialize data into a graph database using Ontop")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"federation"}},[t._v("Federating multiple databases")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/dremio/"}},[t._v("Ontop with Dremio")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/denodo/"}},[t._v("Ontop with Denodo")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"lenses"}},[t._v("Lenses")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("Basic Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/join-lens.html"}},[t._v("Join Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/sql-lens.html"}},[t._v("SQL Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/union-lens.html"}},[t._v("Union Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/flatten-lens.html"}},[t._v("Flatten Lens")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"external-tutorials"}},[t._v("External tutorials")])])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/74.c5aa0789.js b/assets/js/74.557f1c4c.js similarity index 99% rename from assets/js/74.c5aa0789.js rename to assets/js/74.557f1c4c.js index 0ff1847e0..1549b3144 100644 --- a/assets/js/74.c5aa0789.js +++ b/assets/js/74.557f1c4c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[74],{451:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"first-data-source-university-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#first-data-source-university-1"}},[t._v("#")]),t._v(" First data source: university 1")]),t._v(" "),a("p",[t._v("As a first step, we focus on the database of a first university. It has\nthe schema "),a("em",[t._v("uni1")]),t._v(".\nIt is composed of 5 tables.")]),t._v(" "),a("h4",{attrs:{id:"uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-student"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.student")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.student")]),t._v(" contains the local ID, first and last names of the students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("s_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Mary")]),t._v(" "),a("td",[t._v("Smith")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("John")]),t._v(" "),a("td",[t._v("Doe")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("s_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-academic"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.academic")])]),t._v(" "),a("p",[t._v("Similarly, the table "),a("em",[t._v("uni1.academic")]),t._v(" contains the local ID,\nfirst and last names of the academic staff, but also information about their position.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("a_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")]),t._v(" "),a("th",[t._v("position")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Anna")]),t._v(" "),a("td",[t._v("Chambers")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Edward")]),t._v(" "),a("td",[t._v("May")]),t._v(" "),a("td",[t._v("9")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Rachel")]),t._v(" "),a("td",[t._v("Ward")]),t._v(" "),a("td",[t._v("8")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("position")]),t._v(" is populated with magic numbers:")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Full Professor")]),t._v(" "),a("li",[t._v("2 -> Associate Professor")]),t._v(" "),a("li",[t._v("3 -> Assistant Professor")]),t._v(" "),a("li",[t._v("8 -> External Teacher")]),t._v(" "),a("li",[t._v("9 -> PostDoc")])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("a_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course")]),t._v(" contains the local ID\nand the title of the courses.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("title")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("Linear Algebra")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("c_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-teaching"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.teaching")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.teaching")]),t._v(" contains the n-n relation\nbetween courses and teachers.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("a_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.academic")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"uni1-course-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course-registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course-registration")]),t._v(" contains the n-n relation\nbetween courses and students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("s_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.student")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"ontology-classes-and-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology-classes-and-properties"}},[t._v("#")]),t._v(" Ontology: classes and properties")]),t._v(" "),a("ol",[a("li",[t._v("Download "),a("a",{attrs:{href:"university.ttl"}},[t._v("this OWL ontology file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.obda"}},[t._v("this mapping file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.properties"}},[t._v("this properties file")]),t._v(".")]),t._v(" "),a("li",[t._v("In Protégé, go to "),a("em",[t._v("File/Open...")]),t._v(" to load the ontology file (be sure you have all three files in the same folder).")]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Classes")]),t._v(" you can visualize the class hierarchy\n"),a("figure",[a("img",{attrs:{src:"ontology_classes.png",width:"303px"}})])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Object properties")]),t._v(" you can see the properties "),a("em",[t._v("attends")]),t._v(", "),a("em",[t._v("isGivenAt")]),t._v(", "),a("em",[t._v("isSupervisedBy")]),t._v(", "),a("em",[t._v("isTaughtBy")]),t._v(" and "),a("em",[t._v("teaches")]),t._v(" (with its two sub-properties "),a("em",[t._v("givesLab")]),t._v(" and "),a("em",[t._v("givesLecture")]),t._v(").\n"),a("figure",[a("span",[a("img",{attrs:{src:"ontology_object_properties.png",width:"208px"}})])])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Data properties")]),t._v(" you can see the properties "),a("em",[t._v("firstName")]),t._v(", "),a("em",[t._v("lastName")]),t._v(" and "),a("em",[t._v("title")]),t._v(".\n"),a("figure",[a("img",{attrs:{src:"ontology_data_properties.png",width:"197px"}})])])]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("ol",[a("li",[t._v("Go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop mapping")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Test the already defined connection configuration using the "),a("em",[t._v("Test Connection")]),t._v(" button")]),t._v(" "),a("li",[t._v("Switch to the "),a("em",[t._v("Mapping Manager")]),t._v(" tab in the ontop mappings tab")]),t._v(" "),a("li",[t._v("You should see a first mapping assertion called "),a("em",[t._v("uni1-student")])]),t._v(" "),a("li",[t._v("Double-click on it to observe it and then close this pop-up window.")])]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student"}},[t._v("#")]),t._v(" Mapping uni1-student")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"student"')]),t._v("\n")])])]),a("p",[t._v("Some remarks:")]),t._v(" "),a("ul",[a("li",[t._v("The target part is described using a "),a("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/TurtleSyntax",target:"_blank",rel:"noopener"}},[t._v("Turtle-like syntax"),a("OutboundLink")],1),t._v(" while the source part is a regular SQL query.")]),t._v(" "),a("li",[t._v("We used the primary key "),a("code",[t._v("s_id")]),t._v(" to create the IRI. "),a("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("As we will see later")]),t._v(",\nthis practice enables Ontop to remove self-joins, which is very important for optimizing\nthe query performance.")],1),t._v(" "),a("li",[t._v("This entry could be split into three mapping assertions")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("p",[t._v("Let us now add the other mapping assertions by clicking on "),a("em",[t._v("create")]),t._v(":")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic"}},[t._v("#")]),t._v(" Mapping uni1-academic")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FacultyMember")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-course"}},[t._v("#")]),t._v(" Mapping uni1-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("title"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-teaching"}},[t._v("#")]),t._v(" Mapping uni1-teaching")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("teaches")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"teaching"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-registration"}},[t._v("#")]),t._v(" Mapping uni1-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course-registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-fullprofessor"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-fullprofessor"}},[t._v("#")]),t._v(" Mapping uni1-fullProfessor")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"position"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("Then proceed in a similar way for the other positions (associate professor, assistant professor, external teacher, postdoc).")]),t._v(" "),a("h3",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("ol",[a("li",[t._v("Run Protégé and go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop SPARQL")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Select Ontop in the "),a("em",[t._v("Reasoner")]),t._v(" menu")]),t._v(" "),a("li",[t._v("Start the reasoner")]),t._v(" "),a("li",[t._v("Add a query in the "),a("em",[t._v("Query Manager")]),t._v(" and run the following query in "),a("em",[t._v("SPARQL query editor")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Tip: do a right click on the SPARQL query field to visualize the generated SQL query.")]),t._v(" "),a("h3",{attrs:{id:"inference"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#inference"}},[t._v("#")]),t._v(" Inference")]),t._v(" "),a("p",[t._v("Ontop embeds some inference capabilities and is thus capable of answering a query like the following:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Teacher")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("These inference capabilities can be, for a large part, understood as the ability to infer new mappings\nfrom the original mappings and the ontological axioms (e.g. Professor is a sub-class of Teacher). We will discuss it "),a("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("later in this tutorial")]),t._v(".")],1)])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[74],{452:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"first-data-source-university-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#first-data-source-university-1"}},[t._v("#")]),t._v(" First data source: university 1")]),t._v(" "),a("p",[t._v("As a first step, we focus on the database of a first university. It has\nthe schema "),a("em",[t._v("uni1")]),t._v(".\nIt is composed of 5 tables.")]),t._v(" "),a("h4",{attrs:{id:"uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-student"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.student")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.student")]),t._v(" contains the local ID, first and last names of the students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("s_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Mary")]),t._v(" "),a("td",[t._v("Smith")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("John")]),t._v(" "),a("td",[t._v("Doe")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("s_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-academic"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.academic")])]),t._v(" "),a("p",[t._v("Similarly, the table "),a("em",[t._v("uni1.academic")]),t._v(" contains the local ID,\nfirst and last names of the academic staff, but also information about their position.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("a_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")]),t._v(" "),a("th",[t._v("position")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Anna")]),t._v(" "),a("td",[t._v("Chambers")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Edward")]),t._v(" "),a("td",[t._v("May")]),t._v(" "),a("td",[t._v("9")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Rachel")]),t._v(" "),a("td",[t._v("Ward")]),t._v(" "),a("td",[t._v("8")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("position")]),t._v(" is populated with magic numbers:")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Full Professor")]),t._v(" "),a("li",[t._v("2 -> Associate Professor")]),t._v(" "),a("li",[t._v("3 -> Assistant Professor")]),t._v(" "),a("li",[t._v("8 -> External Teacher")]),t._v(" "),a("li",[t._v("9 -> PostDoc")])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("a_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course")]),t._v(" contains the local ID\nand the title of the courses.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("title")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("Linear Algebra")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("c_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-teaching"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.teaching")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.teaching")]),t._v(" contains the n-n relation\nbetween courses and teachers.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("a_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.academic")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"uni1-course-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course-registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course-registration")]),t._v(" contains the n-n relation\nbetween courses and students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("s_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.student")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"ontology-classes-and-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology-classes-and-properties"}},[t._v("#")]),t._v(" Ontology: classes and properties")]),t._v(" "),a("ol",[a("li",[t._v("Download "),a("a",{attrs:{href:"university.ttl"}},[t._v("this OWL ontology file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.obda"}},[t._v("this mapping file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.properties"}},[t._v("this properties file")]),t._v(".")]),t._v(" "),a("li",[t._v("In Protégé, go to "),a("em",[t._v("File/Open...")]),t._v(" to load the ontology file (be sure you have all three files in the same folder).")]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Classes")]),t._v(" you can visualize the class hierarchy\n"),a("figure",[a("img",{attrs:{src:"ontology_classes.png",width:"303px"}})])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Object properties")]),t._v(" you can see the properties "),a("em",[t._v("attends")]),t._v(", "),a("em",[t._v("isGivenAt")]),t._v(", "),a("em",[t._v("isSupervisedBy")]),t._v(", "),a("em",[t._v("isTaughtBy")]),t._v(" and "),a("em",[t._v("teaches")]),t._v(" (with its two sub-properties "),a("em",[t._v("givesLab")]),t._v(" and "),a("em",[t._v("givesLecture")]),t._v(").\n"),a("figure",[a("span",[a("img",{attrs:{src:"ontology_object_properties.png",width:"208px"}})])])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Data properties")]),t._v(" you can see the properties "),a("em",[t._v("firstName")]),t._v(", "),a("em",[t._v("lastName")]),t._v(" and "),a("em",[t._v("title")]),t._v(".\n"),a("figure",[a("img",{attrs:{src:"ontology_data_properties.png",width:"197px"}})])])]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("ol",[a("li",[t._v("Go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop mapping")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Test the already defined connection configuration using the "),a("em",[t._v("Test Connection")]),t._v(" button")]),t._v(" "),a("li",[t._v("Switch to the "),a("em",[t._v("Mapping Manager")]),t._v(" tab in the ontop mappings tab")]),t._v(" "),a("li",[t._v("You should see a first mapping assertion called "),a("em",[t._v("uni1-student")])]),t._v(" "),a("li",[t._v("Double-click on it to observe it and then close this pop-up window.")])]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student"}},[t._v("#")]),t._v(" Mapping uni1-student")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"student"')]),t._v("\n")])])]),a("p",[t._v("Some remarks:")]),t._v(" "),a("ul",[a("li",[t._v("The target part is described using a "),a("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/TurtleSyntax",target:"_blank",rel:"noopener"}},[t._v("Turtle-like syntax"),a("OutboundLink")],1),t._v(" while the source part is a regular SQL query.")]),t._v(" "),a("li",[t._v("We used the primary key "),a("code",[t._v("s_id")]),t._v(" to create the IRI. "),a("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("As we will see later")]),t._v(",\nthis practice enables Ontop to remove self-joins, which is very important for optimizing\nthe query performance.")],1),t._v(" "),a("li",[t._v("This entry could be split into three mapping assertions")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("p",[t._v("Let us now add the other mapping assertions by clicking on "),a("em",[t._v("create")]),t._v(":")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic"}},[t._v("#")]),t._v(" Mapping uni1-academic")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FacultyMember")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-course"}},[t._v("#")]),t._v(" Mapping uni1-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("title"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-teaching"}},[t._v("#")]),t._v(" Mapping uni1-teaching")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("teaches")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"teaching"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-registration"}},[t._v("#")]),t._v(" Mapping uni1-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course-registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-fullprofessor"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-fullprofessor"}},[t._v("#")]),t._v(" Mapping uni1-fullProfessor")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"position"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("Then proceed in a similar way for the other positions (associate professor, assistant professor, external teacher, postdoc).")]),t._v(" "),a("h3",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("ol",[a("li",[t._v("Run Protégé and go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop SPARQL")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Select Ontop in the "),a("em",[t._v("Reasoner")]),t._v(" menu")]),t._v(" "),a("li",[t._v("Start the reasoner")]),t._v(" "),a("li",[t._v("Add a query in the "),a("em",[t._v("Query Manager")]),t._v(" and run the following query in "),a("em",[t._v("SPARQL query editor")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Tip: do a right click on the SPARQL query field to visualize the generated SQL query.")]),t._v(" "),a("h3",{attrs:{id:"inference"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#inference"}},[t._v("#")]),t._v(" Inference")]),t._v(" "),a("p",[t._v("Ontop embeds some inference capabilities and is thus capable of answering a query like the following:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Teacher")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("These inference capabilities can be, for a large part, understood as the ability to infer new mappings\nfrom the original mappings and the ontological axioms (e.g. Professor is a sub-class of Teacher). We will discuss it "),a("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("later in this tutorial")]),t._v(".")],1)])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/75.5f9e9c52.js b/assets/js/75.480169f5.js similarity index 99% rename from assets/js/75.5f9e9c52.js rename to assets/js/75.480169f5.js index 473504c10..0c2510d0e 100644 --- a/assets/js/75.5f9e9c52.js +++ b/assets/js/75.480169f5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[75],{452:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"second-data-source-university-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#second-data-source-university-2"}},[t._v("#")]),t._v(" Second data source: university 2")]),t._v(" "),a("p",[t._v("We now consider the database of another university. It has a different schema,\ncomposed of three tables:")]),t._v(" "),a("h4",{attrs:{id:"uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-person"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.person")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.person")]),t._v(" describes the students and the academic staff of the university.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("fname")]),t._v(" "),a("th",[t._v("lname")]),t._v(" "),a("th",[t._v("status")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Zak")]),t._v(" "),a("td",[t._v("Lane")]),t._v(" "),a("td",[t._v("8")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Mattie")]),t._v(" "),a("td",[t._v("Moses")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Céline")]),t._v(" "),a("td",[t._v("Mendez")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("status")]),t._v(" is populated with magic numbers (they differ from the ones of the first university):")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Undergraduate Student")]),t._v(" "),a("li",[t._v("2 -> Graduate Student")]),t._v(" "),a("li",[t._v("3 -> PostDoc")]),t._v(" "),a("li",[t._v("7 -> Full Professor")]),t._v(" "),a("li",[t._v("8 -> Associate Professor")]),t._v(" "),a("li",[t._v("9 -> Assistant Professor")])]),t._v(" "),a("p",[t._v("As you can see, undergraduate and graduate students are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.course")]),t._v(" contains information\nabout courses, their topic, their lecturer and their lab teacher.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("cid")]),t._v(" "),a("th",[t._v("lecturer")]),t._v(" "),a("th",[t._v("lab_teacher")]),t._v(" "),a("th",[t._v("topic")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Information security")])])])]),t._v(" "),a("p",[a("code",[t._v("cid")]),t._v(" is a primary key.\nNote that in this data source, there are at most two teachers per course. Lecturers and lab teachers are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.registration")]),t._v(" contains the n-n relation\nbetween courses and attendees.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("cid")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("1")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni2.course")]),t._v(" and "),a("em",[t._v("uni2.person")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"new-mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-mappings"}},[t._v("#")]),t._v(" New mappings")]),t._v(" "),a("p",[t._v("Let us add the following mapping assertions together with the previous one.")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person"}},[t._v("#")]),t._v(" Mapping uni2.person")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Person")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("fname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-course"}},[t._v("#")]),t._v(" Mapping uni2-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("topic"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lecturer"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lecturer"}},[t._v("#")]),t._v(" Mapping uni2-lecturer")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lecturer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLecture")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lab-teacher"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lab-teacher"}},[t._v("#")]),t._v(" Mapping uni2-lab-teacher")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lab_teacher"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLab")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-registration"}},[t._v("#")]),t._v(" Mapping uni2-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-undergraduate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-undergraduate"}},[t._v("#")]),t._v(" Mapping uni2-undergraduate")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("UndergraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"status"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("And so on for the graduate students, postdocs, full professors, associate professors and assistant professors.")]),t._v(" "),a("h2",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("p",[t._v("We can now run the previous SPARQL queries and observe that the results combine\nentries from the two datasets.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[75],{451:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"second-data-source-university-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#second-data-source-university-2"}},[t._v("#")]),t._v(" Second data source: university 2")]),t._v(" "),a("p",[t._v("We now consider the database of another university. It has a different schema,\ncomposed of three tables:")]),t._v(" "),a("h4",{attrs:{id:"uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-person"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.person")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.person")]),t._v(" describes the students and the academic staff of the university.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("fname")]),t._v(" "),a("th",[t._v("lname")]),t._v(" "),a("th",[t._v("status")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Zak")]),t._v(" "),a("td",[t._v("Lane")]),t._v(" "),a("td",[t._v("8")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Mattie")]),t._v(" "),a("td",[t._v("Moses")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Céline")]),t._v(" "),a("td",[t._v("Mendez")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("status")]),t._v(" is populated with magic numbers (they differ from the ones of the first university):")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Undergraduate Student")]),t._v(" "),a("li",[t._v("2 -> Graduate Student")]),t._v(" "),a("li",[t._v("3 -> PostDoc")]),t._v(" "),a("li",[t._v("7 -> Full Professor")]),t._v(" "),a("li",[t._v("8 -> Associate Professor")]),t._v(" "),a("li",[t._v("9 -> Assistant Professor")])]),t._v(" "),a("p",[t._v("As you can see, undergraduate and graduate students are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.course")]),t._v(" contains information\nabout courses, their topic, their lecturer and their lab teacher.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("cid")]),t._v(" "),a("th",[t._v("lecturer")]),t._v(" "),a("th",[t._v("lab_teacher")]),t._v(" "),a("th",[t._v("topic")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Information security")])])])]),t._v(" "),a("p",[a("code",[t._v("cid")]),t._v(" is a primary key.\nNote that in this data source, there are at most two teachers per course. Lecturers and lab teachers are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.registration")]),t._v(" contains the n-n relation\nbetween courses and attendees.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("cid")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("1")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni2.course")]),t._v(" and "),a("em",[t._v("uni2.person")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"new-mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-mappings"}},[t._v("#")]),t._v(" New mappings")]),t._v(" "),a("p",[t._v("Let us add the following mapping assertions together with the previous one.")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person"}},[t._v("#")]),t._v(" Mapping uni2.person")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Person")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("fname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-course"}},[t._v("#")]),t._v(" Mapping uni2-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("topic"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lecturer"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lecturer"}},[t._v("#")]),t._v(" Mapping uni2-lecturer")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lecturer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLecture")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lab-teacher"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lab-teacher"}},[t._v("#")]),t._v(" Mapping uni2-lab-teacher")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lab_teacher"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLab")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-registration"}},[t._v("#")]),t._v(" Mapping uni2-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-undergraduate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-undergraduate"}},[t._v("#")]),t._v(" Mapping uni2-undergraduate")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("UndergraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"status"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("And so on for the graduate students, postdocs, full professors, associate professors and assistant professors.")]),t._v(" "),a("h2",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("p",[t._v("We can now run the previous SPARQL queries and observe that the results combine\nentries from the two datasets.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/78.6102aa0a.js b/assets/js/78.8c0cdac5.js similarity index 99% rename from assets/js/78.6102aa0a.js rename to assets/js/78.8c0cdac5.js index 8eb247eb2..d93d69437 100644 --- a/assets/js/78.6102aa0a.js +++ b/assets/js/78.8c0cdac5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{456:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"setting-up-an-ontop-sparql-endpoint-with-docker"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-an-ontop-sparql-endpoint-with-docker"}},[t._v("#")]),t._v(" Setting up an Ontop SPARQL endpoint with Docker")]),t._v(" "),n("h2",{attrs:{id:"how-to-use-this-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use-this-image"}},[t._v("#")]),t._v(" How to use this image")]),t._v(" "),n("p",[t._v("The Docker image "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("ontop/ontop"),n("OutboundLink")],1),t._v(" is for fast setting up an Ontop SPARQL endpoint.\nOne can either use this image directly, or create a dedicated image based on this image.")]),t._v(" "),n("ol",[n("li",[t._v("Go to the "),n("code",[t._v("endpoint/")]),t._v(" directory. Alternatively, if you don't have already the tutorial files, you can download "),n("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("this OWL ontology file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.obda"}},[t._v("this mapping file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.properties"}},[t._v("this properties file")]),t._v(" and paste them in "),n("code",[t._v("input/")]),t._v(".")]),t._v(" "),n("li",[t._v("Make sure to have the "),n("code",[t._v("jdbc/")]),t._v(" directory and the JDBC driver inside.")])]),t._v(" "),n("p",[t._v("In addition, we need the "),n("a",{attrs:{href:"../h2.zip"}},[t._v("h2 database")]),t._v(" as usual. Assume the h2 database is already running.")]),t._v(" "),n("p",[n("strong",[t._v("NB")]),t._v(": Linux users have to modify the property "),n("code",[t._v("jdbc.url")]),t._v(" in "),n("a",{attrs:{href:"input/university-complete.docker.properties"}},[n("code",[t._v("input/university-complete.docker.properties")])]),t._v(". Replace "),n("code",[t._v("host.docker.internal")]),t._v(" with the IP address of your machine (you can see it running the "),n("code",[t._v("ifconfig")]),t._v(" command).")]),t._v(" "),n("h3",{attrs:{id:"use-ontop-ontop-directly"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-ontop-ontop-directly"}},[t._v("#")]),t._v(" Use "),n("code",[t._v("ontop/ontop")]),t._v(" directly")]),t._v(" "),n("p",[t._v("We can start an Ontop SPARQL endpoint by using the "),n("code",[t._v("ontop/ontop")]),t._v(" image directly.\nOn Linux/Mac:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm \\\n -v $PWD/input:/opt/ontop/input \\\n -v $PWD/jdbc:/opt/ontop/jdbc \\\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl \\\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda \\\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties \\\n -p 8080:8080 \\\n ontop/ontop\n")])])]),n("p",[t._v("On Windows:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm ^\n -v %CD%/input:/opt/ontop/input ^\n -v %CD%/jdbc:/opt/ontop/jdbc ^\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl ^\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda ^\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties ^\n -p 8080:8080 ^\n ontop/ontop\n")])])]),n("p",[t._v("Now we can open "),n("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),n("OutboundLink")],1),t._v(" to test SPARQL queries.")]),t._v(" "),n("h3",{attrs:{id:"create-a-dedicated-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#create-a-dedicated-image"}},[t._v("#")]),t._v(" Create a dedicated image")]),t._v(" "),n("p",[t._v("In case we want to deploy a self-contained image, we can write a complete "),n("a",{attrs:{href:"Dockerfile"}},[n("code",[t._v("Dockerfile")])]),t._v(":")]),t._v(" "),n("div",{staticClass:"language-dockerfile extra-class"},[n("pre",{pre:!0,attrs:{class:"language-dockerfile"}},[n("code",[n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" ontop/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WORKDIR")]),t._v(" /opt/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" input/university-complete.ttl input/university-complete.obda input/university-complete.docker.properties input/ ")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" jdbc/h2-1.4.196.jar jdbc/")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("EXPOSE")]),t._v(" 8080")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ENTRYPOINT")]),t._v(" java -cp ./lib/*:./jdbc/* -Dlogback.configurationFile=file:./log/logback.xml "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n it.unibz.inf.ontop.cli.Ontop endpoint "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --ontology=input/university-complete.ttl "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --mapping=input/university-complete.obda "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --properties=input/university-complete.docker.properties "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --cors-allowed-origins=http://yasgui.org "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --lazy # if needed")]),t._v("\n")])])]),n("p",[t._v("Then, run the commands to build and run the Docker image:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker build -t my-ontop-endpoint .\n$ docker run -it --rm --name my-running-ontop-endpoint -p 8080:8080 my-ontop-endpoint\n")])])]),n("h3",{attrs:{id:"use-docker-compose"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-docker-compose"}},[t._v("#")]),t._v(" Use Docker-compose")]),t._v(" "),n("p",[t._v("Docker-compose allows setting up a number of containers together.\nFor example, the following "),n("a",{attrs:{href:"docker-compose.yml"}},[n("code",[t._v("docker-compose.yml")])]),t._v(" file creates a cluster consisting of an H2 database ("),n("code",[t._v("db")]),t._v(") and an Ontop SPARQL endpoint ("),n("code",[t._v("ontop")]),t._v(").")]),t._v(" "),n("div",{staticClass:"language-yaml extra-class"},[n("pre",{pre:!0,attrs:{class:"language-yaml"}},[n("code",[n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("version")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'3.4'")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("services")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("db")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" openjdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("8"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("jdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("alpine\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./h2"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/h2\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("command")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"java"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-cp"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/opt/h2/bin/h2-1.4.196.jar"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"org.h2.tools.Server"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-tcpAllowOthers"')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8082:8082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"9082:9082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ontop")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ontop/ontop\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("environment")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_ONTOLOGY_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.ttl\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_MAPPING_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.obda\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PROPERTIES_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.compose.properties\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PORTAL_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.portal.toml\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_CORS_ALLOWED_ORIGINS")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_DEV_MODE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_LAZY_INIT")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./input"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/input\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./jdbc"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/jdbc\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8080:8080"')]),t._v("\n")])])]),n("p",[t._v("Now we can simply start it:")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker-compose up\n")])])]),n("p",[t._v("It exposes the following two ports for the browser:")]),t._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"http://localhost:8082",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8082"),n("OutboundLink")],1),t._v(" H2 Web Console")]),t._v(" "),n("li",[n("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080"),n("OutboundLink")],1),t._v(" Ontop SPARQL endpoint")])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{455:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"setting-up-an-ontop-sparql-endpoint-with-docker"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-an-ontop-sparql-endpoint-with-docker"}},[t._v("#")]),t._v(" Setting up an Ontop SPARQL endpoint with Docker")]),t._v(" "),n("h2",{attrs:{id:"how-to-use-this-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use-this-image"}},[t._v("#")]),t._v(" How to use this image")]),t._v(" "),n("p",[t._v("The Docker image "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("ontop/ontop"),n("OutboundLink")],1),t._v(" is for fast setting up an Ontop SPARQL endpoint.\nOne can either use this image directly, or create a dedicated image based on this image.")]),t._v(" "),n("ol",[n("li",[t._v("Go to the "),n("code",[t._v("endpoint/")]),t._v(" directory. Alternatively, if you don't have already the tutorial files, you can download "),n("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("this OWL ontology file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.obda"}},[t._v("this mapping file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.properties"}},[t._v("this properties file")]),t._v(" and paste them in "),n("code",[t._v("input/")]),t._v(".")]),t._v(" "),n("li",[t._v("Make sure to have the "),n("code",[t._v("jdbc/")]),t._v(" directory and the JDBC driver inside.")])]),t._v(" "),n("p",[t._v("In addition, we need the "),n("a",{attrs:{href:"../h2.zip"}},[t._v("h2 database")]),t._v(" as usual. Assume the h2 database is already running.")]),t._v(" "),n("p",[n("strong",[t._v("NB")]),t._v(": Linux users have to modify the property "),n("code",[t._v("jdbc.url")]),t._v(" in "),n("a",{attrs:{href:"input/university-complete.docker.properties"}},[n("code",[t._v("input/university-complete.docker.properties")])]),t._v(". Replace "),n("code",[t._v("host.docker.internal")]),t._v(" with the IP address of your machine (you can see it running the "),n("code",[t._v("ifconfig")]),t._v(" command).")]),t._v(" "),n("h3",{attrs:{id:"use-ontop-ontop-directly"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-ontop-ontop-directly"}},[t._v("#")]),t._v(" Use "),n("code",[t._v("ontop/ontop")]),t._v(" directly")]),t._v(" "),n("p",[t._v("We can start an Ontop SPARQL endpoint by using the "),n("code",[t._v("ontop/ontop")]),t._v(" image directly.\nOn Linux/Mac:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm \\\n -v $PWD/input:/opt/ontop/input \\\n -v $PWD/jdbc:/opt/ontop/jdbc \\\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl \\\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda \\\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties \\\n -p 8080:8080 \\\n ontop/ontop\n")])])]),n("p",[t._v("On Windows:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm ^\n -v %CD%/input:/opt/ontop/input ^\n -v %CD%/jdbc:/opt/ontop/jdbc ^\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl ^\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda ^\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties ^\n -p 8080:8080 ^\n ontop/ontop\n")])])]),n("p",[t._v("Now we can open "),n("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),n("OutboundLink")],1),t._v(" to test SPARQL queries.")]),t._v(" "),n("h3",{attrs:{id:"create-a-dedicated-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#create-a-dedicated-image"}},[t._v("#")]),t._v(" Create a dedicated image")]),t._v(" "),n("p",[t._v("In case we want to deploy a self-contained image, we can write a complete "),n("a",{attrs:{href:"Dockerfile"}},[n("code",[t._v("Dockerfile")])]),t._v(":")]),t._v(" "),n("div",{staticClass:"language-dockerfile extra-class"},[n("pre",{pre:!0,attrs:{class:"language-dockerfile"}},[n("code",[n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" ontop/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WORKDIR")]),t._v(" /opt/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" input/university-complete.ttl input/university-complete.obda input/university-complete.docker.properties input/ ")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" jdbc/h2-1.4.196.jar jdbc/")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("EXPOSE")]),t._v(" 8080")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ENTRYPOINT")]),t._v(" java -cp ./lib/*:./jdbc/* -Dlogback.configurationFile=file:./log/logback.xml "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n it.unibz.inf.ontop.cli.Ontop endpoint "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --ontology=input/university-complete.ttl "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --mapping=input/university-complete.obda "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --properties=input/university-complete.docker.properties "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --cors-allowed-origins=http://yasgui.org "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --lazy # if needed")]),t._v("\n")])])]),n("p",[t._v("Then, run the commands to build and run the Docker image:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker build -t my-ontop-endpoint .\n$ docker run -it --rm --name my-running-ontop-endpoint -p 8080:8080 my-ontop-endpoint\n")])])]),n("h3",{attrs:{id:"use-docker-compose"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-docker-compose"}},[t._v("#")]),t._v(" Use Docker-compose")]),t._v(" "),n("p",[t._v("Docker-compose allows setting up a number of containers together.\nFor example, the following "),n("a",{attrs:{href:"docker-compose.yml"}},[n("code",[t._v("docker-compose.yml")])]),t._v(" file creates a cluster consisting of an H2 database ("),n("code",[t._v("db")]),t._v(") and an Ontop SPARQL endpoint ("),n("code",[t._v("ontop")]),t._v(").")]),t._v(" "),n("div",{staticClass:"language-yaml extra-class"},[n("pre",{pre:!0,attrs:{class:"language-yaml"}},[n("code",[n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("version")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'3.4'")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("services")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("db")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" openjdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("8"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("jdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("alpine\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./h2"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/h2\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("command")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"java"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-cp"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/opt/h2/bin/h2-1.4.196.jar"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"org.h2.tools.Server"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-tcpAllowOthers"')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8082:8082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"9082:9082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ontop")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ontop/ontop\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("environment")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_ONTOLOGY_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.ttl\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_MAPPING_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.obda\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PROPERTIES_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.compose.properties\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PORTAL_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.portal.toml\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_CORS_ALLOWED_ORIGINS")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_DEV_MODE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_LAZY_INIT")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./input"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/input\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./jdbc"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/jdbc\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8080:8080"')]),t._v("\n")])])]),n("p",[t._v("Now we can simply start it:")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker-compose up\n")])])]),n("p",[t._v("It exposes the following two ports for the browser:")]),t._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"http://localhost:8082",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8082"),n("OutboundLink")],1),t._v(" H2 Web Console")]),t._v(" "),n("li",[n("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080"),n("OutboundLink")],1),t._v(" Ontop SPARQL endpoint")])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/79.367b0f4a.js b/assets/js/79.28837695.js similarity index 99% rename from assets/js/79.367b0f4a.js rename to assets/js/79.28837695.js index 592d586f5..344572e61 100644 --- a/assets/js/79.367b0f4a.js +++ b/assets/js/79.28837695.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[79],{455:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[t._v("#")]),t._v(" SPARQL endpoint deployment using Ontop Tomcat/RDF4J bundle")]),t._v(" "),a("h2",{attrs:{id:"apache-tomcat-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#apache-tomcat-setup"}},[t._v("#")]),t._v(" Apache Tomcat setup")]),t._v(" "),a("p",[t._v("Procedure:")]),t._v(" "),a("ol",[a("li",[t._v("Download and unzip the Tomcat bundle "),a("code",[t._v("ontop-tomcat-bundle-[version].zip")]),t._v(" from "),a("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Copy the driver file of H2 "),a("a",{attrs:{href:"jdbc/h2-1.4.196.jar"}},[a("code",[t._v("jdbc/h2-1.4.196.jar")])]),t._v(" to the "),a("code",[t._v("lib")]),t._v(" directory of tomcat")])]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Start tomcat from the "),a("em",[a("code",[t._v("bin")]),t._v(" folder")]),t._v(" using the commands:\n"),a("ul",[a("li",[t._v("On Mac/Linux: using the terminal run "),a("code",[t._v("sh catalina.sh run")]),t._v(".")]),t._v(" "),a("li",[t._v("On Windows: click on the executable "),a("code",[t._v("startup.bat")]),t._v(".")])])]),t._v(" "),a("li",[t._v("Connect to RDF4J Workbench at http://localhost:8080/rdf4j-workbench/ .")]),t._v(" "),a("li",[t._v("You will be automatically redirected to the repositories view .")])]),t._v(" "),a("h2",{attrs:{id:"setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[t._v("#")]),t._v(" Setting up a Ontop Virtual RDF Repository using the RDF4J Workbench")]),t._v(" "),a("ol",[a("li",[a("p",[t._v("The files needed are under the input directory:")]),t._v(" "),a("ul",[a("li",[t._v("the OWL ontology file "),a("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("input/university-complete.ttl")])]),t._v(" "),a("li",[t._v("the mapping file "),a("a",{attrs:{href:"input/university-complete.obda"}},[t._v("input/university-complete.obda")])]),t._v(" "),a("li",[t._v("the properties file "),a("a",{attrs:{href:"input/university-complete.properties"}},[t._v("input/university-complete.properties")])])])]),t._v(" "),a("li",[a("p",[t._v("Click on "),a("em",[t._v("New repository")])])])]),t._v(" "),a("ul",[a("li",[t._v("Select "),a("em",[t._v("Ontop Virtual RDF Store")]),t._v(" from the list.")]),t._v(" "),a("li",[t._v("Give an ID to your new repository (ex: "),a("code",[t._v("Session1Repo")]),t._v(")")]),t._v(" "),a("li",[t._v("Give optionally also a descriptive title (ex: Universities Repository)")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Next")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("On the next page:")])]),t._v(" "),a("ul",[a("li",[t._v("Type in the path of the ontology file "),a("em",[t._v("university-complete.ttl")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-tutorial/endpoint/input/university-complete.ttl")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the obda file "),a("em",[t._v("university-complete.obda")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.obda")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the properties file "),a("em",[t._v("university-complete.properties")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.properties")]),t._v(")")]),t._v(" "),a("li",[t._v("Keep the default options.")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Create")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"6"}},[a("li",[t._v("The "),a("em",[t._v("Summary")]),t._v(" page contains your newly created repository's SPARQL endpoint URL (as Location).")])]),t._v(" "),a("h2",{attrs:{id:"querying"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying"}},[t._v("#")]),t._v(" Querying")]),t._v(" "),a("ol",[a("li",[t._v("We can query the newly created repository by clicking on the "),a("em",[t._v("Query")]),t._v(" submenu .")]),t._v(" "),a("li",[t._v("Run the following query clicking on "),a("em",[t._v("Execute")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"querying-the-sparql-endpoint-with-curl"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying-the-sparql-endpoint-with-curl"}},[t._v("#")]),t._v(" Querying the SPARQL endpoint with curl")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("curl -H 'Accept: application/json' \\\n-G http://localhost:8080/rdf4j-server/repositories/Session1Repo \\\n--data-urlencode query='\nPREFIX : \nPREFIX foaf: \n\nSELECT DISTINCT ?prof ?lastName {\n ?prof a :FullProfessor ; foaf:lastName ?lastName .\n}\n'\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[79],{456:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[t._v("#")]),t._v(" SPARQL endpoint deployment using Ontop Tomcat/RDF4J bundle")]),t._v(" "),a("h2",{attrs:{id:"apache-tomcat-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#apache-tomcat-setup"}},[t._v("#")]),t._v(" Apache Tomcat setup")]),t._v(" "),a("p",[t._v("Procedure:")]),t._v(" "),a("ol",[a("li",[t._v("Download and unzip the Tomcat bundle "),a("code",[t._v("ontop-tomcat-bundle-[version].zip")]),t._v(" from "),a("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Copy the driver file of H2 "),a("a",{attrs:{href:"jdbc/h2-1.4.196.jar"}},[a("code",[t._v("jdbc/h2-1.4.196.jar")])]),t._v(" to the "),a("code",[t._v("lib")]),t._v(" directory of tomcat")])]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Start tomcat from the "),a("em",[a("code",[t._v("bin")]),t._v(" folder")]),t._v(" using the commands:\n"),a("ul",[a("li",[t._v("On Mac/Linux: using the terminal run "),a("code",[t._v("sh catalina.sh run")]),t._v(".")]),t._v(" "),a("li",[t._v("On Windows: click on the executable "),a("code",[t._v("startup.bat")]),t._v(".")])])]),t._v(" "),a("li",[t._v("Connect to RDF4J Workbench at http://localhost:8080/rdf4j-workbench/ .")]),t._v(" "),a("li",[t._v("You will be automatically redirected to the repositories view .")])]),t._v(" "),a("h2",{attrs:{id:"setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[t._v("#")]),t._v(" Setting up a Ontop Virtual RDF Repository using the RDF4J Workbench")]),t._v(" "),a("ol",[a("li",[a("p",[t._v("The files needed are under the input directory:")]),t._v(" "),a("ul",[a("li",[t._v("the OWL ontology file "),a("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("input/university-complete.ttl")])]),t._v(" "),a("li",[t._v("the mapping file "),a("a",{attrs:{href:"input/university-complete.obda"}},[t._v("input/university-complete.obda")])]),t._v(" "),a("li",[t._v("the properties file "),a("a",{attrs:{href:"input/university-complete.properties"}},[t._v("input/university-complete.properties")])])])]),t._v(" "),a("li",[a("p",[t._v("Click on "),a("em",[t._v("New repository")])])])]),t._v(" "),a("ul",[a("li",[t._v("Select "),a("em",[t._v("Ontop Virtual RDF Store")]),t._v(" from the list.")]),t._v(" "),a("li",[t._v("Give an ID to your new repository (ex: "),a("code",[t._v("Session1Repo")]),t._v(")")]),t._v(" "),a("li",[t._v("Give optionally also a descriptive title (ex: Universities Repository)")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Next")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("On the next page:")])]),t._v(" "),a("ul",[a("li",[t._v("Type in the path of the ontology file "),a("em",[t._v("university-complete.ttl")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-tutorial/endpoint/input/university-complete.ttl")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the obda file "),a("em",[t._v("university-complete.obda")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.obda")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the properties file "),a("em",[t._v("university-complete.properties")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.properties")]),t._v(")")]),t._v(" "),a("li",[t._v("Keep the default options.")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Create")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"6"}},[a("li",[t._v("The "),a("em",[t._v("Summary")]),t._v(" page contains your newly created repository's SPARQL endpoint URL (as Location).")])]),t._v(" "),a("h2",{attrs:{id:"querying"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying"}},[t._v("#")]),t._v(" Querying")]),t._v(" "),a("ol",[a("li",[t._v("We can query the newly created repository by clicking on the "),a("em",[t._v("Query")]),t._v(" submenu .")]),t._v(" "),a("li",[t._v("Run the following query clicking on "),a("em",[t._v("Execute")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"querying-the-sparql-endpoint-with-curl"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying-the-sparql-endpoint-with-curl"}},[t._v("#")]),t._v(" Querying the SPARQL endpoint with curl")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("curl -H 'Accept: application/json' \\\n-G http://localhost:8080/rdf4j-server/repositories/Session1Repo \\\n--data-urlencode query='\nPREFIX : \nPREFIX foaf: \n\nSELECT DISTINCT ?prof ?lastName {\n ?prof a :FullProfessor ; foaf:lastName ?lastName .\n}\n'\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/82.110d224d.js b/assets/js/82.e284c69b.js similarity index 99% rename from assets/js/82.110d224d.js rename to assets/js/82.e284c69b.js index 547756a67..2670539d8 100644 --- a/assets/js/82.110d224d.js +++ b/assets/js/82.e284c69b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{459:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"ontop-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-denodo"}},[t._v("#")]),t._v(" Ontop with Denodo")]),t._v(" "),a("p",[t._v("NB: You might also consult the following presentation, which shows screenshots for\nsome of the steps described below:"),a("br"),t._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf",target:"_blank",rel:"noopener"}},[t._v("https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"_1-set-up-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-set-up-denodo"}},[t._v("#")]),t._v(" 1. Set up Denodo.")]),t._v(" "),a("h4",{attrs:{id:"download-denodo-express"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#download-denodo-express"}},[t._v("#")]),t._v(" Download Denodo Express")]),t._v(" "),a("p",[t._v("Download it from "),a("a",{attrs:{href:"https://www.denodo.com/en/denodo-platform/denodo-express",target:"_blank",rel:"noopener"}},[t._v("https://www.denodo.com/en/denodo-platform/denodo-express"),a("OutboundLink")],1),a("br"),t._v("\n(register, download the platform and the licence file)")]),t._v(" "),a("p",[t._v("Unzip the file and run the installer.")]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("h4",{attrs:{id:"running-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#running-denodo"}},[t._v("#")]),t._v(" Running Denodo")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("/bin/denodoPlatform.sh\n")])])]),a("ul",[a("li",[t._v("Select the 'Virtual DataPort' tab")]),t._v(" "),a("li",[t._v("Start 'Virtual DataPort Server'")]),t._v(" "),a("li",[t._v("Press the 'Launch' button")]),t._v(" "),a("li",[t._v("Login with:"),a("br"),t._v("\n. Login: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Server: "),a("code",[t._v("//localhost:9999/admin")])])]),t._v(" "),a("h3",{attrs:{id:"_2-configure-datasets-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-configure-datasets-with-denodo"}},[t._v("#")]),t._v(" 2. Configure datasets with Denodo")]),t._v(" "),a("p",[t._v("NB: instead of doing the following step by step, you can also load "),a("a",{attrs:{href:"bzopendata.sql"}},[t._v("this SQL script")]),t._v(" directly within Denodo.")]),t._v(" "),a("h4",{attrs:{id:"create-a-database"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-a-database"}},[t._v("#")]),t._v(" Create a database")]),t._v(" "),a("p",[t._v("We will create two data sources based on web APIs."),a("br"),t._v("\nFirst, a Web API with weather data.")]),t._v(" "),a("ul",[a("li",[t._v("Administration -> Database Management -> New")]),t._v(" "),a("li",[t._v("Name the database "),a("code",[t._v("bzopendata")]),t._v(" for instance (leave the rest to default values), and click on the 'OK' button")]),t._v(" "),a("li",[t._v("In the left window, right-clik on the bzopendata database -> New -> Data Source -> JSON")]),t._v(" "),a("li",[t._v("In the field 'Name', enter "),a("code",[t._v("stations")])]),t._v(" "),a("li",[t._v("In the field 'Data route', select 'HTTP Client'")]),t._v(" "),a("li",[t._v("Click on the 'Configure' button to enter the URL of the source:"),a("br"),t._v(" "),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/stations",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/stations"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Click on 'OK', and then press the 'Save' button to save the data source")])]),t._v(" "),a("p",[t._v("Then add a second data source for sensor data, repeating all the operations above, but:")]),t._v(" "),a("ul",[a("li",[t._v("in the field 'Name', enter "),a("code",[t._v("sensors")]),t._v(",")]),t._v(" "),a("li",[t._v("use the URL:\n"),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/sensors",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/sensors"),a("OutboundLink")],1)])]),t._v(" "),a("h3",{attrs:{id:"_3-configure-the-datasources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-configure-the-datasources"}},[t._v("#")]),t._v(" 3. Configure the datasources")]),t._v(" "),a("p",[t._v("Select a data source, and click on 'Create base view'")]),t._v(" "),a("ul",[a("li",[t._v('for stations: use the default "tuple root" ('),a("code",[t._v("/JSONFile")]),t._v(")")]),t._v(" "),a("li",[t._v('for sensors: use the "tuple root": '),a("code",[t._v("/JSONFile/JSONArray")]),t._v(" (uncheck the checkbox 'JSON root')")])]),t._v(" "),a("p",[t._v("Click on 'Save'.")]),t._v(" "),a("p",[t._v("For stations, click on the 'Execution panel' button, and then the button 'Execute'")]),t._v(" "),a("p",[t._v("We get only one result --\x3e We need to flatten the data:")]),t._v(" "),a("ul",[a("li",[t._v("In the left window, right-click on {}stations -> New -> Flatten\n(to display the data sources, you may need to right-click on 'bzopendata' -> 'Refresh')")]),t._v(" "),a("li",[t._v("Right click on the row 'features' in the table -> 'Flatten array features'")])]),t._v(" "),a("p",[t._v("In addition, we want to project the subfields of the JSON object 'properties':")]),t._v(" "),a("ul",[a("li",[t._v("Select the 'Output' tab")]),t._v(" "),a("li",[t._v("Right-click on the row 'properties' in the table -> 'Project subfields of properties'")])]),t._v(" "),a("p",[t._v("Click on 'Save': this creates a new view 'f_stations'")]),t._v(" "),a("h3",{attrs:{id:"_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[t._v("#")]),t._v(" 4. Configure Ontop-protege to use a Denodo datasource")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("Install the Denodo JDBC driver:\nWithin Protege: File -> Preferences -> 'JDBC Drivers' tab -> Add"),a("br"),t._v("\n. Description: "),a("code",[t._v("Denodo")]),a("br"),t._v("\n. Class name: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")]),a("br"),t._v("\n. Driver File (jar): browse to "),a("code",[t._v("/tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar")])])]),t._v(" "),a("li",[a("p",[t._v("For the connection, in your Datasource manager, use:"),a("br"),t._v("\n. Connection url: "),a("code",[t._v("jdbc:vdb://localhost:9999/bzopendata")]),a("br"),t._v("\n. Database Username: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Database Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Driver class: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")])])])]),t._v(" "),a("h3",{attrs:{id:"_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[t._v("#")]),t._v(" 5. Create the ontology and mapping and and try some SPARQL queries")]),t._v(" "),a("p",[t._v("You can use directly the files we have prepared:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"bzweather.obda"}},[t._v("bzweather.obda")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.owl"}},[t._v("bzweather.owl")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.properties"}},[t._v("bzweather.properties")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.q"}},[t._v("bzweather.q")])])]),t._v(" "),a("h3",{attrs:{id:"_6-setup-a-sparql-endpoint-with-command-line-interface"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-setup-a-sparql-endpoint-with-command-line-interface"}},[t._v("#")]),t._v(" 6. Setup a SPARQL endpoint with Command Line Interface")]),t._v(" "),a("h4",{attrs:{id:"configure-ontop-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-ontop-cli"}},[t._v("#")]),t._v(" Configure Ontop CLI")]),t._v(" "),a("p",[t._v("Add the JDBC denodo driver for the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("cp /tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar\n/jdbc\n")])])]),a("p",[t._v("Run the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("ontop endpoint -t bzweather.owl -m bzweather.obda -p bzweather.properties --cors-allowed-origins='*'\n")])])]),a("h4",{attrs:{id:"access-the-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#access-the-sparql-endpoint"}},[t._v("#")]),t._v(" Access the SPARQL endpoint")]),t._v(" "),a("p",[t._v("Open "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Run an example SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.opengis.net/ont/geosparql#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.w3.org/ns/sosa/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/weather#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" *\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?station")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("WeatherStation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("asWKT")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wkt")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSensor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("longitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lon")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("latitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("madeObservation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSimpleResult")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wktLabel")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("resultTime")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?t")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("LIMIT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{460:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"ontop-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-denodo"}},[t._v("#")]),t._v(" Ontop with Denodo")]),t._v(" "),a("p",[t._v("NB: You might also consult the following presentation, which shows screenshots for\nsome of the steps described below:"),a("br"),t._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf",target:"_blank",rel:"noopener"}},[t._v("https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"_1-set-up-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-set-up-denodo"}},[t._v("#")]),t._v(" 1. Set up Denodo.")]),t._v(" "),a("h4",{attrs:{id:"download-denodo-express"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#download-denodo-express"}},[t._v("#")]),t._v(" Download Denodo Express")]),t._v(" "),a("p",[t._v("Download it from "),a("a",{attrs:{href:"https://www.denodo.com/en/denodo-platform/denodo-express",target:"_blank",rel:"noopener"}},[t._v("https://www.denodo.com/en/denodo-platform/denodo-express"),a("OutboundLink")],1),a("br"),t._v("\n(register, download the platform and the licence file)")]),t._v(" "),a("p",[t._v("Unzip the file and run the installer.")]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("h4",{attrs:{id:"running-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#running-denodo"}},[t._v("#")]),t._v(" Running Denodo")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("/bin/denodoPlatform.sh\n")])])]),a("ul",[a("li",[t._v("Select the 'Virtual DataPort' tab")]),t._v(" "),a("li",[t._v("Start 'Virtual DataPort Server'")]),t._v(" "),a("li",[t._v("Press the 'Launch' button")]),t._v(" "),a("li",[t._v("Login with:"),a("br"),t._v("\n. Login: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Server: "),a("code",[t._v("//localhost:9999/admin")])])]),t._v(" "),a("h3",{attrs:{id:"_2-configure-datasets-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-configure-datasets-with-denodo"}},[t._v("#")]),t._v(" 2. Configure datasets with Denodo")]),t._v(" "),a("p",[t._v("NB: instead of doing the following step by step, you can also load "),a("a",{attrs:{href:"bzopendata.sql"}},[t._v("this SQL script")]),t._v(" directly within Denodo.")]),t._v(" "),a("h4",{attrs:{id:"create-a-database"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-a-database"}},[t._v("#")]),t._v(" Create a database")]),t._v(" "),a("p",[t._v("We will create two data sources based on web APIs."),a("br"),t._v("\nFirst, a Web API with weather data.")]),t._v(" "),a("ul",[a("li",[t._v("Administration -> Database Management -> New")]),t._v(" "),a("li",[t._v("Name the database "),a("code",[t._v("bzopendata")]),t._v(" for instance (leave the rest to default values), and click on the 'OK' button")]),t._v(" "),a("li",[t._v("In the left window, right-clik on the bzopendata database -> New -> Data Source -> JSON")]),t._v(" "),a("li",[t._v("In the field 'Name', enter "),a("code",[t._v("stations")])]),t._v(" "),a("li",[t._v("In the field 'Data route', select 'HTTP Client'")]),t._v(" "),a("li",[t._v("Click on the 'Configure' button to enter the URL of the source:"),a("br"),t._v(" "),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/stations",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/stations"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Click on 'OK', and then press the 'Save' button to save the data source")])]),t._v(" "),a("p",[t._v("Then add a second data source for sensor data, repeating all the operations above, but:")]),t._v(" "),a("ul",[a("li",[t._v("in the field 'Name', enter "),a("code",[t._v("sensors")]),t._v(",")]),t._v(" "),a("li",[t._v("use the URL:\n"),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/sensors",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/sensors"),a("OutboundLink")],1)])]),t._v(" "),a("h3",{attrs:{id:"_3-configure-the-datasources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-configure-the-datasources"}},[t._v("#")]),t._v(" 3. Configure the datasources")]),t._v(" "),a("p",[t._v("Select a data source, and click on 'Create base view'")]),t._v(" "),a("ul",[a("li",[t._v('for stations: use the default "tuple root" ('),a("code",[t._v("/JSONFile")]),t._v(")")]),t._v(" "),a("li",[t._v('for sensors: use the "tuple root": '),a("code",[t._v("/JSONFile/JSONArray")]),t._v(" (uncheck the checkbox 'JSON root')")])]),t._v(" "),a("p",[t._v("Click on 'Save'.")]),t._v(" "),a("p",[t._v("For stations, click on the 'Execution panel' button, and then the button 'Execute'")]),t._v(" "),a("p",[t._v("We get only one result --\x3e We need to flatten the data:")]),t._v(" "),a("ul",[a("li",[t._v("In the left window, right-click on {}stations -> New -> Flatten\n(to display the data sources, you may need to right-click on 'bzopendata' -> 'Refresh')")]),t._v(" "),a("li",[t._v("Right click on the row 'features' in the table -> 'Flatten array features'")])]),t._v(" "),a("p",[t._v("In addition, we want to project the subfields of the JSON object 'properties':")]),t._v(" "),a("ul",[a("li",[t._v("Select the 'Output' tab")]),t._v(" "),a("li",[t._v("Right-click on the row 'properties' in the table -> 'Project subfields of properties'")])]),t._v(" "),a("p",[t._v("Click on 'Save': this creates a new view 'f_stations'")]),t._v(" "),a("h3",{attrs:{id:"_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[t._v("#")]),t._v(" 4. Configure Ontop-protege to use a Denodo datasource")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("Install the Denodo JDBC driver:\nWithin Protege: File -> Preferences -> 'JDBC Drivers' tab -> Add"),a("br"),t._v("\n. Description: "),a("code",[t._v("Denodo")]),a("br"),t._v("\n. Class name: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")]),a("br"),t._v("\n. Driver File (jar): browse to "),a("code",[t._v("/tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar")])])]),t._v(" "),a("li",[a("p",[t._v("For the connection, in your Datasource manager, use:"),a("br"),t._v("\n. Connection url: "),a("code",[t._v("jdbc:vdb://localhost:9999/bzopendata")]),a("br"),t._v("\n. Database Username: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Database Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Driver class: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")])])])]),t._v(" "),a("h3",{attrs:{id:"_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[t._v("#")]),t._v(" 5. Create the ontology and mapping and and try some SPARQL queries")]),t._v(" "),a("p",[t._v("You can use directly the files we have prepared:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"bzweather.obda"}},[t._v("bzweather.obda")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.owl"}},[t._v("bzweather.owl")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.properties"}},[t._v("bzweather.properties")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.q"}},[t._v("bzweather.q")])])]),t._v(" "),a("h3",{attrs:{id:"_6-setup-a-sparql-endpoint-with-command-line-interface"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-setup-a-sparql-endpoint-with-command-line-interface"}},[t._v("#")]),t._v(" 6. Setup a SPARQL endpoint with Command Line Interface")]),t._v(" "),a("h4",{attrs:{id:"configure-ontop-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-ontop-cli"}},[t._v("#")]),t._v(" Configure Ontop CLI")]),t._v(" "),a("p",[t._v("Add the JDBC denodo driver for the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("cp /tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar\n/jdbc\n")])])]),a("p",[t._v("Run the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("ontop endpoint -t bzweather.owl -m bzweather.obda -p bzweather.properties --cors-allowed-origins='*'\n")])])]),a("h4",{attrs:{id:"access-the-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#access-the-sparql-endpoint"}},[t._v("#")]),t._v(" Access the SPARQL endpoint")]),t._v(" "),a("p",[t._v("Open "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Run an example SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.opengis.net/ont/geosparql#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.w3.org/ns/sosa/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/weather#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" *\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?station")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("WeatherStation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("asWKT")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wkt")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSensor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("longitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lon")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("latitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("madeObservation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSimpleResult")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wktLabel")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("resultTime")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?t")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("LIMIT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/83.62e77972.js b/assets/js/83.4fccdf57.js similarity index 99% rename from assets/js/83.62e77972.js rename to assets/js/83.4fccdf57.js index adb62e59b..7b988b757 100644 --- a/assets/js/83.62e77972.js +++ b/assets/js/83.4fccdf57.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{460:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"ontop-with-dremio"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-dremio"}},[t._v("#")]),t._v(" Ontop with Dremio")]),t._v(" "),s("p",[t._v("In this tutorial we present step-by-step the way of connecting Dremio to Ontop. We show how to integrate "),s("em",[t._v("uni1")]),t._v(" data saved in the PostgreSQL database and "),s("em",[t._v("uni2")]),t._v(" data saved in plain JSON files into one Dremio data space.")]),t._v(" "),s("p",[t._v("We provide a Docker-compose script, which is both launching Dremio and the PostgreSQL database.\nGo at the root of the "),s("RouterLink",{attrs:{to:"/tutorial/#clone-this-repository"}},[t._v("ontop-tutorial git repository")]),t._v(" and run the following commands:")],1),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" federation/dremio\ndocker-compose pull "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" docker-compose up --build\n")])])]),s("p",[t._v("Once Dremio is initialized, visit "),s("a",{attrs:{href:"http://localhost:9047",target:"_blank",rel:"noopener"}},[t._v("http://localhost:9047"),s("OutboundLink")],1),t._v(". Before you continue, we recommend you to see the following tutorials provided by Dremio:")]),t._v(" "),s("ol",[s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/getting-oriented-to-dremio/",target:"_blank",rel:"noopener"}},[t._v("Getting oriented with Dremio"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1)])]),t._v(" "),s("p",[t._v("By following the instructions in "),s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1),t._v(", we create a "),s("em",[t._v("space")]),t._v(" named "),s("strong",[t._v("university")]),t._v(" as shown below.")]),t._v(" "),s("p",[t._v("Add and save the new data space:")]),t._v(" "),s("img",{attrs:{src:"img/add-space.png",width:"300"}}),t._v(" "),s("p",[t._v("It will be our data space in which we integrate data from various sources.")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni1")]),t._v(" data is contained in a PostgreSQL database named "),s("em",[t._v("university-session1")]),t._v(".\nWe are ready to add our database as a new datasource into Dremio:")]),t._v(" "),s("img",{attrs:{src:"img/add-external-source.png",width:"300"}}),t._v(" "),s("p",[t._v("Select PostgreSQL:")]),t._v(" "),s("img",{attrs:{src:"img/add-postgres-external.png",width:"700"}}),t._v(" "),s("p",[t._v("Enter the required JDBC information (password: "),s("em",[t._v("postgres")]),t._v("):")]),t._v(" "),s("img",{attrs:{src:"img/postgres-info.png",width:"700"}}),t._v(" "),s("p",[t._v("Now we see the tables in "),s("em",[t._v("university-session1")]),t._v(":")]),t._v(" "),s("img",{attrs:{src:"img/postgres-tables.png",width:"600"}}),t._v(" "),s("p",[t._v("We add the table "),s("em",[t._v("course-registration")]),t._v(" as dataset into "),s("em",[t._v("university")]),t._v(". We rename it to "),s("em",[t._v("uni1-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/postgres-uni1-registration-dataset.png",width:"600"}}),t._v(" "),s("p",[t._v("Save the other datasets in similar manner.")]),t._v(" "),s("p",[t._v("Now we add the "),s("em",[t._v("uni2")]),t._v(" data from "),s("a",{attrs:{href:"data/uni2.json"}},[t._v("here")]),t._v(" as a JSON data source:")]),t._v(" "),s("img",{attrs:{src:"img/add-json.png",width:"600"}}),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni2")]),t._v(" JSON data can be seen as follows:")]),t._v(" "),s("img",{attrs:{src:"img/see-json.png",width:"800"}}),t._v(" "),s("p",[t._v("JSON files usually contain nested data. However, Ontop cannot directly query nested data. For this reason, in order to make our JSON data queryable by Ontop, first we need to extract relevant group of elements, and save these groups as datasets.")]),t._v(" "),s("p",[t._v("With the following SQL query we create an "),s("em",[t._v("uni2-registration")]),t._v(" dataset and save it into the data space "),s("em",[t._v("university")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers \n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("The following SQL expression flattens the array of enrollers:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[t._v("flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n")])])]),s("p",[s("em",[t._v("Save As")]),t._v(" the data set with the name "),s("em",[t._v("uni2-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/uni2-registration.png",width:"800"}}),t._v(" "),s("p",[t._v("Create a dataset named "),s("em",[t._v("uni2-course")]),t._v(" in a similar manner:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" course"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" cid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Create a "),s("em",[t._v("uni2-student")]),t._v(" dataset with a bit more involved SQL that flattens the array of students:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pid"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"fname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" fname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" lname \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("Create "),s("em",[t._v("uni2-teaching")]),t._v(" dataset with the following SQL:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" uni2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("lecturer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Now we can list all the datasets we saved in the "),s("em",[t._v("university")]),t._v(" space:")]),t._v(" "),s("img",{attrs:{src:"img/dataset-list-updated.png",width:"600"}}),t._v(" "),s("p",[t._v("Finally we are ready to connect Dremio to Ontop. Dremio can be connected to Ontop through its JDBC interface. By following the instructions provided in "),s("a",{attrs:{href:"https://docs.dremio.com/drivers/dremio-jdbc-driver.html",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(', we provide to Ontop the following JDBC connection information in a ".properties file" for a Dremio instance running on the localhost:')]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("jdbc.url=jdbc\\:dremio\\:direct\\=localhost\\:31010\njdbc.driver=com.dremio.jdbc.Driver\njdbc.user=dremiotest\njdbc.password=dremiotest\n")])])]),s("p",[t._v("Dremio JDBC driver can be downloaded from "),s("a",{attrs:{href:"https://www.dremio.com/drivers/",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Over an OBDA setting containing the following mapping assertions:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[PrefixDeclaration]\n:\t\thttp://example.org/voc#\nex:\t\thttp://example.org/\nowl:\t\thttp://www.w3.org/2002/07/owl#\nrdf:\t\thttp://www.w3.org/1999/02/22-rdf-syntax-ns#\nxml:\t\thttp://www.w3.org/XML/1998/namespace\nxsd:\t\thttp://www.w3.org/2001/XMLSchema#\nfoaf:\t\thttp://xmlns.com/foaf/0.1/\nobda:\t\thttps://w3id.org/obda/vocabulary#\nrdfs:\t\thttp://www.w3.org/2000/01/rdf-schema#\n\n[MappingDeclaration] @collection [[\nmappingId\tuni1-student\ntarget\t\t:uni1/student/{s_id} a :Student ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni1-student"\n\nmappingId\tuni1-attends\ntarget\t\t:uni1/student/{s_id} :attends :uni1/course/{c_id}/{title} .\nsource\t\tSELECT "uni1-registration".s_id, "uni1-course".c_id, "uni1-course".title FROM "university"."uni1-registration", "university"."uni1-course" WHERE "uni1-registration".c_id = "uni1-course".c_id\n\nmappingId\tuni2-student\ntarget\t\t:uni2/student/{pid} a :Student ; foaf:firstName {fname}^^xsd:string ; foaf:lastName {lname}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni2-student"\n\nmappingId\tuni2-attends\ntarget\t\t:uni2/student/{pid} :attends :uni2/course/{cid}/{course} .\nsource\t\tSELECT "uni2-registration".pid, "uni2-course".cid, "uni2-course".course FROM "university"."uni2-registration", "university"."uni2-course" WHERE "uni2-registration".cid = "uni2-course".cid\n]]\n')])])]),s("p",[t._v("Now we can execute the following SPARQL query on Ontop:")]),t._v(" "),s("div",{staticClass:"language-sparql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sparql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{459:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"ontop-with-dremio"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-dremio"}},[t._v("#")]),t._v(" Ontop with Dremio")]),t._v(" "),s("p",[t._v("In this tutorial we present step-by-step the way of connecting Dremio to Ontop. We show how to integrate "),s("em",[t._v("uni1")]),t._v(" data saved in the PostgreSQL database and "),s("em",[t._v("uni2")]),t._v(" data saved in plain JSON files into one Dremio data space.")]),t._v(" "),s("p",[t._v("We provide a Docker-compose script, which is both launching Dremio and the PostgreSQL database.\nGo at the root of the "),s("RouterLink",{attrs:{to:"/tutorial/#clone-this-repository"}},[t._v("ontop-tutorial git repository")]),t._v(" and run the following commands:")],1),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" federation/dremio\ndocker-compose pull "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" docker-compose up --build\n")])])]),s("p",[t._v("Once Dremio is initialized, visit "),s("a",{attrs:{href:"http://localhost:9047",target:"_blank",rel:"noopener"}},[t._v("http://localhost:9047"),s("OutboundLink")],1),t._v(". Before you continue, we recommend you to see the following tutorials provided by Dremio:")]),t._v(" "),s("ol",[s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/getting-oriented-to-dremio/",target:"_blank",rel:"noopener"}},[t._v("Getting oriented with Dremio"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1)])]),t._v(" "),s("p",[t._v("By following the instructions in "),s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1),t._v(", we create a "),s("em",[t._v("space")]),t._v(" named "),s("strong",[t._v("university")]),t._v(" as shown below.")]),t._v(" "),s("p",[t._v("Add and save the new data space:")]),t._v(" "),s("img",{attrs:{src:"img/add-space.png",width:"300"}}),t._v(" "),s("p",[t._v("It will be our data space in which we integrate data from various sources.")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni1")]),t._v(" data is contained in a PostgreSQL database named "),s("em",[t._v("university-session1")]),t._v(".\nWe are ready to add our database as a new datasource into Dremio:")]),t._v(" "),s("img",{attrs:{src:"img/add-external-source.png",width:"300"}}),t._v(" "),s("p",[t._v("Select PostgreSQL:")]),t._v(" "),s("img",{attrs:{src:"img/add-postgres-external.png",width:"700"}}),t._v(" "),s("p",[t._v("Enter the required JDBC information (password: "),s("em",[t._v("postgres")]),t._v("):")]),t._v(" "),s("img",{attrs:{src:"img/postgres-info.png",width:"700"}}),t._v(" "),s("p",[t._v("Now we see the tables in "),s("em",[t._v("university-session1")]),t._v(":")]),t._v(" "),s("img",{attrs:{src:"img/postgres-tables.png",width:"600"}}),t._v(" "),s("p",[t._v("We add the table "),s("em",[t._v("course-registration")]),t._v(" as dataset into "),s("em",[t._v("university")]),t._v(". We rename it to "),s("em",[t._v("uni1-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/postgres-uni1-registration-dataset.png",width:"600"}}),t._v(" "),s("p",[t._v("Save the other datasets in similar manner.")]),t._v(" "),s("p",[t._v("Now we add the "),s("em",[t._v("uni2")]),t._v(" data from "),s("a",{attrs:{href:"data/uni2.json"}},[t._v("here")]),t._v(" as a JSON data source:")]),t._v(" "),s("img",{attrs:{src:"img/add-json.png",width:"600"}}),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni2")]),t._v(" JSON data can be seen as follows:")]),t._v(" "),s("img",{attrs:{src:"img/see-json.png",width:"800"}}),t._v(" "),s("p",[t._v("JSON files usually contain nested data. However, Ontop cannot directly query nested data. For this reason, in order to make our JSON data queryable by Ontop, first we need to extract relevant group of elements, and save these groups as datasets.")]),t._v(" "),s("p",[t._v("With the following SQL query we create an "),s("em",[t._v("uni2-registration")]),t._v(" dataset and save it into the data space "),s("em",[t._v("university")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers \n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("The following SQL expression flattens the array of enrollers:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[t._v("flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n")])])]),s("p",[s("em",[t._v("Save As")]),t._v(" the data set with the name "),s("em",[t._v("uni2-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/uni2-registration.png",width:"800"}}),t._v(" "),s("p",[t._v("Create a dataset named "),s("em",[t._v("uni2-course")]),t._v(" in a similar manner:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" course"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" cid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Create a "),s("em",[t._v("uni2-student")]),t._v(" dataset with a bit more involved SQL that flattens the array of students:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pid"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"fname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" fname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" lname \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("Create "),s("em",[t._v("uni2-teaching")]),t._v(" dataset with the following SQL:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" uni2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("lecturer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Now we can list all the datasets we saved in the "),s("em",[t._v("university")]),t._v(" space:")]),t._v(" "),s("img",{attrs:{src:"img/dataset-list-updated.png",width:"600"}}),t._v(" "),s("p",[t._v("Finally we are ready to connect Dremio to Ontop. Dremio can be connected to Ontop through its JDBC interface. By following the instructions provided in "),s("a",{attrs:{href:"https://docs.dremio.com/drivers/dremio-jdbc-driver.html",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(', we provide to Ontop the following JDBC connection information in a ".properties file" for a Dremio instance running on the localhost:')]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("jdbc.url=jdbc\\:dremio\\:direct\\=localhost\\:31010\njdbc.driver=com.dremio.jdbc.Driver\njdbc.user=dremiotest\njdbc.password=dremiotest\n")])])]),s("p",[t._v("Dremio JDBC driver can be downloaded from "),s("a",{attrs:{href:"https://www.dremio.com/drivers/",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Over an OBDA setting containing the following mapping assertions:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[PrefixDeclaration]\n:\t\thttp://example.org/voc#\nex:\t\thttp://example.org/\nowl:\t\thttp://www.w3.org/2002/07/owl#\nrdf:\t\thttp://www.w3.org/1999/02/22-rdf-syntax-ns#\nxml:\t\thttp://www.w3.org/XML/1998/namespace\nxsd:\t\thttp://www.w3.org/2001/XMLSchema#\nfoaf:\t\thttp://xmlns.com/foaf/0.1/\nobda:\t\thttps://w3id.org/obda/vocabulary#\nrdfs:\t\thttp://www.w3.org/2000/01/rdf-schema#\n\n[MappingDeclaration] @collection [[\nmappingId\tuni1-student\ntarget\t\t:uni1/student/{s_id} a :Student ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni1-student"\n\nmappingId\tuni1-attends\ntarget\t\t:uni1/student/{s_id} :attends :uni1/course/{c_id}/{title} .\nsource\t\tSELECT "uni1-registration".s_id, "uni1-course".c_id, "uni1-course".title FROM "university"."uni1-registration", "university"."uni1-course" WHERE "uni1-registration".c_id = "uni1-course".c_id\n\nmappingId\tuni2-student\ntarget\t\t:uni2/student/{pid} a :Student ; foaf:firstName {fname}^^xsd:string ; foaf:lastName {lname}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni2-student"\n\nmappingId\tuni2-attends\ntarget\t\t:uni2/student/{pid} :attends :uni2/course/{cid}/{course} .\nsource\t\tSELECT "uni2-registration".pid, "uni2-course".cid, "uni2-course".course FROM "university"."uni2-registration", "university"."uni2-course" WHERE "uni2-registration".cid = "uni2-course".cid\n]]\n')])])]),s("p",[t._v("Now we can execute the following SPARQL query on Ontop:")]),t._v(" "),s("div",{staticClass:"language-sparql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sparql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/84.0fcb9ba5.js b/assets/js/84.89d4f971.js similarity index 99% rename from assets/js/84.0fcb9ba5.js rename to assets/js/84.89d4f971.js index e7cd01511..eaa964f43 100644 --- a/assets/js/84.0fcb9ba5.js +++ b/assets/js/84.89d4f971.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[84],{461:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"ontop-with-teiid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-teiid"}},[t._v("#")]),t._v(" Ontop with Teiid")]),t._v(" "),a("p",[t._v("In this tutorial, we present how to use Teiid as a federator for Ontop. We provides two options:")]),t._v(" "),a("ul",[a("li",[t._v("Option 1: Using Docker-comopse (recommended)")]),t._v(" "),a("li",[t._v("Option 2: Manual set up")])]),t._v(" "),a("h2",{attrs:{id:"option-1-using-docker-comopse"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#option-1-using-docker-comopse"}},[t._v("#")]),t._v(" Option 1: Using Docker-comopse")]),t._v(" "),a("h3",{attrs:{id:"requirements"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://docs.docker.com/get-docker/",target:"_blank",rel:"noopener"}},[t._v("Docker"),a("OutboundLink")],1),t._v(", version 17.09.0 or higher")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://docs.docker.com/compose/install/",target:"_blank",rel:"noopener"}},[t._v("Docker Compose"),a("OutboundLink")],1),t._v(", version 1.17.0 or higher")])]),t._v(" "),a("h3",{attrs:{id:"steps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#steps"}},[t._v("#")]),t._v(" Steps")]),t._v(" "),a("ol",[a("li",[t._v("Download the code and cd to the directory of the teiid demo")])]),t._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[t._v("$ "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/ontop/ontop-tutorial/\n$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ontop-tutorial/federation/teiid\n")])])]),a("ol",{attrs:{start:"2"}},[a("li",[t._v("to start the prototype, downloading / building the required images and containers if needed")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose up\n")])])]),a("p",[t._v("(note: may add option "),a("code",[t._v("-d")]),t._v(" to run in background, in which case logs are not be displayed to standard output but are still accessible via "),a("code",[t._v("docker-compose logs")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Services")]),t._v(" When running, the prototype exposes the following services:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("a PostgreSQL server with the sample data, with connection information defined in the "),a("code",[t._v(".env")]),t._v(" file.")])]),t._v(" "),a("li",[a("p",[t._v("a Web portal of the SPARQL endpoint backed by ontop at URL "),a("a",{attrs:{href:"http://localhost:8880/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8880/"),a("OutboundLink")],1)])]),t._v(" "),a("li",[a("p",[t._v("a SPARQL endpoint backed by ontop at URL "),a("a",{attrs:{href:"http://localhost:8880/sparql",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8880/sparql"),a("OutboundLink")],1),t._v(".")])])]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("to stop the prototype, if running")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose down\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("to stop the prototype, if running, and also clean any image / container / data associating to it (useful for cleaning up)")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose down --volumes --remove-orphans\n")])])]),a("p",[t._v("(note: the above command does not remove Docker images that may result being unused after stopping and removing this prototype containers; to remove such images, add option "),a("code",[t._v("--rmi all")]),t._v(")")]),t._v(" "),a("ol",{attrs:{start:"5"}},[a("li",[t._v("to check the status of the containers forming the prototype")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose ps\n")])])]),a("ol",{attrs:{start:"6"}},[a("li",[t._v("to check the logs of specific container(s) or of all containers (if no container name is supplied)")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose logs ... \n")])])]),a("h2",{attrs:{id:"option-2-manual-set-up"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#option-2-manual-set-up"}},[t._v("#")]),t._v(" Option 2: Manual set up")]),t._v(" "),a("p",[t._v("In this tutorial, we present step-by-step way of connecting Teiid to Ontop. We show how to integrate "),a("em",[t._v("uni1")]),t._v(" data stored in a MySQL DB and "),a("em",[t._v("uni2")]),t._v(" data stored in a PostgreSQL DB into one Teiid virtual database, and access these two data sources using Ontop in a uniform way.")]),t._v(" "),a("h3",{attrs:{id:"install-teiid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#install-teiid"}},[t._v("#")]),t._v(" Install Teiid")]),t._v(" "),a("p",[t._v("Download the latest version 16.0.0 of Teiid from "),a("a",{attrs:{href:"https://teiid.io/teiid_wildfly/downloads/",target:"_blank",rel:"noopener"}},[t._v("https://teiid.io/teiid_wildfly/downloads/"),a("OutboundLink")],1),t._v(" (choosing Teiid with WildFly/Console, by this way, we do not to install WildFly anymore). Unzip it to a directory, which is denoted as $TEIID-DIR below.")]),t._v(" "),a("p",[t._v("Configure the environment variable 'JBOSS_HOME' of WildFly:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("export JBOSS_HOME=$TEIID_DIR\nexport PATH=$PATH:$JBOSS_HOME/bin\n")])])]),a("p",[t._v("Then start 'WildFly' by executing the following commands:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" ~ cd $TEIID_DIR/bin/\n ~ bin ./standalone.sh\n")])])]),a("p",[t._v("And access "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1),t._v(" through your browser. If you see the following Welcome page then 'WildFly' has been installed successfully.")]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/WildFly.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("After 'WildFly' has been isntalled, Teiid standalone mode can be started by executing the commands below:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("~ cd $TEIID_DIR/bin/\n~ bin ./standalone.sh -c=standalone-teiid.xml\n")])])]),a("p",[t._v("Run 'add-user.sh' (in the directory $TEIID_DIR/bin/) and follow the introduction to respectively add 'Management User' and 'Application User'. 'Management User' is used to administrate your data sources and VDBs via web Console, and 'Application User' is used to connect Teiid Server.")]),t._v(" "),a("h3",{attrs:{id:"configure-data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-data-sources"}},[t._v("#")]),t._v(" Configure data sources")]),t._v(" "),a("p",[t._v("Before building and deploying VDBs of Teiid, we first need to configure the data sources needed to be integerated. First, start Teiid.")]),t._v(" "),a("h4",{attrs:{id:"deploy-the-drivers-of-the-data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#deploy-the-drivers-of-the-data-sources"}},[t._v("#")]),t._v(" Deploy the drivers of the data sources")]),t._v(" "),a("p",[t._v("Access "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1),t._v(" through your browser. Click 'Adminitration Console' and login with the management user account you have created. Then do the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Deployments'")]),t._v(" "),a("li",[t._v("Click 'Add'")]),t._v(" "),a("li",[t._v("Upload the jdbc driver of MySQL, i.e., mysql-connector-java-8.0.21.jar")]),t._v(" "),a("li",[t._v("Click 'Next'")]),t._v(" "),a("li",[t._v("Click 'Fnish'")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/deployDriver.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("Then deploy the driver of PostgreSQL, i.e., postgresql-42.2.19.jar, in the same way")]),t._v(" "),a("h4",{attrs:{id:"configure-the-data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-the-data-sources"}},[t._v("#")]),t._v(" Configure the data sources")]),t._v(" "),a("p",[t._v("Configure the DB "),a("em",[t._v("uni1")]),t._v(" of MySQL via the 'Web Console' by the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Configuration'")]),t._v(" "),a("li",[t._v("Click 'Subsystems'")]),t._v(" "),a("li",[t._v("Click 'Datasources'")]),t._v(" "),a("li",[t._v("Click 'Non-XA'")]),t._v(" "),a("li",[t._v("Click 'Add'")]),t._v(" "),a("li",[t._v("Choose the type of the 'Datasources', i.e., MySQL")]),t._v(" "),a("li",[t._v("Click 'Next'")]),t._v(" "),a("li",[t._v("Input the Name and JNDI Name of the datasource and click 'Next'.\n"),a("strong",[t._v("Please record the name and JNDI name you inout for the source, since they will be used when build VDBs of Teiid")])]),t._v(" "),a("li",[t._v("Choose the driver of the datasource and click 'Next'")]),t._v(" "),a("li",[t._v("Input the connection URL, user name and password of the datasource and click 'Next'")]),t._v(" "),a("li",[t._v("Test the connection of the data source and click 'Next' if the connect is sucessful")]),t._v(" "),a("li",[t._v("Click 'Finish'")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/configMySQLDB.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("And configure the DB "),a("em",[t._v("uni2")]),t._v(" of PostgreSQL in the same way.")]),t._v(" "),a("h4",{attrs:{id:"build-and-deploy-vdbs"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#build-and-deploy-vdbs"}},[t._v("#")]),t._v(" Build and Deploy VDBs")]),t._v(" "),a("p",[t._v("Create a virtual database (VDB) of Teiid that integartes the MySQL DB "),a("em",[t._v("uni1")]),t._v(" and PostgreSQL DB "),a("em",[t._v("uni2")]),t._v(" (the file 'UniversityDBs-vdb.xml' in 'ontop-website/.vuepress/public/tutorial/federation/teiid/data/').")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('\n \n \n \n \n \n \n \n \n \n')])])]),a("p",[t._v('Here, "UniversityDBs" is the name of this VDB. The title of this file should be UniversityDBs-vdb.xml. Note that the values of '),a("em",[t._v("connection-jdni-names")]),t._v(" must be the names used when configure the corresponding data sources. Here, the forgign tables described by DDL are the schemas of the tables in the DB uni1 and the DB uni2. See http://teiid.github.io/teiid-documents/16.0.x/content/reference/as_virtual-databases.html for more information on how to develop VDBs of Teiid.")]),t._v(" "),a("p",[t._v("Then deploy the VDB "),a("em",[t._v("UniversityDBs-vdb.xml")]),t._v(" through the 'Web Console' by the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Deployments'")]),t._v(" "),a("li",[t._v("Click 'Add'")]),t._v(" "),a("li",[t._v("Upload the VDB file")]),t._v(" "),a("li",[t._v("Click 'Next' to varify your VDB")]),t._v(" "),a("li",[t._v("Click 'Finish'")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/deployVDB.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("By the following steps to see whether the VDB has been deployed successfully:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Runtime'")]),t._v(" "),a("li",[t._v("Click 'Standalone Server'")]),t._v(" "),a("li",[t._v("Click 'Subsystems'")]),t._v(" "),a("li",[t._v("Choose 'Teiid' and click 'View':")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/checkVDB.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("If the 'Statues' of the VDB is 'ACTIVE' then the VDB has been successfully deployed.")]),t._v(" "),a("h3",{attrs:{id:"configure-ontop-protege-to-use-the-vdb-of-teiid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-ontop-protege-to-use-the-vdb-of-teiid"}},[t._v("#")]),t._v(" Configure Ontop-protege to use the VDB of Teiid")]),t._v(" "),a("p",[t._v("Download the JDBC Driver of Teiid from "),a("a",{attrs:{href:"https://teiid.io/teiid_wildfly/downloads/",target:"_blank",rel:"noopener"}},[t._v("https://teiid.io/teiid_wildfly/downloads/"),a("OutboundLink")],1),t._v(", and put it in a directory. Suppose the path is '$Dir/teiid-16.0.0-jdbc.jar'.")]),t._v(" "),a("p",[t._v("Install the Teiid JDBC driver. Within Protege, clike 'File', 'Reference', 'JDBC Drivers' and 'Add' in turn:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(". Description: Teiid \n. Class name: org.teiid.jdbc.TeiidDriver \n. Driver File (jar): browse to `$Dir/teiid-16.0.0-jdbc.jar` \n")])])]),a("p",[t._v("For the connection, in your Datasource manager, use:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(". Connection url: jdbc:teiid:UniversityDBs@mm://localhost:31000 \n. Database Username: $var1 \n. Database Password: $var2 \n. Driver class: org.teiid.jdbc.TeiidDriver\n")])])]),a("p",[t._v("Here, '"),a("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[a("svg",{staticStyle:{"vertical-align":"-0.05ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"9.925ex",height:"1.767ex",viewBox:"0 -759 4386.9 781"}},[a("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[a("g",{attrs:{"data-mml-node":"math"}},[a("g",{attrs:{"data-mml-node":"mi"}},[a("path",{attrs:{"data-c":"56",d:"M52 648Q52 670 65 683H76Q118 680 181 680Q299 680 320 683H330Q336 677 336 674T334 656Q329 641 325 637H304Q282 635 274 635Q245 630 242 620Q242 618 271 369T301 118L374 235Q447 352 520 471T595 594Q599 601 599 609Q599 633 555 637Q537 637 537 648Q537 649 539 661Q542 675 545 679T558 683Q560 683 570 683T604 682T668 681Q737 681 755 683H762Q769 676 769 672Q769 655 760 640Q757 637 743 637Q730 636 719 635T698 630T682 623T670 615T660 608T652 599T645 592L452 282Q272 -9 266 -16Q263 -18 259 -21L241 -22H234Q216 -22 216 -15Q213 -9 177 305Q139 623 138 626Q133 637 76 637H59Q52 642 52 648Z"}})]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(769, 0)"}},[a("path",{attrs:{"data-c":"61",d:"M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z"}})]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(1298, 0)"}},[a("path",{attrs:{"data-c":"72",d:"M21 287Q22 290 23 295T28 317T38 348T53 381T73 411T99 433T132 442Q161 442 183 430T214 408T225 388Q227 382 228 382T236 389Q284 441 347 441H350Q398 441 422 400Q430 381 430 363Q430 333 417 315T391 292T366 288Q346 288 334 299T322 328Q322 376 378 392Q356 405 342 405Q286 405 239 331Q229 315 224 298T190 165Q156 25 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 114 189T154 366Q154 405 128 405Q107 405 92 377T68 316T57 280Q55 278 41 278H27Q21 284 21 287Z"}})]),a("g",{attrs:{"data-mml-node":"msup",transform:"translate(1749, 0)"}},[a("g",{attrs:{"data-mml-node":"mn"}},[a("path",{attrs:{"data-c":"31",d:"M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"}})]),a("g",{attrs:{"data-mml-node":"mo",transform:"translate(500, 363) scale(0.707)"}},[a("path",{attrs:{"data-c":"2032",d:"M79 43Q73 43 52 49T30 61Q30 68 85 293T146 528Q161 560 198 560Q218 560 240 545T262 501Q262 496 260 486Q259 479 173 263T84 45T79 43Z"}})])]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(2493.5, 0)"}},[a("path",{attrs:{"data-c":"61",d:"M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z"}})]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(3022.5, 0)"}},[a("path",{attrs:{"data-c":"6E",d:"M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z"}})]),a("g",{attrs:{"data-mml-node":"msup",transform:"translate(3622.5, 0)"}},[a("g",{attrs:{"data-mml-node":"mi"}},[a("path",{attrs:{"data-c":"64",d:"M366 683Q367 683 438 688T511 694Q523 694 523 686Q523 679 450 384T375 83T374 68Q374 26 402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487H491Q506 153 506 145Q506 140 503 129Q490 79 473 48T445 8T417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157Q33 205 53 255T101 341Q148 398 195 420T280 442Q336 442 364 400Q369 394 369 396Q370 400 396 505T424 616Q424 629 417 632T378 637H357Q351 643 351 645T353 664Q358 683 366 683ZM352 326Q329 405 277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q233 26 290 98L298 109L352 326Z"}})]),a("g",{attrs:{"data-mml-node":"mo",transform:"translate(520, 363) scale(0.707)"}},[a("path",{attrs:{"data-c":"2032",d:"M79 43Q73 43 52 49T30 61Q30 68 85 293T146 528Q161 560 198 560Q218 560 240 545T262 501Q262 496 260 486Q259 479 173 263T84 45T79 43Z"}})])])])])])]),t._v("Var2' are respecrively the user name and passord of your 'Application User' created before.")],1),t._v(" "),a("h3",{attrs:{id:"create-the-ontology-and-mapping-and-try-some-sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-the-ontology-and-mapping-and-try-some-sparql-queries"}},[t._v("#")]),t._v(" Create the ontology and mapping and try some SPARQL queries")]),t._v(" "),a("p",[t._v("You can directly use the files 'university.ttl', 'university.obda' and 'teiid.properties' (in 'ontop-website/.vuepress/public/tutorial/federation/teiid/data/') we have prepared.")]),t._v(" "),a("p",[t._v("Setup a SPARQL endpoint with Command Line Interface (CLI).")]),t._v(" "),a("p",[t._v("Configure Ontop CLI by adding the Teiid JDBC driver:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("cp $Dir/teiid-16.0.0-jdbc.jar\n/jdbc\n")])])]),a("p",[t._v("Run the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("ontop endpoint -t university.ttl -m university.obda -p teiid.properties --cors-allowed-origins='*'\n")])])]),a("p",[t._v("Access the SPARQL endpoint. Open "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1),t._v(", and run an example SPARQL query ''asking for the courses that are teached at both university1 and university as well as the lectures of such courses in university2':")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("rdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?y")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?e")]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("rdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("type")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?y")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#uni1/university"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("rdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("type")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?y")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#uni2/university"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?e")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLecture")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("you can obtain the following certain answers which are generated by extracting and merging the data obatined from uni1 and uni2:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('[x z y e]\n[x/,z/,y/"Information security",e/]\n[x/,z/,y/"Intelligent Systems",e/]\n')])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[84],{462:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"ontop-with-teiid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-teiid"}},[t._v("#")]),t._v(" Ontop with Teiid")]),t._v(" "),a("p",[t._v("In this tutorial, we present how to use Teiid as a federator for Ontop. We provides two options:")]),t._v(" "),a("ul",[a("li",[t._v("Option 1: Using Docker-comopse (recommended)")]),t._v(" "),a("li",[t._v("Option 2: Manual set up")])]),t._v(" "),a("h2",{attrs:{id:"option-1-using-docker-comopse"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#option-1-using-docker-comopse"}},[t._v("#")]),t._v(" Option 1: Using Docker-comopse")]),t._v(" "),a("h3",{attrs:{id:"requirements"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://docs.docker.com/get-docker/",target:"_blank",rel:"noopener"}},[t._v("Docker"),a("OutboundLink")],1),t._v(", version 17.09.0 or higher")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://docs.docker.com/compose/install/",target:"_blank",rel:"noopener"}},[t._v("Docker Compose"),a("OutboundLink")],1),t._v(", version 1.17.0 or higher")])]),t._v(" "),a("h3",{attrs:{id:"steps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#steps"}},[t._v("#")]),t._v(" Steps")]),t._v(" "),a("ol",[a("li",[t._v("Download the code and cd to the directory of the teiid demo")])]),t._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[t._v("$ "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/ontop/ontop-tutorial/\n$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ontop-tutorial/federation/teiid\n")])])]),a("ol",{attrs:{start:"2"}},[a("li",[t._v("to start the prototype, downloading / building the required images and containers if needed")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose up\n")])])]),a("p",[t._v("(note: may add option "),a("code",[t._v("-d")]),t._v(" to run in background, in which case logs are not be displayed to standard output but are still accessible via "),a("code",[t._v("docker-compose logs")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Services")]),t._v(" When running, the prototype exposes the following services:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("a PostgreSQL server with the sample data, with connection information defined in the "),a("code",[t._v(".env")]),t._v(" file.")])]),t._v(" "),a("li",[a("p",[t._v("a Web portal of the SPARQL endpoint backed by ontop at URL "),a("a",{attrs:{href:"http://localhost:8880/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8880/"),a("OutboundLink")],1)])]),t._v(" "),a("li",[a("p",[t._v("a SPARQL endpoint backed by ontop at URL "),a("a",{attrs:{href:"http://localhost:8880/sparql",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8880/sparql"),a("OutboundLink")],1),t._v(".")])])]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("to stop the prototype, if running")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose down\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("to stop the prototype, if running, and also clean any image / container / data associating to it (useful for cleaning up)")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose down --volumes --remove-orphans\n")])])]),a("p",[t._v("(note: the above command does not remove Docker images that may result being unused after stopping and removing this prototype containers; to remove such images, add option "),a("code",[t._v("--rmi all")]),t._v(")")]),t._v(" "),a("ol",{attrs:{start:"5"}},[a("li",[t._v("to check the status of the containers forming the prototype")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose ps\n")])])]),a("ol",{attrs:{start:"6"}},[a("li",[t._v("to check the logs of specific container(s) or of all containers (if no container name is supplied)")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("docker-compose logs ... \n")])])]),a("h2",{attrs:{id:"option-2-manual-set-up"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#option-2-manual-set-up"}},[t._v("#")]),t._v(" Option 2: Manual set up")]),t._v(" "),a("p",[t._v("In this tutorial, we present step-by-step way of connecting Teiid to Ontop. We show how to integrate "),a("em",[t._v("uni1")]),t._v(" data stored in a MySQL DB and "),a("em",[t._v("uni2")]),t._v(" data stored in a PostgreSQL DB into one Teiid virtual database, and access these two data sources using Ontop in a uniform way.")]),t._v(" "),a("h3",{attrs:{id:"install-teiid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#install-teiid"}},[t._v("#")]),t._v(" Install Teiid")]),t._v(" "),a("p",[t._v("Download the latest version 16.0.0 of Teiid from "),a("a",{attrs:{href:"https://teiid.io/teiid_wildfly/downloads/",target:"_blank",rel:"noopener"}},[t._v("https://teiid.io/teiid_wildfly/downloads/"),a("OutboundLink")],1),t._v(" (choosing Teiid with WildFly/Console, by this way, we do not to install WildFly anymore). Unzip it to a directory, which is denoted as $TEIID-DIR below.")]),t._v(" "),a("p",[t._v("Configure the environment variable 'JBOSS_HOME' of WildFly:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("export JBOSS_HOME=$TEIID_DIR\nexport PATH=$PATH:$JBOSS_HOME/bin\n")])])]),a("p",[t._v("Then start 'WildFly' by executing the following commands:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" ~ cd $TEIID_DIR/bin/\n ~ bin ./standalone.sh\n")])])]),a("p",[t._v("And access "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1),t._v(" through your browser. If you see the following Welcome page then 'WildFly' has been installed successfully.")]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/WildFly.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("After 'WildFly' has been isntalled, Teiid standalone mode can be started by executing the commands below:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("~ cd $TEIID_DIR/bin/\n~ bin ./standalone.sh -c=standalone-teiid.xml\n")])])]),a("p",[t._v("Run 'add-user.sh' (in the directory $TEIID_DIR/bin/) and follow the introduction to respectively add 'Management User' and 'Application User'. 'Management User' is used to administrate your data sources and VDBs via web Console, and 'Application User' is used to connect Teiid Server.")]),t._v(" "),a("h3",{attrs:{id:"configure-data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-data-sources"}},[t._v("#")]),t._v(" Configure data sources")]),t._v(" "),a("p",[t._v("Before building and deploying VDBs of Teiid, we first need to configure the data sources needed to be integerated. First, start Teiid.")]),t._v(" "),a("h4",{attrs:{id:"deploy-the-drivers-of-the-data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#deploy-the-drivers-of-the-data-sources"}},[t._v("#")]),t._v(" Deploy the drivers of the data sources")]),t._v(" "),a("p",[t._v("Access "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1),t._v(" through your browser. Click 'Adminitration Console' and login with the management user account you have created. Then do the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Deployments'")]),t._v(" "),a("li",[t._v("Click 'Add'")]),t._v(" "),a("li",[t._v("Upload the jdbc driver of MySQL, i.e., mysql-connector-java-8.0.21.jar")]),t._v(" "),a("li",[t._v("Click 'Next'")]),t._v(" "),a("li",[t._v("Click 'Fnish'")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/deployDriver.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("Then deploy the driver of PostgreSQL, i.e., postgresql-42.2.19.jar, in the same way")]),t._v(" "),a("h4",{attrs:{id:"configure-the-data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-the-data-sources"}},[t._v("#")]),t._v(" Configure the data sources")]),t._v(" "),a("p",[t._v("Configure the DB "),a("em",[t._v("uni1")]),t._v(" of MySQL via the 'Web Console' by the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Configuration'")]),t._v(" "),a("li",[t._v("Click 'Subsystems'")]),t._v(" "),a("li",[t._v("Click 'Datasources'")]),t._v(" "),a("li",[t._v("Click 'Non-XA'")]),t._v(" "),a("li",[t._v("Click 'Add'")]),t._v(" "),a("li",[t._v("Choose the type of the 'Datasources', i.e., MySQL")]),t._v(" "),a("li",[t._v("Click 'Next'")]),t._v(" "),a("li",[t._v("Input the Name and JNDI Name of the datasource and click 'Next'.\n"),a("strong",[t._v("Please record the name and JNDI name you inout for the source, since they will be used when build VDBs of Teiid")])]),t._v(" "),a("li",[t._v("Choose the driver of the datasource and click 'Next'")]),t._v(" "),a("li",[t._v("Input the connection URL, user name and password of the datasource and click 'Next'")]),t._v(" "),a("li",[t._v("Test the connection of the data source and click 'Next' if the connect is sucessful")]),t._v(" "),a("li",[t._v("Click 'Finish'")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/configMySQLDB.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("And configure the DB "),a("em",[t._v("uni2")]),t._v(" of PostgreSQL in the same way.")]),t._v(" "),a("h4",{attrs:{id:"build-and-deploy-vdbs"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#build-and-deploy-vdbs"}},[t._v("#")]),t._v(" Build and Deploy VDBs")]),t._v(" "),a("p",[t._v("Create a virtual database (VDB) of Teiid that integartes the MySQL DB "),a("em",[t._v("uni1")]),t._v(" and PostgreSQL DB "),a("em",[t._v("uni2")]),t._v(" (the file 'UniversityDBs-vdb.xml' in 'ontop-website/.vuepress/public/tutorial/federation/teiid/data/').")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('\n \n \n \n \n \n \n \n \n \n')])])]),a("p",[t._v('Here, "UniversityDBs" is the name of this VDB. The title of this file should be UniversityDBs-vdb.xml. Note that the values of '),a("em",[t._v("connection-jdni-names")]),t._v(" must be the names used when configure the corresponding data sources. Here, the forgign tables described by DDL are the schemas of the tables in the DB uni1 and the DB uni2. See http://teiid.github.io/teiid-documents/16.0.x/content/reference/as_virtual-databases.html for more information on how to develop VDBs of Teiid.")]),t._v(" "),a("p",[t._v("Then deploy the VDB "),a("em",[t._v("UniversityDBs-vdb.xml")]),t._v(" through the 'Web Console' by the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Deployments'")]),t._v(" "),a("li",[t._v("Click 'Add'")]),t._v(" "),a("li",[t._v("Upload the VDB file")]),t._v(" "),a("li",[t._v("Click 'Next' to varify your VDB")]),t._v(" "),a("li",[t._v("Click 'Finish'")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/deployVDB.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("By the following steps to see whether the VDB has been deployed successfully:")]),t._v(" "),a("ul",[a("li",[t._v("Click 'Runtime'")]),t._v(" "),a("li",[t._v("Click 'Standalone Server'")]),t._v(" "),a("li",[t._v("Click 'Subsystems'")]),t._v(" "),a("li",[t._v("Choose 'Teiid' and click 'View':")])]),t._v(" "),a("p",[a("img",{attrs:{src:"tutorial/.././img/checkVDB.png",alt:"Image text"}})]),t._v(" "),a("p",[t._v("If the 'Statues' of the VDB is 'ACTIVE' then the VDB has been successfully deployed.")]),t._v(" "),a("h3",{attrs:{id:"configure-ontop-protege-to-use-the-vdb-of-teiid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-ontop-protege-to-use-the-vdb-of-teiid"}},[t._v("#")]),t._v(" Configure Ontop-protege to use the VDB of Teiid")]),t._v(" "),a("p",[t._v("Download the JDBC Driver of Teiid from "),a("a",{attrs:{href:"https://teiid.io/teiid_wildfly/downloads/",target:"_blank",rel:"noopener"}},[t._v("https://teiid.io/teiid_wildfly/downloads/"),a("OutboundLink")],1),t._v(", and put it in a directory. Suppose the path is '$Dir/teiid-16.0.0-jdbc.jar'.")]),t._v(" "),a("p",[t._v("Install the Teiid JDBC driver. Within Protege, clike 'File', 'Reference', 'JDBC Drivers' and 'Add' in turn:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(". Description: Teiid \n. Class name: org.teiid.jdbc.TeiidDriver \n. Driver File (jar): browse to `$Dir/teiid-16.0.0-jdbc.jar` \n")])])]),a("p",[t._v("For the connection, in your Datasource manager, use:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(". Connection url: jdbc:teiid:UniversityDBs@mm://localhost:31000 \n. Database Username: $var1 \n. Database Password: $var2 \n. Driver class: org.teiid.jdbc.TeiidDriver\n")])])]),a("p",[t._v("Here, '"),a("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[a("svg",{staticStyle:{"vertical-align":"-0.05ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"9.925ex",height:"1.767ex",viewBox:"0 -759 4386.9 781"}},[a("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[a("g",{attrs:{"data-mml-node":"math"}},[a("g",{attrs:{"data-mml-node":"mi"}},[a("path",{attrs:{"data-c":"56",d:"M52 648Q52 670 65 683H76Q118 680 181 680Q299 680 320 683H330Q336 677 336 674T334 656Q329 641 325 637H304Q282 635 274 635Q245 630 242 620Q242 618 271 369T301 118L374 235Q447 352 520 471T595 594Q599 601 599 609Q599 633 555 637Q537 637 537 648Q537 649 539 661Q542 675 545 679T558 683Q560 683 570 683T604 682T668 681Q737 681 755 683H762Q769 676 769 672Q769 655 760 640Q757 637 743 637Q730 636 719 635T698 630T682 623T670 615T660 608T652 599T645 592L452 282Q272 -9 266 -16Q263 -18 259 -21L241 -22H234Q216 -22 216 -15Q213 -9 177 305Q139 623 138 626Q133 637 76 637H59Q52 642 52 648Z"}})]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(769, 0)"}},[a("path",{attrs:{"data-c":"61",d:"M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z"}})]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(1298, 0)"}},[a("path",{attrs:{"data-c":"72",d:"M21 287Q22 290 23 295T28 317T38 348T53 381T73 411T99 433T132 442Q161 442 183 430T214 408T225 388Q227 382 228 382T236 389Q284 441 347 441H350Q398 441 422 400Q430 381 430 363Q430 333 417 315T391 292T366 288Q346 288 334 299T322 328Q322 376 378 392Q356 405 342 405Q286 405 239 331Q229 315 224 298T190 165Q156 25 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 114 189T154 366Q154 405 128 405Q107 405 92 377T68 316T57 280Q55 278 41 278H27Q21 284 21 287Z"}})]),a("g",{attrs:{"data-mml-node":"msup",transform:"translate(1749, 0)"}},[a("g",{attrs:{"data-mml-node":"mn"}},[a("path",{attrs:{"data-c":"31",d:"M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"}})]),a("g",{attrs:{"data-mml-node":"mo",transform:"translate(500, 363) scale(0.707)"}},[a("path",{attrs:{"data-c":"2032",d:"M79 43Q73 43 52 49T30 61Q30 68 85 293T146 528Q161 560 198 560Q218 560 240 545T262 501Q262 496 260 486Q259 479 173 263T84 45T79 43Z"}})])]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(2493.5, 0)"}},[a("path",{attrs:{"data-c":"61",d:"M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z"}})]),a("g",{attrs:{"data-mml-node":"mi",transform:"translate(3022.5, 0)"}},[a("path",{attrs:{"data-c":"6E",d:"M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z"}})]),a("g",{attrs:{"data-mml-node":"msup",transform:"translate(3622.5, 0)"}},[a("g",{attrs:{"data-mml-node":"mi"}},[a("path",{attrs:{"data-c":"64",d:"M366 683Q367 683 438 688T511 694Q523 694 523 686Q523 679 450 384T375 83T374 68Q374 26 402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487H491Q506 153 506 145Q506 140 503 129Q490 79 473 48T445 8T417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157Q33 205 53 255T101 341Q148 398 195 420T280 442Q336 442 364 400Q369 394 369 396Q370 400 396 505T424 616Q424 629 417 632T378 637H357Q351 643 351 645T353 664Q358 683 366 683ZM352 326Q329 405 277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q233 26 290 98L298 109L352 326Z"}})]),a("g",{attrs:{"data-mml-node":"mo",transform:"translate(520, 363) scale(0.707)"}},[a("path",{attrs:{"data-c":"2032",d:"M79 43Q73 43 52 49T30 61Q30 68 85 293T146 528Q161 560 198 560Q218 560 240 545T262 501Q262 496 260 486Q259 479 173 263T84 45T79 43Z"}})])])])])])]),t._v("Var2' are respecrively the user name and passord of your 'Application User' created before.")],1),t._v(" "),a("h3",{attrs:{id:"create-the-ontology-and-mapping-and-try-some-sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-the-ontology-and-mapping-and-try-some-sparql-queries"}},[t._v("#")]),t._v(" Create the ontology and mapping and try some SPARQL queries")]),t._v(" "),a("p",[t._v("You can directly use the files 'university.ttl', 'university.obda' and 'teiid.properties' (in 'ontop-website/.vuepress/public/tutorial/federation/teiid/data/') we have prepared.")]),t._v(" "),a("p",[t._v("Setup a SPARQL endpoint with Command Line Interface (CLI).")]),t._v(" "),a("p",[t._v("Configure Ontop CLI by adding the Teiid JDBC driver:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("cp $Dir/teiid-16.0.0-jdbc.jar\n/jdbc\n")])])]),a("p",[t._v("Run the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("ontop endpoint -t university.ttl -m university.obda -p teiid.properties --cors-allowed-origins='*'\n")])])]),a("p",[t._v("Access the SPARQL endpoint. Open "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1),t._v(", and run an example SPARQL query ''asking for the courses that are teached at both university1 and university as well as the lectures of such courses in university2':")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("rdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?y")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?e")]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("rdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("type")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?y")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#uni1/university"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("rdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("type")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?y")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#uni2/university"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?e")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLecture")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?z")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("you can obtain the following certain answers which are generated by extracting and merging the data obatined from uni1 and uni2:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('[x z y e]\n[x/,z/,y/"Information security",e/]\n[x/,z/,y/"Intelligent Systems",e/]\n')])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/85.3fe9685f.js b/assets/js/85.11adfea4.js similarity index 98% rename from assets/js/85.3fe9685f.js rename to assets/js/85.11adfea4.js index 886b1b8dd..3fd5f8b9f 100644 --- a/assets/js/85.3fe9685f.js +++ b/assets/js/85.11adfea4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[85],{462:function(t,e,a){"use strict";a.r(e);var n=a(51),r=Object(n.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"interact-with-an-ontop-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#interact-with-an-ontop-sparql-endpoint"}},[t._v("#")]),t._v(" Interact with an Ontop SPARQL Endpoint")]),t._v(" "),a("p",[t._v("An Ontop Endpoint is accessible by the standard "),a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-protocol/",target:"_blank",rel:"noopener"}},[t._v("SPARQL HTTP protocol"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"url-of-the-ontop-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#url-of-the-ontop-sparql-endpoint"}},[t._v("#")]),t._v(" URL of the Ontop SPARQL Endpoint")]),t._v(" "),a("p",[t._v("When the endpoint is created by the Ontop CLI or Docker, the URL looks like\n"),a("code",[t._v("http://localhost:8080/sparql")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"sending-http-requests"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sending-http-requests"}},[t._v("#")]),t._v(" Sending HTTP Requests")]),t._v(" "),a("p",[t._v("You can use POST or GET requests carrying the SPARQL query to evaluate (as per SPARQL HTTP protocol).")]),t._v(" "),a("p",[t._v("For example, with POST:")]),t._v(" "),a("div",{staticClass:"language-http extra-class"},[a("pre",{pre:!0,attrs:{class:"language-http"}},[a("code",[t._v("POST http://localhost:8080/sparql\n"),a("span",{pre:!0,attrs:{class:"token header-name keyword"}},[t._v("Content-Type:")]),t._v(" application/sparql-query\n"),a("span",{pre:!0,attrs:{class:"token header-name keyword"}},[t._v("Accept:")]),t._v(" application/json\n\nPREFIX : \nSELECT DISTINCT ?teacher {\n ?teacher a :Teacher .\n}\n")])])]),a("h3",{attrs:{id:"using-curl-from-the-command-line"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-curl-from-the-command-line"}},[t._v("#")]),t._v(" Using cURL from the command line")]),t._v(" "),a("p",[t._v("The above request can be sent with the "),a("code",[t._v("cURL")]),t._v(" command:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("curl --request POST \\\n --url http://localhost:8080/sparql \\\n --header 'accept: application/json' \\\n --header 'content-type: application/sparql-query' \\\n --data 'PREFIX : SELECT DISTINCT ?teacher {?teacher a :Teacher .}'\n")])])]),a("h3",{attrs:{id:"using-a-sparql-client-library"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-a-sparql-client-library"}},[t._v("#")]),t._v(" Using a SPARQL client library")]),t._v(" "),a("p",[t._v("Alternatively, you may use one of the many "),a("a",{attrs:{href:"https://www.w3.org/wiki/SparqlImplementations",target:"_blank",rel:"noopener"}},[t._v("SPARQL clients"),a("OutboundLink")],1),t._v(" available for many programming and data analysis environments, as we demonstrate next "),a("a",{attrs:{href:"tutorial/interact/jupyter"}},[t._v("using the "),a("code",[t._v("SPARQLWrapper")]),t._v(" library within a Python Jupyter Notebook")]),t._v(".")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[85],{461:function(t,e,a){"use strict";a.r(e);var n=a(51),r=Object(n.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"interact-with-an-ontop-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#interact-with-an-ontop-sparql-endpoint"}},[t._v("#")]),t._v(" Interact with an Ontop SPARQL Endpoint")]),t._v(" "),a("p",[t._v("An Ontop Endpoint is accessible by the standard "),a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-protocol/",target:"_blank",rel:"noopener"}},[t._v("SPARQL HTTP protocol"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"url-of-the-ontop-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#url-of-the-ontop-sparql-endpoint"}},[t._v("#")]),t._v(" URL of the Ontop SPARQL Endpoint")]),t._v(" "),a("p",[t._v("When the endpoint is created by the Ontop CLI or Docker, the URL looks like\n"),a("code",[t._v("http://localhost:8080/sparql")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"sending-http-requests"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sending-http-requests"}},[t._v("#")]),t._v(" Sending HTTP Requests")]),t._v(" "),a("p",[t._v("You can use POST or GET requests carrying the SPARQL query to evaluate (as per SPARQL HTTP protocol).")]),t._v(" "),a("p",[t._v("For example, with POST:")]),t._v(" "),a("div",{staticClass:"language-http extra-class"},[a("pre",{pre:!0,attrs:{class:"language-http"}},[a("code",[t._v("POST http://localhost:8080/sparql\n"),a("span",{pre:!0,attrs:{class:"token header-name keyword"}},[t._v("Content-Type:")]),t._v(" application/sparql-query\n"),a("span",{pre:!0,attrs:{class:"token header-name keyword"}},[t._v("Accept:")]),t._v(" application/json\n\nPREFIX : \nSELECT DISTINCT ?teacher {\n ?teacher a :Teacher .\n}\n")])])]),a("h3",{attrs:{id:"using-curl-from-the-command-line"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-curl-from-the-command-line"}},[t._v("#")]),t._v(" Using cURL from the command line")]),t._v(" "),a("p",[t._v("The above request can be sent with the "),a("code",[t._v("cURL")]),t._v(" command:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("curl --request POST \\\n --url http://localhost:8080/sparql \\\n --header 'accept: application/json' \\\n --header 'content-type: application/sparql-query' \\\n --data 'PREFIX : SELECT DISTINCT ?teacher {?teacher a :Teacher .}'\n")])])]),a("h3",{attrs:{id:"using-a-sparql-client-library"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-a-sparql-client-library"}},[t._v("#")]),t._v(" Using a SPARQL client library")]),t._v(" "),a("p",[t._v("Alternatively, you may use one of the many "),a("a",{attrs:{href:"https://www.w3.org/wiki/SparqlImplementations",target:"_blank",rel:"noopener"}},[t._v("SPARQL clients"),a("OutboundLink")],1),t._v(" available for many programming and data analysis environments, as we demonstrate next "),a("a",{attrs:{href:"tutorial/interact/jupyter"}},[t._v("using the "),a("code",[t._v("SPARQLWrapper")]),t._v(" library within a Python Jupyter Notebook")]),t._v(".")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/88.08a33ec4.js b/assets/js/88.41f05188.js similarity index 99% rename from assets/js/88.08a33ec4.js rename to assets/js/88.41f05188.js index 6060fa8a5..8046694e6 100644 --- a/assets/js/88.08a33ec4.js +++ b/assets/js/88.41f05188.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[88],{465:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"basic-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#basic-lens"}},[t._v("#")]),t._v(" Basic Lens")]),t._v(" "),a("p",[t._v("Basic lenses can be used on one base relation, over which we can apply a filter, an extended projection, and additional constraints.")]),t._v(" "),a("h2",{attrs:{id:"projection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#projection"}},[t._v("#")]),t._v(" Projection")]),t._v(" "),a("p",[t._v("For this section, we first look at the table "),a("code",[t._v("museums")]),t._v(" from the DuckDB database. This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("address")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_income")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_spendings")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("ratings")]),t._v(" "),a("td",[t._v("array of floats")])])])]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("museum_id")]),t._v(" is a primary key.")]),t._v(" "),a("p",[t._v("Now, we make two decisions:")]),t._v(" "),a("ol",[a("li",[t._v("The "),a("code",[t._v("ratings")]),t._v(" column is not important to us, so we want to remove it.")]),t._v(" "),a("li",[t._v("The columns "),a("code",[t._v("yearly_income")]),t._v(" and "),a("code",[t._v("yearly_spendings")]),t._v(" are not interesting, but we would like to know the yearly profit ("),a("em",[t._v("income - spendings")]),t._v(")")])]),t._v(" "),a("p",[t._v("Both of these goals can be achieved using a single basic lens. The basic lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("We can prepare our "),a("code",[t._v("lenses.json")]),t._v(" file like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_projection"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ...\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As we do not require a filter, we do not need the field "),a("code",[t._v("filterExpression")]),t._v(".\nThe field "),a("code",[t._v("columns")]),t._v(" can be used to list existing columns that should be removed and new columns that should be added.")]),t._v(" "),a("p",[t._v("Above, we decided that the fields "),a("code",[t._v("ratings")]),t._v(", "),a("code",[t._v("yearly_income")]),t._v(" and "),a("code",[t._v("yearly_spendings")]),t._v(" are not interesting to us. We can easily hide them by including their names in the "),a("code",[t._v("hidden")]),t._v(" list.")]),t._v(" "),a("p",[t._v("To add a new "),a("code",[t._v("yearly_profit")]),t._v(" field, we have to add one entry to the "),a("code",[t._v("added")]),t._v(" list, using "),a("code",[t._v("yearly profit")]),t._v(" as its name, and using the expression "),a("code",[t._v("yearly_income - yearly_spendings")]),t._v(" in its "),a("code",[t._v("expression")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Even though we have decided to hide the columns "),a("code",[t._v("yearly_income")]),t._v(" and "),a("code",[t._v("yearly_spendings")]),t._v(", we can still use them for expressions within the same lens.")])]),t._v(" "),a("p",[t._v("After making these changes, the full "),a("code",[t._v("lenses.json")]),t._v(" file should look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_projection"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"yearly_profit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CAST(yearly_income - yearly_spendings as INTEGER)"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ratings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"yearly_income"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"yearly_spendings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("In the expression for "),a("code",[t._v("yearly_profit")]),t._v(", we cast the result of the subtraction to an "),a("code",[t._v("INTEGER")]),t._v(". This way, Ontop is guaranteed to know that the column will be of type "),a("code",[t._v("INTEGER")]),t._v(".")])]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now that we have created a basic lens to re-format the input table, we can use the lens in a mapping. For this, we start with the mapping template provided in the tutorial files. This template already contains basic mappings that define individuals of the classes "),a("code",[t._v(":Museum")]),t._v(" and "),a("code",[t._v(":Worker")]),t._v(".")]),t._v(" "),a("p",[t._v("We now want to set the "),a("code",[t._v(":yearlyProfit")]),t._v(" datatype property for all museums. We can achieve that by adding the following mapping:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-museum-profit\ntarget\t\tdata:museum/{museum_id} :yearlyProfit {yearly_profit} .\nsource\t\tSELECT museum_id, yearly_profit FROM lenses.museum_projection;\n")])])]),a("p",[t._v("After doing that, we can copy the "),a("code",[t._v("lenses.json")]),t._v(" and "),a("code",[t._v("mapping.obda")]),t._v(" files into the Ontop endpoint "),a("code",[t._v("input")]),t._v(" directory, as described in the "),a("RouterLink",{attrs:{to:"/tutorial/lenses/setup.html"}},[t._v("setup page")]),t._v(" and start the endpoint. Once the endpoint is started, we can open the SPARQL query editor at "),a("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080"),a("OutboundLink")],1),t._v(" and run the following query to test it:")],1),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?profit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museum")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Museum")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museum")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museum")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("yearlyProfit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?profit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If the lenses and mappings were constructed correctly, this query should return a list of museum names, together with different values for their yearly profit.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Notice how by changing the source query by adding "),a("code",[t._v("ratings")]),t._v(", "),a("code",[t._v("yearly_income")]),t._v(", or "),a("code",[t._v("yearly_spendings")]),t._v(" to it, the execution of the mapping fails, stating that the columns were not found. This is because they were hidden by the lens.")])]),t._v(" "),a("h2",{attrs:{id:"filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#filter"}},[t._v("#")]),t._v(" Filter")]),t._v(" "),a("p",[t._v("Another use case of basic lenses is to filter out some specific rows from the input table. As an example, we will look at the table "),a("code",[t._v("workers")]),t._v(". This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("worker_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("full_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("role")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("titles")]),t._v(" "),a("td",[t._v("array of strings")])]),t._v(" "),a("tr",[a("td",[t._v("access_level")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("worker_id")]),t._v(" is a primary key. The column "),a("code",[t._v("museum_id")]),t._v(" is a foreign key that references the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("role")]),t._v(" is a string that indicates the name of the worker's role. It can take the following three values: "),a("code",[t._v('"manager"')]),t._v(", "),a("code",[t._v('"guide"')]),t._v(", and "),a("code",[t._v('"guard"')]),t._v(". For our VKG, we decide that we want to designate all managers as individuals of the class "),a("code",[t._v(":Manager")]),t._v(". One way to achieve this is to use the filter feature of basic lenses.")]),t._v(" "),a("p",[t._v("We can prepare our "),a("code",[t._v("lenses.json")]),t._v(" file like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"managers_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The "),a("code",[t._v("columns")]),t._v(" field can be removed, as it is not required for this example. Now, we just need to define a value for the field "),a("code",[t._v("filterExpression")]),t._v(" that ignores all rows for which the column "),a("code",[t._v("role")]),t._v(" is not equal to "),a("code",[t._v('"manager"')]),t._v(". The "),a("code",[t._v("filterExpression")]),t._v(" is defined as a SQL expression in the same style as SQL "),a("code",[t._v("WHERE")]),t._v(" clauses.")]),t._v(" "),a("p",[t._v("After making this change, the full "),a("code",[t._v("lenses.json")]),t._v(" file should look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"managers_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"role = 'manager'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-2"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("We can once again use the generated lens in our mapping file. For this, we will again extend the mapping template with one new mapping:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-worker-managers\ntarget\t\tdata:worker/{worker_id} a :Manager .\nsource\t\tSELECT worker_id FROM lenses.managers_filter;\n")])])]),a("p",[t._v("Then, we start the Ontop endpoint and open the SPARQL editor to run the following query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Manager")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a list of "),a("em",[t._v("3")]),t._v(" manager names.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("All examples in the lens sections are compatible with each other. However, all lenses referenced in the mapping file need to be included in "),a("code",[t._v("lenses.json")]),t._v(". If you wish to continuously extend the mapping file throughout the tutorial,\nyou will also need to keep all previous lenses in the "),a("code",[t._v("relations")]),t._v(" list of the lenses file, otherwise, Ontop will throw an error. Alternatively, you can always start each of the sections from a new mapping template file. This way, only the lenses of the current exercise have to be included.")])]),t._v(" "),a("p",[t._v("As an extension to this exercise, you can now try to define similar lenses and mappings for the "),a("code",[t._v('"guide"')]),t._v(" and "),a("code",[t._v('"guard"')]),t._v(" roles, assigning them to the classes "),a("code",[t._v(":Guide")]),t._v(" and "),a("code",[t._v(":Guard")]),t._v(", respectively.")]),t._v(" "),a("h2",{attrs:{id:"adding-constraints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#adding-constraints"}},[t._v("#")]),t._v(" Adding Constraints")]),t._v(" "),a("p",[t._v("Another valuable feature of lenses is adding further constraints to relations. This feature is supported for "),a("strong",[t._v("all")]),t._v(" types of lenses, but we will cover it in this section only.")]),t._v(" "),a("p",[t._v("Generally, Ontop can infer many constraints from the base relation used by a lens. For instance, the field "),a("code",[t._v("museum_id")]),t._v(" in the table "),a("code",[t._v("museumS")]),t._v(" is a primary key, so it is "),a("em",[t._v("unique")]),t._v(" and "),a("em",[t._v("not null")]),t._v(". Our previously defined lens will be able to infer that the output relation is still unique and not null. On the other hand, for composite primary keys, if one part of the composite key is hidden by a lens, then Ontop knows that the remaining part is no longer guaranteed to be unique.")]),t._v(" "),a("p",[t._v("In many instances, however, expert knowledge can be used to define further constraints for lenses. A full list of all supported constraints and how they can be defined can be found in the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("documentation of lenses")]),t._v(".")],1),t._v(" "),a("p",[t._v("For this section, we want to use our expert knowledge of the table "),a("code",[t._v("workers")]),t._v(" to provide the following constraints:")]),t._v(" "),a("ol",[a("li",[t._v("The name of a worker is "),a("em",[t._v("unique")]),t._v(" and "),a("em",[t._v("not null")]),t._v(".")]),t._v(" "),a("li",[t._v("The role of a worker is "),a("em",[t._v("not null")])]),t._v(" "),a("li",[t._v("There is a functional dependency from "),a("em",[t._v("role")]),t._v(" to "),a("em",[t._v("access_level")]),t._v(".")]),t._v(" "),a("li",[t._v("The column "),a("code",[t._v("museum_id")]),t._v(" is a foreign key that references the table "),a("code",[t._v("museums")]),t._v(" (DuckDB does not have a notion of foreign keys, so it is useful to add it explicitly).")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v("role")]),t._v(" column is "),a("em",[t._v("IRI-safe")]),t._v(" (all possible values of the column can be safely included in an IRI without further encoding).")])]),t._v(" "),a("p",[t._v("We can create a basic lens over the table "),a("code",[t._v("workers")]),t._v(" to define these constraints, following the guidelines from the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("documentation of lenses")]),t._v(". A possible solution could look like this:")],1),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers_constraints"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uniqueConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"determinants"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"full_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nonNullConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"full_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"role"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"otherFunctionalDependencies"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"determinants"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"role"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"dependents"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"access_level"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"foreignKeys"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"fk"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"to"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museumS"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"iriSafeConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"role"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("strong",[t._v("Lenses can reference each other!")]),t._v(" As a further exercise, you can try using this newly created lens as the "),a("code",[t._v("baseRelation")]),t._v(" of the managers filter from before. Once that is done, you can query it again - the results should be the same as before.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("We could also have added all of these constraints to the same "),a("code",[t._v("managers_filter")]),t._v(" lens from the previous section to achieve the same results. This has the advantage of reducing the work required for the lens setup and reducing the total number of relations accessible by Ontop, but it is less flexible, as we would have to copy all the constraints to the "),a("code",[t._v("guides_filter")]),t._v(" and "),a("code",[t._v("guard_filter")]),t._v(" lenses as well, resulting in a lot of duplication.")]),t._v(" "),a("p",[t._v("Generally, the optimal solution depends on the specific scenario.")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[88],{466:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"basic-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#basic-lens"}},[t._v("#")]),t._v(" Basic Lens")]),t._v(" "),a("p",[t._v("Basic lenses can be used on one base relation, over which we can apply a filter, an extended projection, and additional constraints.")]),t._v(" "),a("h2",{attrs:{id:"projection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#projection"}},[t._v("#")]),t._v(" Projection")]),t._v(" "),a("p",[t._v("For this section, we first look at the table "),a("code",[t._v("museums")]),t._v(" from the DuckDB database. This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("address")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_income")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_spendings")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("ratings")]),t._v(" "),a("td",[t._v("array of floats")])])])]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("museum_id")]),t._v(" is a primary key.")]),t._v(" "),a("p",[t._v("Now, we make two decisions:")]),t._v(" "),a("ol",[a("li",[t._v("The "),a("code",[t._v("ratings")]),t._v(" column is not important to us, so we want to remove it.")]),t._v(" "),a("li",[t._v("The columns "),a("code",[t._v("yearly_income")]),t._v(" and "),a("code",[t._v("yearly_spendings")]),t._v(" are not interesting, but we would like to know the yearly profit ("),a("em",[t._v("income - spendings")]),t._v(")")])]),t._v(" "),a("p",[t._v("Both of these goals can be achieved using a single basic lens. The basic lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("We can prepare our "),a("code",[t._v("lenses.json")]),t._v(" file like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_projection"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ...\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As we do not require a filter, we do not need the field "),a("code",[t._v("filterExpression")]),t._v(".\nThe field "),a("code",[t._v("columns")]),t._v(" can be used to list existing columns that should be removed and new columns that should be added.")]),t._v(" "),a("p",[t._v("Above, we decided that the fields "),a("code",[t._v("ratings")]),t._v(", "),a("code",[t._v("yearly_income")]),t._v(" and "),a("code",[t._v("yearly_spendings")]),t._v(" are not interesting to us. We can easily hide them by including their names in the "),a("code",[t._v("hidden")]),t._v(" list.")]),t._v(" "),a("p",[t._v("To add a new "),a("code",[t._v("yearly_profit")]),t._v(" field, we have to add one entry to the "),a("code",[t._v("added")]),t._v(" list, using "),a("code",[t._v("yearly profit")]),t._v(" as its name, and using the expression "),a("code",[t._v("yearly_income - yearly_spendings")]),t._v(" in its "),a("code",[t._v("expression")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Even though we have decided to hide the columns "),a("code",[t._v("yearly_income")]),t._v(" and "),a("code",[t._v("yearly_spendings")]),t._v(", we can still use them for expressions within the same lens.")])]),t._v(" "),a("p",[t._v("After making these changes, the full "),a("code",[t._v("lenses.json")]),t._v(" file should look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_projection"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"yearly_profit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CAST(yearly_income - yearly_spendings as INTEGER)"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ratings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"yearly_income"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"yearly_spendings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("In the expression for "),a("code",[t._v("yearly_profit")]),t._v(", we cast the result of the subtraction to an "),a("code",[t._v("INTEGER")]),t._v(". This way, Ontop is guaranteed to know that the column will be of type "),a("code",[t._v("INTEGER")]),t._v(".")])]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now that we have created a basic lens to re-format the input table, we can use the lens in a mapping. For this, we start with the mapping template provided in the tutorial files. This template already contains basic mappings that define individuals of the classes "),a("code",[t._v(":Museum")]),t._v(" and "),a("code",[t._v(":Worker")]),t._v(".")]),t._v(" "),a("p",[t._v("We now want to set the "),a("code",[t._v(":yearlyProfit")]),t._v(" datatype property for all museums. We can achieve that by adding the following mapping:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-museum-profit\ntarget\t\tdata:museum/{museum_id} :yearlyProfit {yearly_profit} .\nsource\t\tSELECT museum_id, yearly_profit FROM lenses.museum_projection;\n")])])]),a("p",[t._v("After doing that, we can copy the "),a("code",[t._v("lenses.json")]),t._v(" and "),a("code",[t._v("mapping.obda")]),t._v(" files into the Ontop endpoint "),a("code",[t._v("input")]),t._v(" directory, as described in the "),a("RouterLink",{attrs:{to:"/tutorial/lenses/setup.html"}},[t._v("setup page")]),t._v(" and start the endpoint. Once the endpoint is started, we can open the SPARQL query editor at "),a("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080"),a("OutboundLink")],1),t._v(" and run the following query to test it:")],1),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?profit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museum")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Museum")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museum")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museum")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("yearlyProfit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?profit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If the lenses and mappings were constructed correctly, this query should return a list of museum names, together with different values for their yearly profit.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Notice how by changing the source query by adding "),a("code",[t._v("ratings")]),t._v(", "),a("code",[t._v("yearly_income")]),t._v(", or "),a("code",[t._v("yearly_spendings")]),t._v(" to it, the execution of the mapping fails, stating that the columns were not found. This is because they were hidden by the lens.")])]),t._v(" "),a("h2",{attrs:{id:"filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#filter"}},[t._v("#")]),t._v(" Filter")]),t._v(" "),a("p",[t._v("Another use case of basic lenses is to filter out some specific rows from the input table. As an example, we will look at the table "),a("code",[t._v("workers")]),t._v(". This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("worker_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("full_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("role")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("titles")]),t._v(" "),a("td",[t._v("array of strings")])]),t._v(" "),a("tr",[a("td",[t._v("access_level")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("worker_id")]),t._v(" is a primary key. The column "),a("code",[t._v("museum_id")]),t._v(" is a foreign key that references the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("role")]),t._v(" is a string that indicates the name of the worker's role. It can take the following three values: "),a("code",[t._v('"manager"')]),t._v(", "),a("code",[t._v('"guide"')]),t._v(", and "),a("code",[t._v('"guard"')]),t._v(". For our VKG, we decide that we want to designate all managers as individuals of the class "),a("code",[t._v(":Manager")]),t._v(". One way to achieve this is to use the filter feature of basic lenses.")]),t._v(" "),a("p",[t._v("We can prepare our "),a("code",[t._v("lenses.json")]),t._v(" file like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"managers_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The "),a("code",[t._v("columns")]),t._v(" field can be removed, as it is not required for this example. Now, we just need to define a value for the field "),a("code",[t._v("filterExpression")]),t._v(" that ignores all rows for which the column "),a("code",[t._v("role")]),t._v(" is not equal to "),a("code",[t._v('"manager"')]),t._v(". The "),a("code",[t._v("filterExpression")]),t._v(" is defined as a SQL expression in the same style as SQL "),a("code",[t._v("WHERE")]),t._v(" clauses.")]),t._v(" "),a("p",[t._v("After making this change, the full "),a("code",[t._v("lenses.json")]),t._v(" file should look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"managers_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"role = 'manager'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-2"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("We can once again use the generated lens in our mapping file. For this, we will again extend the mapping template with one new mapping:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-worker-managers\ntarget\t\tdata:worker/{worker_id} a :Manager .\nsource\t\tSELECT worker_id FROM lenses.managers_filter;\n")])])]),a("p",[t._v("Then, we start the Ontop endpoint and open the SPARQL editor to run the following query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Manager")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a list of "),a("em",[t._v("3")]),t._v(" manager names.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("All examples in the lens sections are compatible with each other. However, all lenses referenced in the mapping file need to be included in "),a("code",[t._v("lenses.json")]),t._v(". If you wish to continuously extend the mapping file throughout the tutorial,\nyou will also need to keep all previous lenses in the "),a("code",[t._v("relations")]),t._v(" list of the lenses file, otherwise, Ontop will throw an error. Alternatively, you can always start each of the sections from a new mapping template file. This way, only the lenses of the current exercise have to be included.")])]),t._v(" "),a("p",[t._v("As an extension to this exercise, you can now try to define similar lenses and mappings for the "),a("code",[t._v('"guide"')]),t._v(" and "),a("code",[t._v('"guard"')]),t._v(" roles, assigning them to the classes "),a("code",[t._v(":Guide")]),t._v(" and "),a("code",[t._v(":Guard")]),t._v(", respectively.")]),t._v(" "),a("h2",{attrs:{id:"adding-constraints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#adding-constraints"}},[t._v("#")]),t._v(" Adding Constraints")]),t._v(" "),a("p",[t._v("Another valuable feature of lenses is adding further constraints to relations. This feature is supported for "),a("strong",[t._v("all")]),t._v(" types of lenses, but we will cover it in this section only.")]),t._v(" "),a("p",[t._v("Generally, Ontop can infer many constraints from the base relation used by a lens. For instance, the field "),a("code",[t._v("museum_id")]),t._v(" in the table "),a("code",[t._v("museumS")]),t._v(" is a primary key, so it is "),a("em",[t._v("unique")]),t._v(" and "),a("em",[t._v("not null")]),t._v(". Our previously defined lens will be able to infer that the output relation is still unique and not null. On the other hand, for composite primary keys, if one part of the composite key is hidden by a lens, then Ontop knows that the remaining part is no longer guaranteed to be unique.")]),t._v(" "),a("p",[t._v("In many instances, however, expert knowledge can be used to define further constraints for lenses. A full list of all supported constraints and how they can be defined can be found in the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("documentation of lenses")]),t._v(".")],1),t._v(" "),a("p",[t._v("For this section, we want to use our expert knowledge of the table "),a("code",[t._v("workers")]),t._v(" to provide the following constraints:")]),t._v(" "),a("ol",[a("li",[t._v("The name of a worker is "),a("em",[t._v("unique")]),t._v(" and "),a("em",[t._v("not null")]),t._v(".")]),t._v(" "),a("li",[t._v("The role of a worker is "),a("em",[t._v("not null")])]),t._v(" "),a("li",[t._v("There is a functional dependency from "),a("em",[t._v("role")]),t._v(" to "),a("em",[t._v("access_level")]),t._v(".")]),t._v(" "),a("li",[t._v("The column "),a("code",[t._v("museum_id")]),t._v(" is a foreign key that references the table "),a("code",[t._v("museums")]),t._v(" (DuckDB does not have a notion of foreign keys, so it is useful to add it explicitly).")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v("role")]),t._v(" column is "),a("em",[t._v("IRI-safe")]),t._v(" (all possible values of the column can be safely included in an IRI without further encoding).")])]),t._v(" "),a("p",[t._v("We can create a basic lens over the table "),a("code",[t._v("workers")]),t._v(" to define these constraints, following the guidelines from the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("documentation of lenses")]),t._v(". A possible solution could look like this:")],1),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers_constraints"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uniqueConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"determinants"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"full_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nonNullConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"full_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"role"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"otherFunctionalDependencies"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"determinants"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"role"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"dependents"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"access_level"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"foreignKeys"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"fk"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"to"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museumS"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"iriSafeConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"role"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("strong",[t._v("Lenses can reference each other!")]),t._v(" As a further exercise, you can try using this newly created lens as the "),a("code",[t._v("baseRelation")]),t._v(" of the managers filter from before. Once that is done, you can query it again - the results should be the same as before.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("We could also have added all of these constraints to the same "),a("code",[t._v("managers_filter")]),t._v(" lens from the previous section to achieve the same results. This has the advantage of reducing the work required for the lens setup and reducing the total number of relations accessible by Ontop, but it is less flexible, as we would have to copy all the constraints to the "),a("code",[t._v("guides_filter")]),t._v(" and "),a("code",[t._v("guard_filter")]),t._v(" lenses as well, resulting in a lot of duplication.")]),t._v(" "),a("p",[t._v("Generally, the optimal solution depends on the specific scenario.")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/89.0134e7e6.js b/assets/js/89.bb41254d.js similarity index 99% rename from assets/js/89.0134e7e6.js rename to assets/js/89.bb41254d.js index 412a4166e..a32d80bf4 100644 --- a/assets/js/89.0134e7e6.js +++ b/assets/js/89.bb41254d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[89],{467:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"flatten-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#flatten-lens"}},[t._v("#")]),t._v(" Flatten Lens")]),t._v(" "),a("p",[a("em",[t._v("Flatten lenses are supported since 5.1.0.")])]),t._v(" "),a("p",[t._v('Flattening or unnesting an array is the process of transforming a nested array into an array of lower dimensionality, by "pulling" each nested entry into its "outer" entry. In databases, specifically, it represents a function that takes a column containing an array and transforms it into a table that has each of the '),a("em",[t._v("outer-most")]),t._v(" elements as one of its rows.")]),t._v(" "),a("p",[t._v("Flattening is need when we want to map values inside arrays.")]),t._v(" "),a("p",[t._v("In Ontop, a flatten lens is a type of lens over a single base relation that takes as an input the column that should be flattened, the names of columns that should be retained after flattening, and the name of the column that should be added containing the flattened output. Additionally, the name for a "),a("em",[t._v("position")]),t._v(" column can be passed to the lens. When flattening, the "),a("em",[t._v("position")]),t._v(" column will hold the index of the current row's flattened element in the original array.")]),t._v(" "),a("p",[t._v("For this example, we will first look at the table "),a("code",[t._v("workers")]),t._v(". This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("worker_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("full_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("role")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("titles")]),t._v(" "),a("td",[t._v("array of strings")])]),t._v(" "),a("tr",[a("td",[t._v("access_level")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("titles")]),t._v(" is an array of strings that contains all the degrees and titles the employee has received. Our goal is to populate the datatype properties "),a("code",[t._v(":hasTitle")]),t._v(" defined from the "),a("code",[t._v(":Worker")]),t._v(" class to any number of string literals taken from the table, and "),a("code",[t._v(":preferredTitle")]),t._v(", defined from the "),a("code",[t._v(":Worker")]),t._v(" class to a single literal, which is the first entry of the "),a("code",[t._v("titles")]),t._v(" array. To do so efficiently, we need to flatten the "),a("code",[t._v("titles")]),t._v(" column.")]),t._v(" "),a("p",[t._v("The flatten lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"flattenedColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"datatype"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"kept"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"new"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"position"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FlattenLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The field "),a("code",[t._v("kept")]),t._v(" takes a list of column names from the original table that should be retained after flattening. The field "),a("code",[t._v("new")]),t._v(" takes the name of the column that contains the flattened output and the field "),a("code",[t._v("position")]),t._v(" takes the name of the column that contains the index of the current output. The flattened column takes two arguments: "),a("code",[t._v("name")]),t._v(" determines the name of the column that should be flattened, and "),a("code",[t._v("datatype")]),t._v(" indicates the column's type. Depending on the SQL dialect, this can vary from "),a("code",[t._v("ARRAY")]),t._v(" or "),a("code",[t._v("T[]")]),t._v(" where "),a("code",[t._v("T")]),t._v(" is a different SQL data type to "),a("code",[t._v("JSON")]),t._v(" or "),a("code",[t._v("VARCHAR")]),t._v(" if arrays are represented and flattened in JSON format.")]),t._v(" "),a("p",[t._v("In DuckDB, the array data type is defined as "),a("code",[t._v("T[]")]),t._v(", so in our specific case, the field "),a("code",[t._v("datatype")]),t._v(" will take the value "),a("code",[t._v("STRING[]")]),t._v(".")]),t._v(" "),a("p",[t._v("A possible "),a("code",[t._v("lenses.json")]),t._v(" file for this task may look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"flattened_titles"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"flattenedColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"titles"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"datatype"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"STRING[]"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"kept"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"worker_id"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"new"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"position"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As we just need to assign a title to a "),a("code",[t._v(":Worker")]),t._v(" individual, the only column that has to be kept is "),a("code",[t._v("worker_id")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now, we can already define the mapping entries for the wanted properties:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-has-title\ntarget\t\tdata:worker/{worker_id} :hasTitle {title} .\nsource\t\tSELECT worker_id, title FROM lenses.flattened_titles;\n\nmappingId\tMAPID-preferred-title\ntarget\t\tdata:worker/{worker_id} :preferredTitle {title} .\nsource\t\tSELECT worker_id, title FROM lenses.flattened_titles WHERE index = 1;\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Instead of using a source query with a "),a("code",[t._v("WHERE")]),t._v(" condition in the second mapping, we could also wrap a basic lens around the flatten lens that performs the filter operation, but we kept it like this for the sake of simplicity.")])]),t._v(" "),a("p",[t._v("Let us now run a SPARQL query over the Ontop endpoint to test our mappings and lenses.")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?title")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prefTitle")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Worker")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasTitle")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?title")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("preferredTitle")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prefTitle")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a list of all employees, together with their titles and their preferred title.")]),t._v(" "),a("h3",{attrs:{id:"flattening-other-types-of-arrays"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#flattening-other-types-of-arrays"}},[t._v("#")]),t._v(" Flattening other types of arrays")]),t._v(" "),a("p",[t._v("The flatten lens works on all types of arrays, and, depending on the capabilities of the dialect, can infer the output type of the flattened column. As a further exercise, try looking at the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("address")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_income")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_spendings")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("ratings")]),t._v(" "),a("td",[t._v("array of floats")])])])]),t._v(" "),a("p",[t._v("The field "),a("code",[t._v("ratings")]),t._v(" is an array of floating point numbers between 1 and 10. Try creating a flatten lens that can unnest this array to populate the datatype property "),a("code",[t._v(":hasRating")]),t._v("! Ontop will be able to automatically detect that the flattened column has the type "),a("code",[t._v("FLOAT")]),t._v('. Keep in mind that we do not necessarily need a "position" column for this use case.')]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("When arrays in a given dialect are defined as "),a("code",[t._v("ARRAY")]),t._v(", "),a("code",[t._v("T[]")]),t._v(", or similarly, Ontop is able to infer the data type of the output column after flattening. However, when this is not the case (either the array was provided as JSON or the array data type of the dialect is simply called "),a("code",[t._v("ARRAY")]),t._v(" or similarly), Ontop cannot perform this inference. In those cases, it is suggested to put a basic lens over the flatten lens that explicitly performs a "),a("code",[t._v("CAST")]),t._v(" on the output, to allow Ontop to know the column type once again.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("The level of support for the flatten lens depends strongly on the dialect. Please consult the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("flatten lens documentation page")]),t._v(" for more info on each supported dialect.")],1)])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[89],{465:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"flatten-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#flatten-lens"}},[t._v("#")]),t._v(" Flatten Lens")]),t._v(" "),a("p",[a("em",[t._v("Flatten lenses are supported since 5.1.0.")])]),t._v(" "),a("p",[t._v('Flattening or unnesting an array is the process of transforming a nested array into an array of lower dimensionality, by "pulling" each nested entry into its "outer" entry. In databases, specifically, it represents a function that takes a column containing an array and transforms it into a table that has each of the '),a("em",[t._v("outer-most")]),t._v(" elements as one of its rows.")]),t._v(" "),a("p",[t._v("Flattening is need when we want to map values inside arrays.")]),t._v(" "),a("p",[t._v("In Ontop, a flatten lens is a type of lens over a single base relation that takes as an input the column that should be flattened, the names of columns that should be retained after flattening, and the name of the column that should be added containing the flattened output. Additionally, the name for a "),a("em",[t._v("position")]),t._v(" column can be passed to the lens. When flattening, the "),a("em",[t._v("position")]),t._v(" column will hold the index of the current row's flattened element in the original array.")]),t._v(" "),a("p",[t._v("For this example, we will first look at the table "),a("code",[t._v("workers")]),t._v(". This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("worker_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("full_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("role")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("titles")]),t._v(" "),a("td",[t._v("array of strings")])]),t._v(" "),a("tr",[a("td",[t._v("access_level")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The column "),a("code",[t._v("titles")]),t._v(" is an array of strings that contains all the degrees and titles the employee has received. Our goal is to populate the datatype properties "),a("code",[t._v(":hasTitle")]),t._v(" defined from the "),a("code",[t._v(":Worker")]),t._v(" class to any number of string literals taken from the table, and "),a("code",[t._v(":preferredTitle")]),t._v(", defined from the "),a("code",[t._v(":Worker")]),t._v(" class to a single literal, which is the first entry of the "),a("code",[t._v("titles")]),t._v(" array. To do so efficiently, we need to flatten the "),a("code",[t._v("titles")]),t._v(" column.")]),t._v(" "),a("p",[t._v("The flatten lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"flattenedColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"datatype"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"kept"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"new"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"position"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FlattenLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The field "),a("code",[t._v("kept")]),t._v(" takes a list of column names from the original table that should be retained after flattening. The field "),a("code",[t._v("new")]),t._v(" takes the name of the column that contains the flattened output and the field "),a("code",[t._v("position")]),t._v(" takes the name of the column that contains the index of the current output. The flattened column takes two arguments: "),a("code",[t._v("name")]),t._v(" determines the name of the column that should be flattened, and "),a("code",[t._v("datatype")]),t._v(" indicates the column's type. Depending on the SQL dialect, this can vary from "),a("code",[t._v("ARRAY")]),t._v(" or "),a("code",[t._v("T[]")]),t._v(" where "),a("code",[t._v("T")]),t._v(" is a different SQL data type to "),a("code",[t._v("JSON")]),t._v(" or "),a("code",[t._v("VARCHAR")]),t._v(" if arrays are represented and flattened in JSON format.")]),t._v(" "),a("p",[t._v("In DuckDB, the array data type is defined as "),a("code",[t._v("T[]")]),t._v(", so in our specific case, the field "),a("code",[t._v("datatype")]),t._v(" will take the value "),a("code",[t._v("STRING[]")]),t._v(".")]),t._v(" "),a("p",[t._v("A possible "),a("code",[t._v("lenses.json")]),t._v(" file for this task may look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"flattened_titles"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"flattenedColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"titles"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"datatype"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"STRING[]"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"kept"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"worker_id"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"new"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"position"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As we just need to assign a title to a "),a("code",[t._v(":Worker")]),t._v(" individual, the only column that has to be kept is "),a("code",[t._v("worker_id")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now, we can already define the mapping entries for the wanted properties:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-has-title\ntarget\t\tdata:worker/{worker_id} :hasTitle {title} .\nsource\t\tSELECT worker_id, title FROM lenses.flattened_titles;\n\nmappingId\tMAPID-preferred-title\ntarget\t\tdata:worker/{worker_id} :preferredTitle {title} .\nsource\t\tSELECT worker_id, title FROM lenses.flattened_titles WHERE index = 1;\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Instead of using a source query with a "),a("code",[t._v("WHERE")]),t._v(" condition in the second mapping, we could also wrap a basic lens around the flatten lens that performs the filter operation, but we kept it like this for the sake of simplicity.")])]),t._v(" "),a("p",[t._v("Let us now run a SPARQL query over the Ontop endpoint to test our mappings and lenses.")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?title")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prefTitle")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Worker")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasTitle")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?title")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("preferredTitle")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prefTitle")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a list of all employees, together with their titles and their preferred title.")]),t._v(" "),a("h3",{attrs:{id:"flattening-other-types-of-arrays"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#flattening-other-types-of-arrays"}},[t._v("#")]),t._v(" Flattening other types of arrays")]),t._v(" "),a("p",[t._v("The flatten lens works on all types of arrays, and, depending on the capabilities of the dialect, can infer the output type of the flattened column. As a further exercise, try looking at the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("address")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_income")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_spendings")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("ratings")]),t._v(" "),a("td",[t._v("array of floats")])])])]),t._v(" "),a("p",[t._v("The field "),a("code",[t._v("ratings")]),t._v(" is an array of floating point numbers between 1 and 10. Try creating a flatten lens that can unnest this array to populate the datatype property "),a("code",[t._v(":hasRating")]),t._v("! Ontop will be able to automatically detect that the flattened column has the type "),a("code",[t._v("FLOAT")]),t._v('. Keep in mind that we do not necessarily need a "position" column for this use case.')]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("When arrays in a given dialect are defined as "),a("code",[t._v("ARRAY")]),t._v(", "),a("code",[t._v("T[]")]),t._v(", or similarly, Ontop is able to infer the data type of the output column after flattening. However, when this is not the case (either the array was provided as JSON or the array data type of the dialect is simply called "),a("code",[t._v("ARRAY")]),t._v(" or similarly), Ontop cannot perform this inference. In those cases, it is suggested to put a basic lens over the flatten lens that explicitly performs a "),a("code",[t._v("CAST")]),t._v(" on the output, to allow Ontop to know the column type once again.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("The level of support for the flatten lens depends strongly on the dialect. Please consult the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("flatten lens documentation page")]),t._v(" for more info on each supported dialect.")],1)])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/90.70a0ab80.js b/assets/js/90.ebfcdd76.js similarity index 99% rename from assets/js/90.70a0ab80.js rename to assets/js/90.ebfcdd76.js index 02ba9ceca..4f6ddc1a0 100644 --- a/assets/js/90.70a0ab80.js +++ b/assets/js/90.ebfcdd76.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[90],{466:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"join-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#join-lens"}},[t._v("#")]),t._v(" Join Lens")]),t._v(" "),a("p",[t._v("Join lenses can be used to combine multiple relations into one. Additionally, a filter expression can be provided as a join condition.")]),t._v(" "),a("p",[t._v("For this example, we will look at the tables "),a("code",[t._v("museums")]),t._v(" and "),a("code",[t._v("workers")]),t._v(" from the DuckDB database. For each individual of the "),a("code",[t._v(":Worker")]),t._v(" class, we want to set its property "),a("code",[t._v(":workAddress")]),t._v(" to the address of the museum they work at.\nThe tables have the following schemas:")]),t._v(" "),a("p",[a("em",[t._v("museums")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("address")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_income")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_spendings")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("ratings")]),t._v(" "),a("td",[t._v("array of floats")])])])]),t._v(" "),a("p",[a("em",[t._v("workers")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("worker_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("full_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("role")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("titles")]),t._v(" "),a("td",[t._v("array of strings")])]),t._v(" "),a("tr",[a("td",[t._v("access_level")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("Notably, the table "),a("code",[t._v("workers")]),t._v(" has the column "),a("code",[t._v("museum_id")]),t._v(" which references the primary key of the table "),a("code",[t._v("museums")]),t._v(". In SQL, we can run a "),a("code",[t._v("JOIN")]),t._v(" query over these two tables to combine all rows of "),a("code",[t._v("worker")]),t._v(" with their corresponding museums. In Ontop, we can instead create a join lens, that can be referenced by the mapping.")]),t._v(" "),a("p",[t._v("The join lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"join"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columnPrefixes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JoinLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The "),a("code",[t._v("join")]),t._v(" field takes an object consisting of a list of relation references and a list of "),a("em",[t._v("column prefixes")]),t._v(". For each relation, its corresponding column prefix will be prepended to the names of all of its columns.")]),t._v(" "),a("p",[t._v("The fields "),a("code",[t._v("columns")]),t._v(" and "),a("code",[t._v("filterExpression")]),t._v(" work exactly the way they worked for "),a("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("basic lenses")]),t._v(", with the only reference being that now, column names have to be combined with the individual relation's prefix when referencing them in expressions.")],1),t._v(" "),a("p",[t._v("In this example, the relations we use are "),a("code",[t._v("museums")]),t._v(" and "),a("code",[t._v("workers")]),t._v(", and we choose the prefixes "),a("code",[t._v("m_")]),t._v(" and "),a("code",[t._v("w_")]),t._v(" for them respectively. Since we want to perform a "),a("code",[t._v("JOIN")]),t._v(" operation, rather than a cross-product, we also have to supply the filter expression "),a("code",[t._v("m_museum_id = w_museum_id")]),t._v(". After including these values, the "),a("code",[t._v("lenses.json")]),t._v(" file should look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums_workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"join"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columnPrefixes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_museum_id = w_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JoinLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The only remaining field is "),a("code",[t._v("columns")]),t._v(". As mentioned earlier, this field is handled analogously to the basic lens "),a("code",[t._v("columns")]),t._v(" field, allowing the user to add and remove specific columns. For this example, we want to set the property "),a("code",[t._v(":workAddress")]),t._v(" for each "),a("code",[t._v(":Worker")]),t._v(" individual. Because of that, we only require the column "),a("code",[t._v("worker_id")]),t._v(" from "),a("code",[t._v("workers")]),t._v(" and "),a("code",[t._v("address")]),t._v(" from "),a("code",[t._v("museums")]),t._v(" - all other columns can be hidden, and no column has to be added:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"join"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columnPrefixes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_yearly_income"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_yearly_spendings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_ratings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_full_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_role"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_titles"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_access_level"')]),t._v(" \n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_museum_id = w_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JoinLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now that the lens file is created, we can construct our mapping. For this, we once again start from the mapping template file provided with the tutorial files.")]),t._v(" "),a("p",[t._v("We can add a mapping entry to it, referencing the newly created lens.")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-museum-worker-address\ntarget\t\tdata:worker/{w_worker_id} :workAddress {m_address} .\nsource\t\tSELECT w_worker_id, m_address FROM lenses.museum_workers;\n")])])]),a("p",[t._v("Now, we can test the lens and mapping, by copying the corresponding files to the Ontop endpoint directory and running the following query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?address")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Worker")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("workAddress")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?address")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If everything was prepared correctly, this should result in a list of employee names, together with the address of the museum they work at.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[90],{467:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"join-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#join-lens"}},[t._v("#")]),t._v(" Join Lens")]),t._v(" "),a("p",[t._v("Join lenses can be used to combine multiple relations into one. Additionally, a filter expression can be provided as a join condition.")]),t._v(" "),a("p",[t._v("For this example, we will look at the tables "),a("code",[t._v("museums")]),t._v(" and "),a("code",[t._v("workers")]),t._v(" from the DuckDB database. For each individual of the "),a("code",[t._v(":Worker")]),t._v(" class, we want to set its property "),a("code",[t._v(":workAddress")]),t._v(" to the address of the museum they work at.\nThe tables have the following schemas:")]),t._v(" "),a("p",[a("em",[t._v("museums")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("address")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_income")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("yearly_spendings")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("ratings")]),t._v(" "),a("td",[t._v("array of floats")])])])]),t._v(" "),a("p",[a("em",[t._v("workers")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("worker_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("full_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("role")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("titles")]),t._v(" "),a("td",[t._v("array of strings")])]),t._v(" "),a("tr",[a("td",[t._v("access_level")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("Notably, the table "),a("code",[t._v("workers")]),t._v(" has the column "),a("code",[t._v("museum_id")]),t._v(" which references the primary key of the table "),a("code",[t._v("museums")]),t._v(". In SQL, we can run a "),a("code",[t._v("JOIN")]),t._v(" query over these two tables to combine all rows of "),a("code",[t._v("worker")]),t._v(" with their corresponding museums. In Ontop, we can instead create a join lens, that can be referenced by the mapping.")]),t._v(" "),a("p",[t._v("The join lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"join"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columnPrefixes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JoinLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The "),a("code",[t._v("join")]),t._v(" field takes an object consisting of a list of relation references and a list of "),a("em",[t._v("column prefixes")]),t._v(". For each relation, its corresponding column prefix will be prepended to the names of all of its columns.")]),t._v(" "),a("p",[t._v("The fields "),a("code",[t._v("columns")]),t._v(" and "),a("code",[t._v("filterExpression")]),t._v(" work exactly the way they worked for "),a("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("basic lenses")]),t._v(", with the only reference being that now, column names have to be combined with the individual relation's prefix when referencing them in expressions.")],1),t._v(" "),a("p",[t._v("In this example, the relations we use are "),a("code",[t._v("museums")]),t._v(" and "),a("code",[t._v("workers")]),t._v(", and we choose the prefixes "),a("code",[t._v("m_")]),t._v(" and "),a("code",[t._v("w_")]),t._v(" for them respectively. Since we want to perform a "),a("code",[t._v("JOIN")]),t._v(" operation, rather than a cross-product, we also have to supply the filter expression "),a("code",[t._v("m_museum_id = w_museum_id")]),t._v(". After including these values, the "),a("code",[t._v("lenses.json")]),t._v(" file should look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums_workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"join"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columnPrefixes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_museum_id = w_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JoinLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The only remaining field is "),a("code",[t._v("columns")]),t._v(". As mentioned earlier, this field is handled analogously to the basic lens "),a("code",[t._v("columns")]),t._v(" field, allowing the user to add and remove specific columns. For this example, we want to set the property "),a("code",[t._v(":workAddress")]),t._v(" for each "),a("code",[t._v(":Worker")]),t._v(" individual. Because of that, we only require the column "),a("code",[t._v("worker_id")]),t._v(" from "),a("code",[t._v("workers")]),t._v(" and "),a("code",[t._v("address")]),t._v(" from "),a("code",[t._v("museums")]),t._v(" - all other columns can be hidden, and no column has to be added:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museum_workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"join"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"museums"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workers"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columnPrefixes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_yearly_income"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_yearly_spendings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_ratings"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_full_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_role"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_titles"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w_access_level"')]),t._v(" \n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filterExpression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m_museum_id = w_museum_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JoinLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now that the lens file is created, we can construct our mapping. For this, we once again start from the mapping template file provided with the tutorial files.")]),t._v(" "),a("p",[t._v("We can add a mapping entry to it, referencing the newly created lens.")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-museum-worker-address\ntarget\t\tdata:worker/{w_worker_id} :workAddress {m_address} .\nsource\t\tSELECT w_worker_id, m_address FROM lenses.museum_workers;\n")])])]),a("p",[t._v("Now, we can test the lens and mapping, by copying the corresponding files to the Ontop endpoint directory and running the following query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?address")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Worker")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?worker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("workAddress")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?address")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If everything was prepared correctly, this should result in a list of employee names, together with the address of the museum they work at.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/91.2521efc8.js b/assets/js/91.df2955b2.js similarity index 99% rename from assets/js/91.2521efc8.js rename to assets/js/91.df2955b2.js index 4ebf9a5a1..f31e45455 100644 --- a/assets/js/91.2521efc8.js +++ b/assets/js/91.df2955b2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[91],{471:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"database-and-ontop-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-and-ontop-setup"}},[t._v("#")]),t._v(" Database and Ontop Setup")]),t._v(" "),a("p",[t._v("In this tutorial, we run a "),a("a",{attrs:{href:"duckdb.org"}},[a("em",[t._v("DuckDB")])]),t._v(" database of museums that includes information about the museums themselves, their employees and their exhibits.")]),t._v(" "),a("h2",{attrs:{id:"database-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-setup"}},[t._v("#")]),t._v(" Database setup")]),t._v(" "),a("p",[t._v("Procedure to set up the datebase for the following exercises:")]),t._v(" "),a("ol",[a("li",[t._v("Unzip the archive of DuckDB "),a("a",{attrs:{href:"../duckdb.zip"}},[a("em",[t._v("(duckdb.zip)")])]),t._v(".")]),t._v(" "),a("li",[t._v("That's it! The "),a("em",[t._v("data")]),t._v(" directory contains the already prepared databases, compatible with "),a("em",[t._v("DuckDB version 0.7.1")]),t._v(".\n"),a("ul",[a("li",[t._v("If you want to have a first look at the database, you can open it with the DuckDB client application that can be downloaded from the "),a("a",{attrs:{href:"https://duckdb.org/#quickinstall",target:"_blank",rel:"noopener"}},[t._v("official site"),a("OutboundLink")],1),t._v(".")])])])]),t._v(" "),a("h2",{attrs:{id:"ontop-sparql-endpoint-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-sparql-endpoint-setup"}},[t._v("#")]),t._v(" Ontop SPARQL endpoint setup")]),t._v(" "),a("p",[t._v("For this tutorial, we use a SPARQL endpoint provided by ontop to test our mappings and lenses. Here, we walk through the preparation of the endpoint via "),a("em",[t._v("Ontop CLI")]),t._v(", but a docker-image-based endpoint can be created in a similar fashion, as explained in the "),a("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("endpoint tutorial")]),t._v(".")],1),t._v(" "),a("ol",[a("li",[t._v("Download "),a("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Ontop CLI"),a("OutboundLink")],1),t._v(" and unzip it to a directory, which is denoted as "),a("code",[t._v("$ONTOP_CLI_DIR")]),t._v(" below.")]),t._v(" "),a("li",[t._v("Copy the DuckDB jdbc driver to "),a("code",[t._v("$ONTOP_CLI_DIR/jdbc")]),t._v(" from the "),a("em",[t._v("duckdb.zip")]),t._v(" archive.")]),t._v(" "),a("li",[t._v("Copy the directory "),a("code",[t._v("data")]),t._v(" containing the database file "),a("code",[t._v("data/tutorial.db")]),t._v(" into "),a("code",[t._v("$ONTOP_CLI_DIR")]),t._v(".")]),t._v(" "),a("li",[t._v("Paste your "),a("em",[t._v("mapping")]),t._v(" and "),a("em",[t._v("lenses")]),t._v(" files, as well as the "),a("em",[t._v("ontology")]),t._v(" and "),a("em",[t._v("properties")]),t._v(" files into a new directory called "),a("code",[t._v("input")]),t._v(" inside of "),a("code",[t._v("$ONTOP_CLI")]),t._v(".\n"),a("ul",[a("li",[t._v("You will create the "),a("em",[t._v("mapping")]),t._v(" and "),a("em",[t._v("lenses")]),t._v(" files throughout the course of this tutorial. Alternatively, the "),a("em",[t._v("duckdb.zip")]),t._v(" archive contains one directory for each of the lens tutorials, with sample mappings and lenses already pre-made.")]),t._v(" "),a("li",[t._v("The "),a("em",[t._v("ontology")]),t._v(" and "),a("em",[t._v("properties")]),t._v(" files will be the same throughout all tutorials. They are already provided in the "),a("em",[t._v("duckdb.zip")]),t._v(" archive.")])])]),t._v(" "),a("li",[t._v("Start the Ontop endpoint. On Mac/Linux:")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$ONTOP_CLI_DIR")]),t._v("/ontop endpoint "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --ontology"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/ontology.ttl "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --mapping"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/mapping.obda "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --lenses"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/lenses.json "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/duckdb.properties "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --cors-allowed-origins"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("http://yasgui.org "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if needed")]),t._v("\n")])])]),a("p",[t._v("On Windows:")]),t._v(" "),a("div",{staticClass:"language-batch extra-class"},[a("pre",{pre:!0,attrs:{class:"language-batch"}},[a("code",[a("span",{pre:!0,attrs:{class:"token command"}},[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ontop")]),t._v(" endpoint "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--ontology")]),t._v("=input/ontology.ttl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--mapping")]),t._v("=input/mapping.obda "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--lenses")]),t._v("=input/lenses.json "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--properties")]),t._v("=input/duckdb.properties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--cors-allowed-origins")]),t._v("=http://yasgui.org ")]),t._v("\n")])])]),a("ol",{attrs:{start:"6"}},[a("li",[t._v("Open the web interface of the SPARQL endpoint to try some queries:\n"),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1)])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[91],{468:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"database-and-ontop-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-and-ontop-setup"}},[t._v("#")]),t._v(" Database and Ontop Setup")]),t._v(" "),a("p",[t._v("In this tutorial, we run a "),a("a",{attrs:{href:"duckdb.org"}},[a("em",[t._v("DuckDB")])]),t._v(" database of museums that includes information about the museums themselves, their employees and their exhibits.")]),t._v(" "),a("h2",{attrs:{id:"database-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-setup"}},[t._v("#")]),t._v(" Database setup")]),t._v(" "),a("p",[t._v("Procedure to set up the datebase for the following exercises:")]),t._v(" "),a("ol",[a("li",[t._v("Unzip the archive of DuckDB "),a("a",{attrs:{href:"../duckdb.zip"}},[a("em",[t._v("(duckdb.zip)")])]),t._v(".")]),t._v(" "),a("li",[t._v("That's it! The "),a("em",[t._v("data")]),t._v(" directory contains the already prepared databases, compatible with "),a("em",[t._v("DuckDB version 0.7.1")]),t._v(".\n"),a("ul",[a("li",[t._v("If you want to have a first look at the database, you can open it with the DuckDB client application that can be downloaded from the "),a("a",{attrs:{href:"https://duckdb.org/#quickinstall",target:"_blank",rel:"noopener"}},[t._v("official site"),a("OutboundLink")],1),t._v(".")])])])]),t._v(" "),a("h2",{attrs:{id:"ontop-sparql-endpoint-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-sparql-endpoint-setup"}},[t._v("#")]),t._v(" Ontop SPARQL endpoint setup")]),t._v(" "),a("p",[t._v("For this tutorial, we use a SPARQL endpoint provided by ontop to test our mappings and lenses. Here, we walk through the preparation of the endpoint via "),a("em",[t._v("Ontop CLI")]),t._v(", but a docker-image-based endpoint can be created in a similar fashion, as explained in the "),a("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("endpoint tutorial")]),t._v(".")],1),t._v(" "),a("ol",[a("li",[t._v("Download "),a("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Ontop CLI"),a("OutboundLink")],1),t._v(" and unzip it to a directory, which is denoted as "),a("code",[t._v("$ONTOP_CLI_DIR")]),t._v(" below.")]),t._v(" "),a("li",[t._v("Copy the DuckDB jdbc driver to "),a("code",[t._v("$ONTOP_CLI_DIR/jdbc")]),t._v(" from the "),a("em",[t._v("duckdb.zip")]),t._v(" archive.")]),t._v(" "),a("li",[t._v("Copy the directory "),a("code",[t._v("data")]),t._v(" containing the database file "),a("code",[t._v("data/tutorial.db")]),t._v(" into "),a("code",[t._v("$ONTOP_CLI_DIR")]),t._v(".")]),t._v(" "),a("li",[t._v("Paste your "),a("em",[t._v("mapping")]),t._v(" and "),a("em",[t._v("lenses")]),t._v(" files, as well as the "),a("em",[t._v("ontology")]),t._v(" and "),a("em",[t._v("properties")]),t._v(" files into a new directory called "),a("code",[t._v("input")]),t._v(" inside of "),a("code",[t._v("$ONTOP_CLI")]),t._v(".\n"),a("ul",[a("li",[t._v("You will create the "),a("em",[t._v("mapping")]),t._v(" and "),a("em",[t._v("lenses")]),t._v(" files throughout the course of this tutorial. Alternatively, the "),a("em",[t._v("duckdb.zip")]),t._v(" archive contains one directory for each of the lens tutorials, with sample mappings and lenses already pre-made.")]),t._v(" "),a("li",[t._v("The "),a("em",[t._v("ontology")]),t._v(" and "),a("em",[t._v("properties")]),t._v(" files will be the same throughout all tutorials. They are already provided in the "),a("em",[t._v("duckdb.zip")]),t._v(" archive.")])])]),t._v(" "),a("li",[t._v("Start the Ontop endpoint. On Mac/Linux:")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$ONTOP_CLI_DIR")]),t._v("/ontop endpoint "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --ontology"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/ontology.ttl "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --mapping"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/mapping.obda "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --lenses"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/lenses.json "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("input/duckdb.properties "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --cors-allowed-origins"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("http://yasgui.org "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# if needed")]),t._v("\n")])])]),a("p",[t._v("On Windows:")]),t._v(" "),a("div",{staticClass:"language-batch extra-class"},[a("pre",{pre:!0,attrs:{class:"language-batch"}},[a("code",[a("span",{pre:!0,attrs:{class:"token command"}},[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ontop")]),t._v(" endpoint "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--ontology")]),t._v("=input/ontology.ttl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--mapping")]),t._v("=input/mapping.obda "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--lenses")]),t._v("=input/lenses.json "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--properties")]),t._v("=input/duckdb.properties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("^")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token parameter attr-name"}},[t._v("--cors-allowed-origins")]),t._v("=http://yasgui.org ")]),t._v("\n")])])]),a("ol",{attrs:{start:"6"}},[a("li",[t._v("Open the web interface of the SPARQL endpoint to try some queries:\n"),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1)])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/93.5961af36.js b/assets/js/93.345dfe74.js similarity index 99% rename from assets/js/93.5961af36.js rename to assets/js/93.345dfe74.js index 2352c37e1..271af381d 100644 --- a/assets/js/93.5961af36.js +++ b/assets/js/93.345dfe74.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{468:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"union-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#union-lens"}},[t._v("#")]),t._v(" Union Lens")]),t._v(" "),a("p",[a("em",[t._v("Union lenses will be supported starting with version 5.1.0 (beta).")])]),t._v(" "),a("p",[t._v("Union lenses can be used to concatenate multiple relations with the same schema into one. Additionally, a "),a("em",[t._v("provenance")]),t._v(" field can be added to each row, determining the source relation the row originates from.")]),t._v(" "),a("p",[t._v("For this example, we will look at the tables "),a("code",[t._v("nature_exhibits")]),t._v(", "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("art_exhibits")]),t._v(" from the DuckDB database. We want to combine them into a single relation containing all exhibits.")]),t._v(" "),a("p",[t._v("The tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The table "),a("code",[t._v("art_exhibits")]),t._v(" has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("artist_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("For each table, "),a("code",[t._v("exhibit_id")]),t._v(" is a primary key and "),a("code",[t._v("museum_id")]),t._v(" is a foreign key, referencing the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"relations-with-the-same-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-the-same-schema"}},[t._v("#")]),t._v(" Relations with the same schema")]),t._v(" "),a("p",[t._v("This concatenation can be achieved using a union lens. However, as all base relations of a union lens must have the exact same columns, we will only be working on the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" at first.")]),t._v(" "),a("p",[t._v("The union lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" boolean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Here, "),a("code",[t._v("unionRelations")]),t._v(" is a list of relations that should be concatenated, "),a("code",[t._v("makeDistinct")]),t._v(" indicates if a distinct constraint should be enforced on the result, and "),a("code",[t._v("provenanceColumn")]),t._v(" is an optional parameter, indicating the name of the provenance column in the result, which tells us what relation each row originated from.")]),t._v(" "),a("p",[t._v("As the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the same set of columns, we can reference them from a union lens to create a new, concatenated view.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("The columns of all tables used by a union lens must be "),a("em",[t._v("exactly")]),t._v(" equal. Their columns must have "),a("em",[t._v("the same names")]),t._v(" and the "),a("strong",[t._v("exact")]),t._v(" "),a("em",[t._v("same data types")]),t._v(". The order of the columns does not matter.")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The remaining fields are "),a("code",[t._v("provenanceColumn")]),t._v(" and "),a("code",[t._v("makeDistinct")]),t._v(". As we do not expect the entries of any of the tables to be equal, we can just neglect the "),a("code",[t._v("makeDistinct")]),t._v(" parameter. To preserve the source of each entry, we want to include a provenance column. We can call it "),a("code",[t._v("exhibit_type")]),t._v(". This results in the following "),a("code",[t._v("lenses.json")]),t._v(" file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("If the "),a("code",[t._v("provenanceColumn")]),t._v(" field is not provided, then no information on the source relation will be preserved for the concatenated rows. If the field "),a("code",[t._v("makeDistinct")]),t._v(" is not provided, its default value is assumed to be "),a("code",[t._v("false")]),t._v(".")])]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Including a "),a("code",[t._v("provenanceColumn")]),t._v(" in a UnionLens where each of the source relations is distinct will render the "),a("code",[t._v("makeDistinct")]),t._v(" field redundant. This is because, under a union, the composite uniqueness constraint "),a("code",[t._v("(provenanceColumns, childUniquenessConstraint)")]),t._v(" will always hold. On the other hand, if no provenance column is included, then uniqueness constraints from the base relations will be lost, as there is no guarantee that a specific value does not appear again in a different table.")])]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now, let us use this lens definition in our mapping. Starting from the mapping template file, add the following mapping entry:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Starting the Ontop SPARQL endpoint using this mapping and lens file, we can now run the SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a set of exhibit names that have the values "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(" as their exhibit type.")]),t._v(" "),a("h2",{attrs:{id:"relations-with-different-schemas"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-different-schemas"}},[t._v("#")]),t._v(" Relations with different schemas")]),t._v(" "),a("p",[t._v("If we further want to include the table "),a("code",[t._v("art_exhibits")]),t._v(" to the union lens, we cannot just add it to the list of "),a("code",[t._v("unionRelations")]),t._v(". This is because it has one additional column, "),a("code",[t._v("artist_name")]),t._v(', that does not appear in the other tables.\nTo work around this issue, we can take advantage of basic lenses, putting them "underneath" the union lens, to ensure the equality of columns.')]),t._v(" "),a("p",[t._v("There are two possibilities to achieve this:")]),t._v(" "),a("ol",[a("li",[t._v("Hide the conflicting column(s) from its/their table(s)")]),t._v(" "),a("li",[t._v("Add the conflicting column(s) to the tables that do not include them.")])]),t._v(" "),a("p",[t._v("To retain a maximum of information, we will choose the second approach for this example. That means, that we have to construct basic lenses to add the column "),a("code",[t._v("artist_name")]),t._v(" to the tables "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(". One possible way to achieve this is by adding new columns that have "),a("code",[t._v("NULL")]),t._v(" as their expressions.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("After doing the same for the "),a("code",[t._v("nature_exhibits")]),t._v(" table, referencing the new extended lenses from the union lens, and adding "),a("code",[t._v("art_exhibits")]),t._v(" as one of its union relations, get the following lens file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"art_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-2"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("We can now extend the mapping file to also include artist names:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} ; :artistName {artist_name} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type, artist_name FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Now, running this slightly modified SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("artistName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("we will once again get all earlier results, in addition to all exhibits contained in the "),a("code",[t._v("art_exhibit")]),t._v(" table. While the earlier results will have the value "),a("code",[t._v("None")]),t._v(" as their artist name, the "),a("code",[t._v("art_exhibits")]),t._v(" entries will include the name of their artists.")]),t._v(" "),a("hr"),t._v(" "),a("p",[t._v("As a further exercise, notice how the values of "),a("code",[t._v(":exhibitType")]),t._v(" are rather ugly: "),a("code",[t._v('"art_exhibits"')]),t._v(", "),a("code",[t._v('"lenses.historical_exhibits_extended"')]),t._v(", and "),a("code",[t._v('"lenses.nature_exhibits_extended"')]),t._v(". Try adding a new basic lens over the union lens that transforms these into the values "),a("code",[t._v('"art"')]),t._v(", "),a("code",[t._v('"historical"')]),t._v(", and "),a("code",[t._v('"nature"')]),t._v(" instead.")]),t._v(" "),a("p",[a("em",[t._v("Hint: Look at the SQL function "),a("code",[t._v("REPLACE")]),t._v(". Could it be used in the "),a("code",[t._v("expression")]),t._v(" field of an added column to get rid of the "),a("code",[t._v("_exhibits")]),t._v(", "),a("code",[t._v("_extended")]),t._v(", and "),a("code",[t._v("lenses.")]),t._v(" part?")])]),t._v(" "),a("p",[t._v("Notice how the union lens allowed you to perform this operation on all three of its base relations by just defining it once. Without the union lens, you would have required three such basic lenses, one for each table, with the exact same contents.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{470:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"union-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#union-lens"}},[t._v("#")]),t._v(" Union Lens")]),t._v(" "),a("p",[a("em",[t._v("Union lenses will be supported starting with version 5.1.0 (beta).")])]),t._v(" "),a("p",[t._v("Union lenses can be used to concatenate multiple relations with the same schema into one. Additionally, a "),a("em",[t._v("provenance")]),t._v(" field can be added to each row, determining the source relation the row originates from.")]),t._v(" "),a("p",[t._v("For this example, we will look at the tables "),a("code",[t._v("nature_exhibits")]),t._v(", "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("art_exhibits")]),t._v(" from the DuckDB database. We want to combine them into a single relation containing all exhibits.")]),t._v(" "),a("p",[t._v("The tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The table "),a("code",[t._v("art_exhibits")]),t._v(" has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("artist_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("For each table, "),a("code",[t._v("exhibit_id")]),t._v(" is a primary key and "),a("code",[t._v("museum_id")]),t._v(" is a foreign key, referencing the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"relations-with-the-same-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-the-same-schema"}},[t._v("#")]),t._v(" Relations with the same schema")]),t._v(" "),a("p",[t._v("This concatenation can be achieved using a union lens. However, as all base relations of a union lens must have the exact same columns, we will only be working on the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" at first.")]),t._v(" "),a("p",[t._v("The union lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" boolean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Here, "),a("code",[t._v("unionRelations")]),t._v(" is a list of relations that should be concatenated, "),a("code",[t._v("makeDistinct")]),t._v(" indicates if a distinct constraint should be enforced on the result, and "),a("code",[t._v("provenanceColumn")]),t._v(" is an optional parameter, indicating the name of the provenance column in the result, which tells us what relation each row originated from.")]),t._v(" "),a("p",[t._v("As the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the same set of columns, we can reference them from a union lens to create a new, concatenated view.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("The columns of all tables used by a union lens must be "),a("em",[t._v("exactly")]),t._v(" equal. Their columns must have "),a("em",[t._v("the same names")]),t._v(" and the "),a("strong",[t._v("exact")]),t._v(" "),a("em",[t._v("same data types")]),t._v(". The order of the columns does not matter.")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The remaining fields are "),a("code",[t._v("provenanceColumn")]),t._v(" and "),a("code",[t._v("makeDistinct")]),t._v(". As we do not expect the entries of any of the tables to be equal, we can just neglect the "),a("code",[t._v("makeDistinct")]),t._v(" parameter. To preserve the source of each entry, we want to include a provenance column. We can call it "),a("code",[t._v("exhibit_type")]),t._v(". This results in the following "),a("code",[t._v("lenses.json")]),t._v(" file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("If the "),a("code",[t._v("provenanceColumn")]),t._v(" field is not provided, then no information on the source relation will be preserved for the concatenated rows. If the field "),a("code",[t._v("makeDistinct")]),t._v(" is not provided, its default value is assumed to be "),a("code",[t._v("false")]),t._v(".")])]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Including a "),a("code",[t._v("provenanceColumn")]),t._v(" in a UnionLens where each of the source relations is distinct will render the "),a("code",[t._v("makeDistinct")]),t._v(" field redundant. This is because, under a union, the composite uniqueness constraint "),a("code",[t._v("(provenanceColumns, childUniquenessConstraint)")]),t._v(" will always hold. On the other hand, if no provenance column is included, then uniqueness constraints from the base relations will be lost, as there is no guarantee that a specific value does not appear again in a different table.")])]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now, let us use this lens definition in our mapping. Starting from the mapping template file, add the following mapping entry:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Starting the Ontop SPARQL endpoint using this mapping and lens file, we can now run the SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a set of exhibit names that have the values "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(" as their exhibit type.")]),t._v(" "),a("h2",{attrs:{id:"relations-with-different-schemas"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-different-schemas"}},[t._v("#")]),t._v(" Relations with different schemas")]),t._v(" "),a("p",[t._v("If we further want to include the table "),a("code",[t._v("art_exhibits")]),t._v(" to the union lens, we cannot just add it to the list of "),a("code",[t._v("unionRelations")]),t._v(". This is because it has one additional column, "),a("code",[t._v("artist_name")]),t._v(', that does not appear in the other tables.\nTo work around this issue, we can take advantage of basic lenses, putting them "underneath" the union lens, to ensure the equality of columns.')]),t._v(" "),a("p",[t._v("There are two possibilities to achieve this:")]),t._v(" "),a("ol",[a("li",[t._v("Hide the conflicting column(s) from its/their table(s)")]),t._v(" "),a("li",[t._v("Add the conflicting column(s) to the tables that do not include them.")])]),t._v(" "),a("p",[t._v("To retain a maximum of information, we will choose the second approach for this example. That means, that we have to construct basic lenses to add the column "),a("code",[t._v("artist_name")]),t._v(" to the tables "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(". One possible way to achieve this is by adding new columns that have "),a("code",[t._v("NULL")]),t._v(" as their expressions.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("After doing the same for the "),a("code",[t._v("nature_exhibits")]),t._v(" table, referencing the new extended lenses from the union lens, and adding "),a("code",[t._v("art_exhibits")]),t._v(" as one of its union relations, get the following lens file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"art_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-2"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("We can now extend the mapping file to also include artist names:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} ; :artistName {artist_name} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type, artist_name FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Now, running this slightly modified SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("artistName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("we will once again get all earlier results, in addition to all exhibits contained in the "),a("code",[t._v("art_exhibit")]),t._v(" table. While the earlier results will have the value "),a("code",[t._v("None")]),t._v(" as their artist name, the "),a("code",[t._v("art_exhibits")]),t._v(" entries will include the name of their artists.")]),t._v(" "),a("hr"),t._v(" "),a("p",[t._v("As a further exercise, notice how the values of "),a("code",[t._v(":exhibitType")]),t._v(" are rather ugly: "),a("code",[t._v('"art_exhibits"')]),t._v(", "),a("code",[t._v('"lenses.historical_exhibits_extended"')]),t._v(", and "),a("code",[t._v('"lenses.nature_exhibits_extended"')]),t._v(". Try adding a new basic lens over the union lens that transforms these into the values "),a("code",[t._v('"art"')]),t._v(", "),a("code",[t._v('"historical"')]),t._v(", and "),a("code",[t._v('"nature"')]),t._v(" instead.")]),t._v(" "),a("p",[a("em",[t._v("Hint: Look at the SQL function "),a("code",[t._v("REPLACE")]),t._v(". Could it be used in the "),a("code",[t._v("expression")]),t._v(" field of an added column to get rid of the "),a("code",[t._v("_exhibits")]),t._v(", "),a("code",[t._v("_extended")]),t._v(", and "),a("code",[t._v("lenses.")]),t._v(" part?")])]),t._v(" "),a("p",[t._v("Notice how the union lens allowed you to perform this operation on all three of its base relations by just defining it once. Without the union lens, you would have required three such basic lenses, one for each table, with the exact same contents.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/94.c2f356cb.js b/assets/js/94.9b38d890.js similarity index 94% rename from assets/js/94.c2f356cb.js rename to assets/js/94.9b38d890.js index 9998aa954..532bd556f 100644 --- a/assets/js/94.c2f356cb.js +++ b/assets/js/94.9b38d890.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[94],{472:function(e,t,n){"use strict";n.r(t);var i=n(51),a=Object(i.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"second-session-mapping-engineering"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#second-session-mapping-engineering"}},[e._v("#")]),e._v(" Second session: Mapping Engineering")]),e._v(" "),n("p",[e._v("We discuss here some advanced topics related to mappings engineering and the exploitation of\navailable database constraints, which affect the performance of generated SQL queries:")]),e._v(" "),n("ol",[n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[e._v("Role of primary keys")])],1),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[e._v("Role of foreign keys")])],1),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/uri-templates.html"}},[e._v("Choice of the IRI templates")])],1),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/existential.html"}},[e._v("Existential reasoning")])],1)])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[94],{471:function(e,t,n){"use strict";n.r(t);var i=n(51),a=Object(i.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"second-session-mapping-engineering"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#second-session-mapping-engineering"}},[e._v("#")]),e._v(" Second session: Mapping Engineering")]),e._v(" "),n("p",[e._v("We discuss here some advanced topics related to mappings engineering and the exploitation of\navailable database constraints, which affect the performance of generated SQL queries:")]),e._v(" "),n("ol",[n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[e._v("Role of primary keys")])],1),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[e._v("Role of foreign keys")])],1),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/uri-templates.html"}},[e._v("Choice of the IRI templates")])],1),e._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/mapping/existential.html"}},[e._v("Existential reasoning")])],1)])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/95.4647eb76.js b/assets/js/95.e683cb7a.js similarity index 98% rename from assets/js/95.4647eb76.js rename to assets/js/95.e683cb7a.js index 7ec474e48..e17069d28 100644 --- a/assets/js/95.4647eb76.js +++ b/assets/js/95.e683cb7a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[95],{470:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"bonus-existential-reasoning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bonus-existential-reasoning"}},[t._v("#")]),t._v(" Bonus: existential reasoning")]),t._v(" "),a("p",[t._v("Ontop includes a "),a("em",[t._v("tree-witness query rewriting algorithm")]),t._v(" implementing "),a("em",[t._v("existential reasoning")]),t._v(".")]),t._v(" "),a("p",[t._v("To enable it, in Protégé go to "),a("em",[t._v("Preferences")]),t._v(" -> "),a("em",[t._v("Ontop reasoner")]),t._v(" tab and enable the option "),a("em",[t._v("reasoning over anonymous individuals")]),t._v(".")]),t._v(" "),a("p",[t._v("Then, restart the reasoner and try the following query that looks for people supervised by some "),a("em",[t._v("Professor")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isSupervisedBy")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Professor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note that there is no mapping assertion for the property "),a("em",[t._v("isSupervisedBy")]),t._v(".\nHowever, the ontology states that for every "),a("em",[t._v("GraduateStudent")]),t._v(" there must exist some "),a("em",[t._v("Professor")]),t._v(" so that the student "),a("em",[t._v("isSupervisedBy")]),t._v(" the professor.\nOntop can thus infer that all "),a("em",[t._v("GraduateStudent")]),t._v(" are answers to the query, which is then rewritten as the following equivalent query prior to evaluation:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("GraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[95],{472:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"bonus-existential-reasoning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bonus-existential-reasoning"}},[t._v("#")]),t._v(" Bonus: existential reasoning")]),t._v(" "),a("p",[t._v("Ontop includes a "),a("em",[t._v("tree-witness query rewriting algorithm")]),t._v(" implementing "),a("em",[t._v("existential reasoning")]),t._v(".")]),t._v(" "),a("p",[t._v("To enable it, in Protégé go to "),a("em",[t._v("Preferences")]),t._v(" -> "),a("em",[t._v("Ontop reasoner")]),t._v(" tab and enable the option "),a("em",[t._v("reasoning over anonymous individuals")]),t._v(".")]),t._v(" "),a("p",[t._v("Then, restart the reasoner and try the following query that looks for people supervised by some "),a("em",[t._v("Professor")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isSupervisedBy")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Professor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note that there is no mapping assertion for the property "),a("em",[t._v("isSupervisedBy")]),t._v(".\nHowever, the ontology states that for every "),a("em",[t._v("GraduateStudent")]),t._v(" there must exist some "),a("em",[t._v("Professor")]),t._v(" so that the student "),a("em",[t._v("isSupervisedBy")]),t._v(" the professor.\nOntop can thus infer that all "),a("em",[t._v("GraduateStudent")]),t._v(" are answers to the query, which is then rewritten as the following equivalent query prior to evaluation:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("GraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/app.2ee71619.js b/assets/js/app.7148fdf7.js similarity index 82% rename from assets/js/app.2ee71619.js rename to assets/js/app.7148fdf7.js index 3cf9eefee..75f2a133f 100644 --- a/assets/js/app.2ee71619.js +++ b/assets/js/app.7148fdf7.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,l=e[0],s=e[1],u=e[2],f=0,p=[];f=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function x(t,e){return b.call(t,e)}function _(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,k=_((function(t){return t.replace(w,(function(t,e){return e?e.toUpperCase():""}))})),A=_((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),O=/\B([A-Z])/g,S=_((function(t){return t.replace(O,"-$1").toLowerCase()}));var E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function j(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function P(t,e){for(var n in e)t[n]=e[n];return t}function C(t){for(var e={},n=0;n0,Y=G&&G.indexOf("edge/")>0,X=(G&&G.indexOf("android"),G&&/iphone|ipad|ipod|ios/.test(G)||"ios"===Q),Z=(G&&/chrome\/\d+/.test(G),G&&/phantomjs/.test(G),G&&G.match(/firefox\/(\d+)/)),tt={}.watch,et=!1;if(H)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===B&&(B=!H&&!W&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ot=H&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,lt="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);at="undefined"!=typeof Set&&it(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var st=L,ut=0,ct=function(){this.id=ut++,this.subs=[]};ct.prototype.addSub=function(t){this.subs.push(t)},ct.prototype.removeSub=function(t){y(this.subs,t)},ct.prototype.depend=function(){ct.target&&ct.target.addDep(this)},ct.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===S(t)){var s=zt(String,o.type);(s<0||l0&&(fe((s=t(s,(n||"")+"_"+r))[0])&&fe(c)&&(f[u]=gt(c.text+s[0].text),s.shift()),f.push.apply(f,s)):l(s)?fe(c)?f[u]=gt(c.text+s):""!==s&&f.push(gt(s)):fe(s)&&fe(c)?f[u]=gt(c.text+s.text):(a(e._isVList)&&i(s.tag)&&o(s.key)&&i(n)&&(s.key="__vlist"+n+"_"+r+"__"),f.push(s)));return f}(t):void 0}function fe(t){return i(t)&&i(t.text)&&!1===t.isComment}function pe(t,e){if(t){for(var n=Object.create(null),r=lt?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,l=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==r&&l===n.$key&&!i&&!n.$hasNormal)return n;for(var s in o={},t)t[s]&&"$"!==s[0]&&(o[s]=ge(e,s,t[s]))}else o={};for(var u in e)u in o||(o[u]=ye(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),F(o,"$stable",a),F(o,"$key",l),F(o,"$hasNormal",i),o}function ge(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({}),e=(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ce(t))&&t[0];return t&&(!e||1===t.length&&e.isComment&&!ve(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ye(t,e){return function(){return t[e]}}function be(t,e){var n,r,o,a,l;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,o=t.length;rdocument.createEvent("Event").timeStamp&&(un=function(){return cn.now()})}function fn(){var t,e;for(sn=un(),an=!0,en.sort((function(t,e){return t.id-e.id})),ln=0;lnln&&en[n].id>t.id;)n--;en.splice(n+1,0,t)}else en.push(t);on||(on=!0,ne(fn))}}(this)},dn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';Vt(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},dn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},dn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},dn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var hn={enumerable:!0,configurable:!0,get:L,set:L};function vn(t,e,n){hn.get=function(){return this[e][n]},hn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,hn)}function mn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];t.$parent&&kt(!1);var i=function(i){o.push(i);var a=Ut(i,e,n,t);St(r,i,a),i in t||vn(t,"_props",i)};for(var a in e)i(a);kt(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?L:E(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;c(e=t._data="function"==typeof e?function(t,e){pt();try{return t.call(e,e)}catch(t){return Bt(t,e,"data()"),{}}finally{dt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);for(;o--;){var i=n[o];0,r&&x(r,i)||(a=void 0,36!==(a=(i+"").charCodeAt(0))&&95!==a&&vn(t,"_data",i))}var a;Ot(e,!0)}(t):Ot(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=rt();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;0,r||(n[o]=new dn(t,a||L,L,gn)),o in t||yn(t,o,i)}}(t,e.computed),e.watch&&e.watch!==tt&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function jn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var l=a.name;l&&!e(l)&&Pn(n,i,r,o)}}}function Pn(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=wn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Dt(kn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Je(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=de(e._renderChildren,o),t.$scopedSlots=r,t._c=function(e,n,r,o){return Fe(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return Fe(t,e,n,r,o,!0)};var i=n&&n.data;St(t,"$attrs",i&&i.attrs||r,null,!0),St(t,"$listeners",e._parentListeners||r,null,!0)}(e),tn(e,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach((function(n){St(t,n,e[n])})),kt(!0))}(e),mn(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),tn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(An),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Et,t.prototype.$delete=jt,t.prototype.$watch=function(t,e,n){if(c(e))return _n(this,t,e,n);(n=n||{}).user=!0;var r=new dn(this,t,e,n);if(n.immediate){var o='callback for immediate watcher "'+r.expression+'"';pt(),Vt(e,this,[r.value],this,o),dt()}return function(){r.teardown()}}}(An),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o1?j(n):n;for(var r=j(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;iparseInt(this.max)&&Pn(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Pn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){jn(t,(function(t){return En(e,t)}))})),this.$watch("exclude",(function(e){jn(t,(function(t){return!En(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=He(t),n=e&&e.componentOptions;if(n){var r=Sn(n),o=this.include,i=this.exclude;if(o&&(!r||!En(o,r))||i&&r&&En(i,r))return e;var a=this.cache,l=this.keys,s=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[s]?(e.componentInstance=a[s].componentInstance,y(l,s),l.push(s)):(this.vnodeToCache=e,this.keyToCache=s),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return q}};Object.defineProperty(t,"config",e),t.util={warn:st,extend:P,mergeOptions:Dt,defineReactive:St},t.set=Et,t.delete=jt,t.nextTick=ne,t.observable=function(t){return Ot(t),t},t.options=Object.create(null),I.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,P(t.options.components,Ln),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=j(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Dt(this.options,t),this}}(t),On(t),function(t){I.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(An),Object.defineProperty(An.prototype,"$isServer",{get:rt}),Object.defineProperty(An.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(An,"FunctionalRenderContext",{value:Me}),An.version="2.6.14";var $n=m("style,class"),Tn=m("input,textarea,option,select,progress"),Mn=m("contenteditable,draggable,spellcheck"),Rn=m("events,caret,typing,plaintext-only"),Dn=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),In="http://www.w3.org/1999/xlink",Un=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},qn=function(t){return Un(t)?t.slice(6,t.length):""},Nn=function(t){return null==t||!1===t};function Fn(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=zn(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=zn(e,n.data));return function(t,e){if(i(t)||i(e))return Bn(t,Vn(e));return""}(e.staticClass,e.class)}function zn(t,e){return{staticClass:Bn(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Bn(t,e){return t?e?t+" "+e:t:e||""}function Vn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?dr(t,e,n):Dn(e)?Nn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Mn(e)?t.setAttribute(e,function(t,e){return Nn(e)||"false"===e?"false":"contenteditable"===t&&Rn(e)?e:"true"}(e,n)):Un(e)?Nn(n)?t.removeAttributeNS(In,qn(e)):t.setAttributeNS(In,e,n):dr(t,e,n)}function dr(t,e,n){if(Nn(n))t.removeAttribute(e);else{if(J&&!K&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var hr={create:fr,update:fr};function vr(t,e){var n=e.elm,r=e.data,a=t.data;if(!(o(r.staticClass)&&o(r.class)&&(o(a)||o(a.staticClass)&&o(a.class)))){var l=Fn(e),s=n._transitionClasses;i(s)&&(l=Bn(l,Vn(s))),l!==n._prevClass&&(n.setAttribute("class",l),n._prevClass=l)}}var mr,gr={create:vr,update:vr};function yr(t,e,n){var r=mr;return function o(){var i=e.apply(null,arguments);null!==i&&_r(t,o,n,r)}}var br=Gt&&!(Z&&Number(Z[1])<=53);function xr(t,e,n,r){if(br){var o=sn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}mr.addEventListener(t,e,et?{capture:n,passive:r}:n)}function _r(t,e,n,r){(r||mr).removeEventListener(t,e._wrapper||e,n)}function wr(t,e){if(!o(t.data.on)||!o(e.data.on)){var n=e.data.on||{},r=t.data.on||{};mr=e.elm,function(t){if(i(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}i(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),le(n,r,xr,_r,yr,e.context),mr=void 0}}var kr,Ar={create:wr,update:wr};function Or(t,e){if(!o(t.data.domProps)||!o(e.data.domProps)){var n,r,a=e.elm,l=t.data.domProps||{},s=e.data.domProps||{};for(n in i(s.__ob__)&&(s=e.data.domProps=P({},s)),l)n in s||(a[n]="");for(n in s){if(r=s[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===l[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var u=o(r)?"":String(r);Sr(a,u)&&(a.value=u)}else if("innerHTML"===n&&Qn(a.tagName)&&o(a.innerHTML)){(kr=kr||document.createElement("div")).innerHTML=""+r+"";for(var c=kr.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(r!==l[n])try{a[n]=r}catch(t){}}}}function Sr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Er={create:Or,update:Or},jr=_((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Pr(t){var e=Cr(t.style);return t.staticStyle?P(t.staticStyle,e):e}function Cr(t){return Array.isArray(t)?C(t):"string"==typeof t?jr(t):t}var Lr,$r=/^--/,Tr=/\s*!important$/,Mr=function(t,e,n){if($r.test(e))t.style.setProperty(e,n);else if(Tr.test(n))t.style.setProperty(S(e),n.replace(Tr,""),"important");else{var r=Dr(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(qr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Fr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(qr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function zr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&P(e,Br(t.name||"v")),P(e,t),e}return"string"==typeof t?Br(t):void 0}}var Br=_((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Vr=H&&!K,Hr="transition",Wr="transitionend",Qr="animation",Gr="animationend";Vr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Hr="WebkitTransition",Wr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Qr="WebkitAnimation",Gr="webkitAnimationEnd"));var Jr=H?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Kr(t){Jr((function(){Jr(t)}))}function Yr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Nr(t,e))}function Xr(t,e){t._transitionClasses&&y(t._transitionClasses,e),Fr(t,e)}function Zr(t,e,n){var r=eo(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var l="transition"===o?Wr:Gr,s=0,u=function(){t.removeEventListener(l,c),n()},c=function(e){e.target===t&&++s>=a&&u()};setTimeout((function(){s0&&(n="transition",c=a,f=i.length):"animation"===e?u>0&&(n="animation",c=u,f=s.length):f=(n=(c=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?i.length:s.length:0,{type:n,timeout:c,propCount:f,hasTransform:"transition"===n&&to.test(r[Hr+"Property"])}}function no(t,e){for(;t.length1}function so(t,e){!0!==e.data.show&&oo(e)}var uo=function(t){var e,n,r={},s=t.modules,u=t.nodeOps;for(e=0;eh?b(t,o(n[g+1])?null:n[g+1].elm,n,d,g,r):d>g&&_(e,p,h)}(p,m,g,n,c):i(g)?(i(t.text)&&u.setTextContent(p,""),b(p,null,g,0,g.length-1,n)):i(m)?_(m,0,m.length-1):i(t.text)&&u.setTextContent(p,""):t.text!==e.text&&u.setTextContent(p,e.text),i(h)&&i(d=h.hook)&&i(d=d.postpatch)&&d(t,e)}}}function O(t,e,n){if(a(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(M(vo(a),r))return void(t.selectedIndex!==l&&(t.selectedIndex=l));o||(t.selectedIndex=-1)}}function ho(t,e){return e.every((function(e){return!M(e,t)}))}function vo(t){return"_value"in t?t._value:t.value}function mo(t){t.target.composing=!0}function go(t){t.target.composing&&(t.target.composing=!1,yo(t.target,"input"))}function yo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function bo(t){return!t.componentInstance||t.data&&t.data.transition?t:bo(t.componentInstance._vnode)}var xo={model:co,show:{bind:function(t,e,n){var r=e.value,o=(n=bo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,oo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=bo(n)).data&&n.data.transition?(n.data.show=!0,r?oo(n,(function(){t.style.display=t.__vOriginalDisplay})):io(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},_o={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function wo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?wo(He(e.children)):t}function ko(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[k(i)]=o[i];return e}function Ao(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Oo=function(t){return t.tag||ve(t)},So=function(t){return"show"===t.name},Eo={name:"transition",props:_o,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Oo)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=wo(o);if(!i)return o;if(this._leaving)return Ao(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:l(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=ko(this),u=this._vnode,c=wo(u);if(i.data.directives&&i.data.directives.some(So)&&(i.data.show=!0),c&&c.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,c)&&!ve(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var f=c.data.transition=P({},s);if("out-in"===r)return this._leaving=!0,se(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Ao(t,o);if("in-out"===r){if(ve(i))return u;var p,d=function(){p()};se(s,"afterEnter",d),se(s,"enterCancelled",d),se(f,"delayLeave",(function(t){p=t}))}}return o}}},jo=P({tag:String,moveClass:String},_o);function Po(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Co(t){t.data.newPos=t.elm.getBoundingClientRect()}function Lo(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}delete jo.mode;var $o={Transition:Eo,TransitionGroup:{props:jo,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Ye(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ko(this),l=0;l-1?Jn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Jn[t]=/HTMLUnknownElement/.test(e.toString())},P(An.options.directives,xo),P(An.options.components,$o),An.prototype.__patch__=H?uo:L,An.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=mt),tn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new dn(t,r,L,{before:function(){t._isMounted&&!t._isDestroyed&&tn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,tn(t,"mounted")),t}(this,t=t&&H?function(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}(t):void 0,e)},H&&setTimeout((function(){q.devtools&&ot&&ot.emit("init",An)}),0),e.default=An},function(t,e,n){var r=n(3),o=n(28).f,i=n(17),a=n(14),l=n(81),s=n(125),u=n(105);t.exports=function(t,e){var n,c,f,p,d,h=t.target,v=t.global,m=t.stat;if(n=v?r:m?r[h]||l(h,{}):(r[h]||{}).prototype)for(c in e){if(p=e[c],f=t.noTargetGet?(d=o(n,c))&&d.value:n[c],!u(v?c:h+(m?".":"#")+c,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;s(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(n,c,p,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(t,e,n){var r=n(3),o=n(55),i=n(8),a=n(56),l=n(82),s=n(119),u=o("wks"),c=r.Symbol,f=s?c:c&&c.withoutSetter||a;t.exports=function(t){return i(u,t)&&(l||"string"==typeof u[t])||(l&&i(c,t)?u[t]=c[t]:u[t]=f("Symbol."+t)),u[t]}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(90),o=n(14),i=n(209);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){var r=n(12),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},function(t,e,n){var r=n(2);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(9),o=n(120),i=n(6),a=n(57),l=Object.defineProperty;e.f=r?l:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var r=n(139).charAt,o=n(16),i=n(27),a=n(124),l=i.set,s=i.getterFor("String Iterator");a(String,"String",(function(t){l(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=s(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(22);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(60),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(3),o=n(17),i=n(8),a=n(81),l=n(86),s=n(27),u=s.get,c=s.enforce,f=String(String).split("String");(t.exports=function(t,e,n,l){var s,u=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,d=!!l&&!!l.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),(s=c(n)).source||(s.source=f.join("string"==typeof e?e:""))),t!==r?(u?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||l(this)}))},function(t,e,n){var r=n(3),o=n(140),i=n(118),a=n(17),l=n(4),s=l("iterator"),u=l("toStringTag"),c=i.values;for(var f in o){var p=r[f],d=p&&p.prototype;if(d){if(d[s]!==c)try{a(d,s,c)}catch(t){d[s]=c}if(d[u]||a(d,u,f),o[f])for(var h in i)if(d[h]!==i[h])try{a(d,h,i[h])}catch(t){d[h]=i[h]}}}},function(t,e,n){var r=n(58);t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},function(t,e,n){var r=n(9),o=n(10),i=n(44);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(39),o=n(22);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(3),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(152),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r=n(63),o=n(39),i=n(12),a=n(13),l=n(141),s=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,f=6==t,p=7==t,d=5==t||f;return function(h,v,m,g){for(var y,b,x=i(h),_=o(x),w=r(v,m,3),k=a(_.length),A=0,O=g||l,S=e?O(h,k):n||p?O(h,0):void 0;k>A;A++)if((d||A in _)&&(b=w(y=_[A],A,x),t))if(e)S[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:s.call(S,y)}else switch(t){case 4:return!1;case 7:s.call(S,y)}return f?-1:u||c?c:S}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},function(t,e,n){var r=n(238),o=n(241);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r,o,i,a=n(193),l=n(3),s=n(5),u=n(17),c=n(8),f=n(80),p=n(61),d=n(42),h=l.WeakMap;if(a||f.state){var v=f.state||(f.state=new h),m=v.get,g=v.has,y=v.set;r=function(t,e){if(g.call(v,t))throw new TypeError("Object already initialized");return e.facade=t,y.call(v,t,e),e},o=function(t){return m.call(v,t)||{}},i=function(t){return g.call(v,t)}}else{var b=p("state");d[b]=!0,r=function(t,e){if(c(t,b))throw new TypeError("Object already initialized");return e.facade=t,u(t,b,e),e},o=function(t){return c(t,b)?t[b]:{}},i=function(t){return c(t,b)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(9),o=n(87),i=n(44),a=n(19),l=n(57),s=n(8),u=n(120),c=Object.getOwnPropertyDescriptor;e.f=r?c:function(t,e){if(t=a(t),e=l(e),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r,o=n(6),i=n(190),a=n(85),l=n(42),s=n(123),u=n(83),c=n(61),f=c("IE_PROTO"),p=function(){},d=function(t){return" + diff --git a/community/contributing/documentation.html b/community/contributing/documentation.html index b97f774f4..4624d7a04 100644 --- a/community/contributing/documentation.html +++ b/community/contributing/documentation.html @@ -6,7 +6,7 @@ Documentation | Ontop - + @@ -49,11 +49,11 @@ # start the local server yarn docs:dev # commit your changes and push them back to Github -

VuePress (opens new window) requires Node.js >= 8.6.

Last Updated: 8/17/2024, 10:08:05 AM

VuePress (opens new window) requires Node.js >= 8.6.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/community/contributing/index.html b/community/contributing/index.html index be59cb69e..99b09bb7f 100644 --- a/community/contributing/index.html +++ b/community/contributing/index.html @@ -6,7 +6,7 @@ How to contribute | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# How to contribute

Contributions from the community are essential for an open-source project like Ontop and are warmly welcomed.

You can contribute in many differents ways, including:

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/community/contributing/pull-request.html b/community/contributing/pull-request.html index fb86a7959..3c52b64fd 100644 --- a/community/contributing/pull-request.html +++ b/community/contributing/pull-request.html @@ -6,7 +6,7 @@ Pull request | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Pull request

Contributions to the project are welcome and encouraged. You can propose some Pull Requests (PR) on Github. By making a PR on the Github platform, you declare to agree with the standard "inbound = outbound" licensing practice, as foreseen by the Github terms (opens new window). There is no need anymore for regular contributors to sign a CLA.

If you are thinking about implementing a new feature, feel free to engage a discussion with the team through the mailing list or through another medium.

# Contribution License Agreement (for core developers)

Core developers should sign a Contribution License Agreement (CLA) that allows FUB and the Ontop team to redistribute their work under the terms of the Apache 2.0 license. If the contributor works for an institution that owns the work being contributed by the contributor, then a corporate CLA must be additionally signed. The CLAs are available for download below, once signed please email a scanned copy of them.

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/community/index.html b/community/index.html index d901ea536..68f60c737 100644 --- a/community/index.html +++ b/community/index.html @@ -6,7 +6,7 @@ People | Ontop - + @@ -43,11 +43,11 @@ GitHub (opens new window)

# People

Ontop has been initiated by the eponymous research group at the Free University of Bozen-Bolzano which is still highly involved into the development of the project and into the research around it. Over the years, new members from diverse horizons have joined the project, forming a vibrant international community.

Here we list the people who has been involved in the development of the Ontop project. -For the research side, see the dedicated page.

# Active Core Team Members

The development of Ontop is guided by an international team (reverse lexicographical order).

# Core Team Emeriti

Here we honor some no-longer-active core team members who have made important contributions in the past.

# Contributors

Some members of the Ontop community have so enriched it, that they deserve special mention.

  • Lukas Sundqvist
  • Mindaugas Slusnys
  • Damian Rovara
  • Sergey Pugacs
  • Tomas Kovachev
  • Dag Hovland
  • Manfred Gerstgrasser
  • Uğur Dönmez
  • Timea Bagosi
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/community/organizations.html b/community/organizations.html index fa8d3b798..c12ae006d 100644 --- a/community/organizations.html +++ b/community/organizations.html @@ -6,7 +6,7 @@ Organizations | Ontop - + @@ -47,7 +47,7 @@ Ontopic provides a no-code mapping editor, Ontopic Studio, (opens new window) and professional services.

# Birkbeck, University of London

The Birkbeck (opens new window) group have been extensively involved in the development of Ontop since 2012. They have worked on the theoretical foundations of the VKG approach, including -query rewriting and optimisation, and contributed to the code base.

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/community/support.html b/community/support.html index a5960fda1..492595a18 100644 --- a/community/support.html +++ b/community/support.html @@ -6,7 +6,7 @@ Support | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Support

# FAQ

Please visit our pages about Frequently Asked Questions.

# Mailing list (Google group)

We have a mailing list (Google group) (opens new window) for anything related to support, discussion and announcements. Please join for any inquiry.

# Bug tracking system

To see the list of open issues/bugs, visit our GitHub tracker (opens new window)

# Commercial support

Ontopic (opens new window) is offering commercial support for Ontop.

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/dev/build.html b/dev/build.html index 017672353..75d38cab6 100644 --- a/dev/build.html +++ b/dev/build.html @@ -6,7 +6,7 @@ Build Ontop Bundles | Ontop - + @@ -60,7 +60,7 @@

The command compiles Ontop modules and generates the Ontop bundles distributed on GitHub, whose files are written in two directories.

Under build/distribution/target/:

  • ontop-cli-[ontop-version].zip - libraries/scripts to use ontop from the command line and setup a SPARQL endpoint;

Under protege/distribution/target/:

  • it.unibz.inf.ontop.protege-[ontop-version].jar - plugin for Protégé 5.x installation files (drop it in Protégé’s plugins folder);
  • ontop-protege-bundle-platform-independent-[ontop-version].zip - Protégé 5.x bundled with Ontop plugin and ready to run (just unzip and use the run.sh or run.bat scripts);
  • ontop-protege-bundle-linux-[ontop-version].zip - as above, for Linux;
  • ontop-protege-bundle-os-x-[ontop-version].zip - as above, for Mac OS X;
  • ontop-protege-bundle-win-[ontop-version].zip - as above, for Windows.

Notes:

  • profile activation -Prelease enables the generation of all the Ontop bundles as well as source code and Javadoc JARs needed for publishing on Maven Central (if this profile is omitted, only JAR files for Ontop binaries are created);
  • option -Dmaven.test.skip disables the compiling and execution of unit and integration tests (generally performed at release time) to speed up the process - omit it to enable tests, e.g., for testing changes to source code (note: may also use -DskipTests that disables executing tests, but still compiles them);
  • the build may be performed also by running script build-release.sh (build-release.cmd on Windows), which works also in older Ontop versions (4.0.3 or earlier). In these older versions, the script generates bundles in sub-directories ontop-cli, ontop-protege, and ontop-webapps of directory build/distribution, and also generates bundles for Jetty 9 + RDF4J workbench + Ontop and for Tomcat 8 + RDF4J workbench + Ontop. These bundles have been deprecated in Ontop 4 (opens new window) and completely removed since Ontop 5 (opens new window).

# Build specific bundles

Starting from version 4.1 and further revised in version 5.0.2, we provide Maven profiles to build specific Ontop bundles as quickly as possible (with respect to using the above 'build all' command), which may come in handy when modifying Ontop source code. Specifically:

  • to build the Ontop command line tool only, i.e., ontop-cli-[ontop-version].zip (note: up to version 5.0.1, asset-cli was cli and tests were disabled by default)

    $ mvn -Dmaven.test.skip -Passet-cli
     
  • to build the Ontop Protégé plugin, i.e., it.unibz.inf.ontop.protege-[ontop-version].jar (profile available since version 5.0.2)

    $ mvn -Dmaven.test.skip -Passet-plugin
     
  • to build the Ontop Protégé plugin it.unibz.inf.ontop.protege-[ontop-version].jar as well as the ontop-protege-bundle-[platform]-[ontop-version].zip Protégé bundles including it (note: up to version 5.0.1, asset-protege was protege and tests were disabled by default)

    $ mvn -Dmaven.test.skip -Passet-protege
    -

The Maven profiles asset-cli, asset-plugin, asset-protege employed in the commands above exclude unneeded artifacts from the build, which is thus faster. These profiles can be arbitrarily combined to produce multiple bundles, e.g., mvn -Passet-cli,asset-protege to generate both command line tool and Protégé bundles (from version 4.1 up to version 5 excluded, it was possible to build the RDF4 workbench + Ontop files by enabling profile webapps, now removed).

# Compiling the Ontop Protégé plugin

Starting from version 5.0.2, it is necessary to enable profile plugin (or a profile depending on it, such as asset-plugin, asset-protege, or release) in order to compile ontop-protege-plugin. Note that commands mvn compile and mvn test will not work with profile plugin (or a depending profile) since compiling/testing ontop-protege-plugin requires building ontop-protege-dependencies:shaded first to relocate Guava via the Maven shade plugin (opens new window), but this happens only during the package lifecycle phase of Maven, i.e., starting from mvn package or later phase. Unfortunately, relocating Guava is needed to avoid conflicts with the older Guava version used in Protégé and cannot be avoided, and doing that before the package phase is not feasible. Therefore, developers should always use mvn package -Pplugin or later phase when working with ontop-protege-plugin, even when just compiling or testing is intended.

# Other useful Maven commands

The following Maven commands can be used to facilitate some build-related development tasks, the involved plugins (e.g., license-maven-plugin) being already configured in Ontop root pom.xml file:

  • mvn license:add-third-party - produces a report file build/distribution/THIRD-PARTY.txt useful to verify the use of Java libraries with compatible licenses
  • mvn org.codehaus.mojo:versions-maven-plugin:display-plugin-updates - check for Maven plugins that can be updated
  • mvn org.codehaus.mojo:versions-maven-plugin:display-dependency-updates - check for dependencies that can be updated
  • mvn dependency:analyze-duplicate - check there are no duplicate dependencies declared in pom.xml files
  • mvn dependency:analyze-dep-mgt - check that dependency versions under centralized <dependencyManagement> sections are not overridden in child pom.xml files
  • mvn dependency:analyze - check for used and undeclared dependencies and for unused and declared dependencies (both situations that should be avoided)
  • mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort - sorts section of pom.xml files, to improve consistency
  • mvn net.revelc.code.formatter:formatter-maven-plugin:format - auto-formats the pom.xml files, to improve consistency
Last Updated: 8/17/2024, 10:08:05 AM

The Maven profiles asset-cli, asset-plugin, asset-protege employed in the commands above exclude unneeded artifacts from the build, which is thus faster. These profiles can be arbitrarily combined to produce multiple bundles, e.g., mvn -Passet-cli,asset-protege to generate both command line tool and Protégé bundles (from version 4.1 up to version 5 excluded, it was possible to build the RDF4 workbench + Ontop files by enabling profile webapps, now removed).

# Compiling the Ontop Protégé plugin

Starting from version 5.0.2, it is necessary to enable profile plugin (or a profile depending on it, such as asset-plugin, asset-protege, or release) in order to compile ontop-protege-plugin. Note that commands mvn compile and mvn test will not work with profile plugin (or a depending profile) since compiling/testing ontop-protege-plugin requires building ontop-protege-dependencies:shaded first to relocate Guava via the Maven shade plugin (opens new window), but this happens only during the package lifecycle phase of Maven, i.e., starting from mvn package or later phase. Unfortunately, relocating Guava is needed to avoid conflicts with the older Guava version used in Protégé and cannot be avoided, and doing that before the package phase is not feasible. Therefore, developers should always use mvn package -Pplugin or later phase when working with ontop-protege-plugin, even when just compiling or testing is intended.

# Other useful Maven commands

The following Maven commands can be used to facilitate some build-related development tasks, the involved plugins (e.g., license-maven-plugin) being already configured in Ontop root pom.xml file:

  • mvn license:add-third-party - produces a report file build/distribution/THIRD-PARTY.txt useful to verify the use of Java libraries with compatible licenses
  • mvn org.codehaus.mojo:versions-maven-plugin:display-plugin-updates - check for Maven plugins that can be updated
  • mvn org.codehaus.mojo:versions-maven-plugin:display-dependency-updates - check for dependencies that can be updated
  • mvn dependency:analyze-duplicate - check there are no duplicate dependencies declared in pom.xml files
  • mvn dependency:analyze-dep-mgt - check that dependency versions under centralized <dependencyManagement> sections are not overridden in child pom.xml files
  • mvn dependency:analyze - check for used and undeclared dependencies and for unused and declared dependencies (both situations that should be avoided)
  • mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort - sorts section of pom.xml files, to improve consistency
  • mvn net.revelc.code.formatter:formatter-maven-plugin:format - auto-formats the pom.xml files, to improve consistency
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/db-adapter.html b/dev/db-adapter.html index bfe4276f7..921764072 100644 --- a/dev/db-adapter.html +++ b/dev/db-adapter.html @@ -6,7 +6,7 @@ Support a new database system | Ontop - + @@ -239,7 +239,7 @@ }); } } -
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/debug-jetty.html b/dev/debug-jetty.html index 84f8f2d23..2c57c2bdc 100644 --- a/dev/debug-jetty.html +++ b/dev/debug-jetty.html @@ -6,7 +6,7 @@ Debug Jetty | Ontop - + @@ -43,7 +43,7 @@ GitHub (opens new window)

# Debug Jetty

This page describe debug Jetty with RDF4J workbench plugin in IntelliJ Idea

# Start the Jetty in Debug mode

$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar
-

# Linking with IntelliJ

Next we need to link the IntelliJ project with the deployed webapp.

  1. Within IntelliJ, open the project containing the webapp deployed into jetty that you want to debug. SelectRun -> Edit Configurations. Add a new configuration by clicking the "+" icon. Choose Remote. Make sure the port you choose is the same as the one you added in Enable remote debugging.

  2. Next in your webapp you can set a breakpoint within a servlet which when it is tripped will halt the remote jvm's processing thread to await for debugging commands from your IntelliJ instance. To set a breakpoint, simply open the servlet or any other class you want to debug and click left to the line you want to set the breakpoint at (where the red dot is on the next screenshot). The red dot and red background on the line mark the breakpoint.

  3. Accessing that servlet within your browser, pointed at your remote debug configurated jetty-distribution, should transition your IntelliJ instance to the standard debugger view.

# References

  1. http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html (opens new window)
  2. http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html (opens new window)
Last Updated: 8/17/2024, 10:08:05 AM

# Linking with IntelliJ

Next we need to link the IntelliJ project with the deployed webapp.

  1. Within IntelliJ, open the project containing the webapp deployed into jetty that you want to debug. SelectRun -> Edit Configurations. Add a new configuration by clicking the "+" icon. Choose Remote. Make sure the port you choose is the same as the one you added in Enable remote debugging.

  2. Next in your webapp you can set a breakpoint within a servlet which when it is tripped will halt the remote jvm's processing thread to await for debugging commands from your IntelliJ instance. To set a breakpoint, simply open the servlet or any other class you want to debug and click left to the line you want to set the breakpoint at (where the red dot is on the next screenshot). The red dot and red background on the line mark the breakpoint.

  3. Accessing that servlet within your browser, pointed at your remote debug configurated jetty-distribution, should transition your IntelliJ instance to the standard debugger view.

# References

  1. http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html (opens new window)
  2. http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html (opens new window)
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/debug-protege.html b/dev/debug-protege.html index e155c7a0a..d14d15ed7 100644 --- a/dev/debug-protege.html +++ b/dev/debug-protege.html @@ -6,7 +6,7 @@ Debug Protégé | Ontop - + @@ -49,7 +49,7 @@

Where:

  • clean package forces a full re-build and may be generally omitted (which defaults to running package) unless you encounter build errors, in which case clean helps ruling out they stem from incremental builds;
  • -Dmaven.test.skip disables compiling and executing unit tests;
  • -Passet-plugin activates the generation of the Ontop Protégé plugin (OSGI bundle with all its dependencies), without including other uneeded artifacts (e.g., full ZIP/tar.gz Protégé bundles, source and Javadoc JARs, etc);
  • -pl protege/distribution -am (optional) tells Maven to only build the Ontop Protégé module located in protege/distribution and all the other Ontop modules it depends on, saving another couple of seconds.

Notes:

  • in Ontop versions 4.1 to 5.0.0 excluded, the command above should be replaced by mvn clean package -Dmaven.test.skip -Pprotege -pl client/protege -am;
  • in Ontop version 4.0.3 or earlier, the command above should be replaced by mvn clean install -pl client/protege -am -DskipTests to compile code and install it in local maven repository, followed by mvn bundle:bundle -pl client/protege to package the plugin.

Once the Ontop Protégé plugin is built, it must be copied to the Protégé plugin directory via

$ cp protege/distribution/target/it.unibz.inf.ontop.protege-[ontop-version].jar Protege-[protege-version]/plugins/
 

The command above should replace any previous Ontop Protégé plugin in the plugins directory. In any case, make sure that there is only one Protégé plugin in Protege-[protege-version]/plugins/

# Debug in IntelliJ using the Remote debugger

# IntelliJ configuration

Create a remote configuration:

  • select 'Edit configurations', click '+', then select 'Remote'
  • Host: localhost
  • Port: choose a port number (5005 in what follows)

# Protégé run options

Edit the script Protege-[protege-version]/run.sh (on Windows: run.bat), adding the following JVM option (note that parameter suspend is set to y)

-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
 

# Run / Debug

Execute Protege-[protege-version]/run.sh (on Windows: run.bat). -Then, from IntelliJ, click on the Debug button (or Shift+F9).

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/git.html b/dev/git.html index 0170f0e7d..74b760c55 100644 --- a/dev/git.html +++ b/dev/git.html @@ -6,7 +6,7 @@ Git workflow | Ontop - + @@ -43,7 +43,7 @@ GitHub (opens new window)

# Git workflow

In the development of Ontop project, we follow the git-workflow: http://nvie.com/posts/a-successful-git-branching-model/ (opens new window)

A few points:

  • Main development branch: versionX. Every commit in this branch is expected to be shipped with the next X.Y.Z release.

  • Names of the branches:

    • feature branches: feature/featurename
    • bug fix branches: bugfix/bugname. -
      • If there a corresponding GitHub page, use name bugfix/bugname-issue-number or bugfix/issue-number
    • Maintenance branches for releases: releasing/vX.Y (e.g. releasing/v5.0)
  • Use --no-ff option for merging, especially for merging the feature or bugfix branches to versionX

The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature.

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/index.html b/dev/index.html index bb95c30e4..d5fa93f9c 100644 --- a/dev/index.html +++ b/dev/index.html @@ -6,7 +6,7 @@ Overview | Ontop - + @@ -43,11 +43,11 @@ GitHub (opens new window)

# Overview

The development chapter is targeted to those interested in the development of the Ontop framework.

# How-tos

# Internals

Information about the internals of Ontop

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/internals/guice.html b/dev/internals/guice.html index 5252d4273..7c5b57297 100644 --- a/dev/internals/guice.html +++ b/dev/internals/guice.html @@ -6,7 +6,7 @@ Guice Conventions | Ontop - + @@ -79,7 +79,7 @@ public SimpleRDF() { } ... -

As you see, in the end we reach a constructor without parameters.

In IntelliJ, the name of the properties file binding a specific interface can also be retrieved through the find usages functionality.

Last Updated: 8/17/2024, 10:08:05 AM

As you see, in the end we reach a constructor without parameters.

In IntelliJ, the name of the properties file binding a specific interface can also be retrieved through the find usages functionality.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/internals/iq.html b/dev/internals/iq.html index d579f5bb4..cdef7f3e1 100644 --- a/dev/internals/iq.html +++ b/dev/internals/iq.html @@ -6,7 +6,7 @@ Intermediate Query (IQ) | Ontop - + @@ -74,7 +74,7 @@ as well as complex mapping assertions (which, in most scenarios, contains SQL queries). -This is also why the rule-based internal representation has been progressively abandoned.

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/new-release.html b/dev/new-release.html index 59fb49b49..fa64acf5a 100644 --- a/dev/new-release.html +++ b/dev/new-release.html @@ -6,7 +6,7 @@ Make a new release | Ontop - + @@ -70,7 +70,7 @@ # this step is also for triggering the AutoUpdate of Protege plugin $ git checkout master $ git merge v-number # tag -

# Time for celebration!

  • Send release emails to several mail lists and social media
Last Updated: 8/17/2024, 10:08:05 AM

# Time for celebration!

  • Send release emails to several mail lists and social media
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/outdated/known-issues.html b/dev/outdated/known-issues.html index bfce6cdca..bef2049c6 100644 --- a/dev/outdated/known-issues.html +++ b/dev/outdated/known-issues.html @@ -6,7 +6,7 @@ Known issues | Ontop - + @@ -69,11 +69,11 @@ a language tag then the language tag will be parsed out of the lexical value. For example, "abc@en"^^rdf:PlainLiteral would be parsed into a lexical value of 'abc' and a language tag of 'en'. "

Thus, if one expects such symbols in an object property the best solutions are:

  1. cast the object to string in the mapping
  2. replace the @ in the query with @.

# Databases and SQL

  • Registered Keywords - when you have a column name that is also a registered DBMS keyword, you should enclose that column name in quotes. Supported common keywords are: cast, do, extract, first, following, last, materialized, nulls, partition, range, row, rows, siblings, value, xml.
  • ORDER BY in H2: in presence of an Union, the last version of H2 (1.4.), it orders both subqueries independently of each other giving wrong results. See SPARQL-compliance test offset-1
  • UNOPTIMIZED SQL OPERATORS/FUNCTIONS: MIN/MAX, CASE, WHEN clause, DATE FUNCTIONS, NESTED SELECTS, MATCHES, RIGHT/FULL/SELF/CARTESIAN JOIN, SUBJOIN, ALL, ANY, UNION, INTERSECT, MINUM and EXCEPT: Unoptimized sql operators will be transformed in view and generate a result.
  • UNSUPPORTED SQL OPERATORS: EXISTS, UNIQUE, TOP
  • REGEX OPERATOR is not supported by MsSQL and DB2, while the other databases handle it differently

# R2RML mappings

WARNING

Are Bnodes supported in the mapping?

  • no support for inverseExpression
  • predicate cannot be uritemplate (column reference or template declaration)
  • object cannot be uritemplate (column reference or template declaration) when predicate is rdf:type
  • no support for bnode in Ontop
  • no support for sqlversion
  • no support for graphMaps (hence context graphs)
  • bnode naming is arbitrary
  • constant type objects are returned as simple literal. Constant-valued term maps are not considered as having a term type, and specifying rr:termType on these term maps has no effect. For example we return "2011-01-04T00:00:00.0" -instead of "2011-01-04T00:00:00.0"^^xsd:dateTime

The current state of the W3C R2RML compliance tests could be seen [[W3C-R2RML-Compliance| here]]

# Ontop Bootstrapper

WARNING

Are Bnodes supported in the mapping?

  • The BNode syntax generated by Ontop bootstrapper cannot be processed by Ontop
  • Foreign keys on multiple columns are not supported
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/dev/stats.html b/dev/stats.html index 7e996352c..3b3a02844 100644 --- a/dev/stats.html +++ b/dev/stats.html @@ -6,7 +6,7 @@ Statistics | Ontop - + @@ -44,7 +44,7 @@ GitHub (opens new window)

# Statistics

# Downloads

# Github releases

For all the versions 4.x:

curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/ontop/ontop/releases \
    | jq '[.[] | select((.tag_name | startswith("ontop-4."))) | .assets[] | .download_count ] | add' 
-
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/advanced/caching.html b/guide/advanced/caching.html index 315cd605d..abf1b34b5 100644 --- a/guide/advanced/caching.html +++ b/guide/advanced/caching.html @@ -6,7 +6,7 @@ HTTP caching | Ontop - + @@ -45,7 +45,7 @@ (opens new window)

# HTTP caching

Since 4.1.0.

HTTP caching allows to reduce the load on the SPARQL endpoint and to provide faster responses to clients. It is particularly useful when many clients issue the same queries and data is not updated at a high frequency.

To enable HTTP caching, add the property ontop.http.cacheControl in the properties file. This will cause the insertion of a Cache-Control (opens new window) HTTP header in successful responses, with the specified value.

Example

ontop.http.cacheControl=max-age=60, stale-while-revalidate=20, stale-if-error=300
-

This entry informs the cache that values can be considered as fresh for 60 seconds. After this period, the cache remains allowed to serve cached results for 20 more seconds while revalidating the requests in the background, or for 300 more seconds in case of error with the upstream server.

Ontop does not embed a HTTP cache. We recommend setting up a HTTP cache like Varnish (opens new window) or Nginx (opens new window) above the Ontop endpoint.

# Remarks

  • Most caches (e.g. Nginx but also Web browsers) do not cache POST requests by default. Since most SPARQL queries are sent with the POST method, it is important to turn this option on. This option is safe as Ontop is a read-only system.
  • Consider using the GET method for sending SPARQL queries so as to take advantage from Web browser caches.
  • For an example of configuration for Nginx, see this file (opens new window).
Last Updated: 8/17/2024, 10:08:05 AM

This entry informs the cache that values can be considered as fresh for 60 seconds. After this period, the cache remains allowed to serve cached results for 20 more seconds while revalidating the requests in the background, or for 300 more seconds in case of error with the upstream server.

Ontop does not embed a HTTP cache. We recommend setting up a HTTP cache like Varnish (opens new window) or Nginx (opens new window) above the Ontop endpoint.

# Remarks

  • Most caches (e.g. Nginx but also Web browsers) do not cache POST requests by default. Since most SPARQL queries are sent with the POST method, it is important to turn this option on. This option is safe as Ontop is a read-only system.
  • Consider using the GET method for sending SPARQL queries so as to take advantage from Web browser caches.
  • For an example of configuration for Nginx, see this file (opens new window).
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/advanced/configuration.html b/guide/advanced/configuration.html index 6747f8f3e..ef5bd9079 100644 --- a/guide/advanced/configuration.html +++ b/guide/advanced/configuration.html @@ -6,7 +6,7 @@ Configuration keys | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Configuration keys

Here is a list of the configuration keys which can be set in the properties file.

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/guide/advanced/lenses.html b/guide/advanced/lenses.html index cad8a3526..b46e334fd 100644 --- a/guide/advanced/lenses.html +++ b/guide/advanced/lenses.html @@ -6,7 +6,7 @@ Lenses | Ontop - + @@ -222,7 +222,7 @@
Key Type Description
added Array of Strings List of names of non-nullable columns. One String per column

# IRISafeConstraint

{
     "added": [String]
 }
-
Key Type Description
added Array of Strings List of names of IRI-safe columns. One String per column
Last Updated: 8/17/2024, 10:08:05 AM
Key Type Description
added Array of Strings List of names of IRI-safe columns. One String per column
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/advanced/logging.html b/guide/advanced/logging.html index ab09a218b..fcd3a8938 100644 --- a/guide/advanced/logging.html +++ b/guide/advanced/logging.html @@ -6,7 +6,7 @@ Query logging | Ontop - + @@ -97,7 +97,7 @@ ontop.queryLogging.decomposition=false # Sets that merged messages are only inserted when decomposition is disabled ontop.queryLogging.decompositionAndMergingMutuallyExclusive=true -
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/advanced/predefined.html b/guide/advanced/predefined.html index 05ab5464b..317d83fa9 100644 --- a/guide/advanced/predefined.html +++ b/guide/advanced/predefined.html @@ -6,7 +6,7 @@ Predefined query endpoint (beta) | Ontop - + @@ -113,7 +113,7 @@ "@type": "LodgingBusiness", "name": "Alpenblick - Gasthaus" } -

# Entries

# Top-level key

Key Type Description
queries Map of predefined queries Groups predefined queries by id.

# Query keys

Key Type Description
queryType String At the moment, only graph is supported. Corresponds to CONSTRUCT queries.
name String Name of the predefined query.
description String Description of the predefined query.
return404IfEmpty Boolean If true, returns a 404 status code when the result set is empty.
resultStreaming Boolean If true, uses the chunked transfer encoding.
parameters Map of parameters Groups parameters by id.
frame JSON object JSON-LD frame (opens new window)) for shaping the result set when the JSON-LD format is selected.

# Parameter keys

Key Type Description
description String Description of the parameter.
type String Type of the parameter. Can be iri for an IRI, any XSD datatype like xsd:string with the prefix xsd: or the IRI string of an RDF datatype.
safeForRandomGeneration Boolean If true, replacing the parameter value by a random value for generating a "reference" reformulated query can be considered as safe. Replacing afterwards the random value but the real parameter value in the reference reformulated query should produce the expected result. Usually, identifiers are safe while languages are not because the columns to consider differ from a language to another.
required Boolean If true, a value must be given for this parameter in the HTTP request.
Last Updated: 8/17/2024, 10:08:05 AM

# Entries

# Top-level key

Key Type Description
queries Map of predefined queries Groups predefined queries by id.

# Query keys

Key Type Description
queryType String At the moment, only graph is supported. Corresponds to CONSTRUCT queries.
name String Name of the predefined query.
description String Description of the predefined query.
return404IfEmpty Boolean If true, returns a 404 status code when the result set is empty.
resultStreaming Boolean If true, uses the chunked transfer encoding.
parameters Map of parameters Groups parameters by id.
frame JSON object JSON-LD frame (opens new window)) for shaping the result set when the JSON-LD format is selected.

# Parameter keys

Key Type Description
description String Description of the parameter.
type String Type of the parameter. Can be iri for an IRI, any XSD datatype like xsd:string with the prefix xsd: or the IRI string of an RDF datatype.
safeForRandomGeneration Boolean If true, replacing the parameter value by a random value for generating a "reference" reformulated query can be considered as safe. Replacing afterwards the random value but the real parameter value in the reference reformulated query should produce the expected result. Usually, identifiers are safe while languages are not because the columns to consider differ from a language to another.
required Boolean If true, a value must be given for this parameter in the HTTP request.
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/advanced/views.html b/guide/advanced/views.html index 7513b118f..80bd995f3 100644 --- a/guide/advanced/views.html +++ b/guide/advanced/views.html @@ -6,7 +6,7 @@ Ontop views | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Ontop views

Ontop views have been renamed lenses. See the new page.

Last Updated: 8/17/2024, 10:08:05 AM
- + (opens new window)

# Ontop views

Ontop views have been renamed lenses. See the new page.

Last Updated: 8/17/2024, 10:08:53 AM
+ diff --git a/guide/cli.html b/guide/cli.html index 9c80a00d5..bcc11fd92 100644 --- a/guide/cli.html +++ b/guide/cli.html @@ -6,7 +6,7 @@ Command Line Interface | Ontop - + @@ -528,7 +528,7 @@ "idFactoryType" : "POSTGRESQL" } } -
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/compliance.html b/guide/compliance.html index d60e89067..ce807429d 100644 --- a/guide/compliance.html +++ b/guide/compliance.html @@ -6,7 +6,7 @@ Standards compliance | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Standards compliance

# SPARQL 1.1

Updated for 5.1.0.

In the following table we present a summary of the compliance of the latest version of Ontop with SPARQL 1.1 (opens new window), where rows correspond to sections of the W3C recommendation and unsupported features are crossed out. Most of the features are supported, but some are unsupported or only partially supported.

Section in
SPARQL 1.1
Features Coverage
5. Graph Patterns (opens new window) BGP, FILTER 2/2
6. Including Optional Values (opens new window) OPTIONAL 1/1
7. Matching Alternatives (opens new window) UNION 1/1
8. Negation (opens new window) MINUS, FILTER [NOT] EXISTS 1/2
9. Property Paths (opens new window) PredicatePath, InversePath, ZeroOrMorePath, ... 0
10. Assignment (opens new window) BIND, VALUES 2/2
11. Aggregates (opens new window) COUNT, SUM, MIN, MAX, AVG, GROUP_CONCAT, SAMPLE 6/6
12. Subqueries (opens new window) Subqueries 1/1
13. RDF Dataset (opens new window) GRAPH, FROM [NAMED] 2/2
14. Basic Federated Query (opens new window) SERVICE 0
15. Solution Seqs. & Mods. (opens new window) ORDER BY, SELECT, DISTINCT, REDUCED, OFFSET, LIMIT 6/6
16. Query Forms (opens new window) SELECT, CONSTRUCT, ASK, DESCRIBE 4/4
17.4.1. Functional Forms (opens new window) BOUND, IF, COALESCE, EXISTS, NOT EXISTS, || , &&, =, sameTerm, IN, NOT IN 9/11
17.4.2. Functions on RDF Terms (opens new window) isIRI, isBlank, isLiteral, isNumeric, str, lang, datatype, IRI, BNODE, STRDT, STRLANG, UUID, STRUUID 11/13
17.4.3. Functions on Strings (opens new window) STRLEN, SUBSTR, UCASE, LCASE, STRSTARTS, STRENDS, CONTAINS, STRBEFORE, STRAFTER, ENCODE_FOR_URI, CONCAT, langMatches, REGEX, REPLACE 14/14
17.4.4. Functions on Numerics (opens new window) abs, round, ceil, floor, RAND 5/5
17.4.5. Functions on Dates&Times (opens new window) now, year, month, day, hours, minutes, seconds, timezone, tz 8/9
17.4.6. Hash Functions (opens new window) MD5, SHA1, SHA256, SHA384, SHA512 5/5
17.5 XPath Constructor Functions (opens new window) Casting -
17.6 Extensible Value Testing (opens new window) user defined functions 0

# Limitations

  • The 5 hash functions and functions REPLACE and REGEX for regular expressions have limited support because they heavily depend on the DBMS: not all DBMSs provide all hash functions, and many DBMSs have their own regex dialects. Currently, the SPARQL regular expressions of REPLACE and REGEX are simply sent to the DBMS by default.
  • In the implementation of function langMatches, the second argument has to a be a constant: allowing variables will have a negative impact on the performance in our framework.

# GeoSPARQL 1.0

Starting from 4.1.0.

The following table provides a summary of the compliance of the latest version of Ontop with OGC GeoSPARQL 1.0 (opens new window), the standard for representing and querying geospatial linked data. The summary focuses only on the main geospatial functions and properties and unsupported features are crossed out.

Section in OGC GeoSPARQL 1.0
Features Coverage
7. Topology Vocabulary Extensions - Properties geo:sfEquals, geo:sfDisjoint, geo:sfIntersects, geo:sfTouches, geo:sfCrosses, geo:sfWithin, geo:sfContains, geo:sfOverlaps, geo:ehEquals, geo:ehDisjoint, geo:ehMeet, geo:ehOverlap, geo:ehCovers, geo:ehCoveredBy, geo:ehInside, geo:ehContains, geo:rcc8eq, geo:rcc8dc, geo:rcc8ec, geo:rcc8po, geo:rcc8tppi, geo:rcc8tpp, geo:rcc8ntpp, geo:rcc8ntppi 0
8.4. Standard Properties for Geo:Geometry geo:dimension, geo:coordinateDimension, geo:spatialDimension, geo:isEmpty, geo:isSimple, geo:hasSerialization 0
8.5. WKT Serialization geo:wktLiteral, geo:asWKT 2/2
8.6. GML Serialization geo:gmlLiteral, geo:asGML 0
8.7. Non-Topological Query Functions geof:distance, geof:buffer, geof:convexHull , geof:intersection, geof:union, geof:difference geof:symDifference, geof:envelope, geof:boundary, geof:getSRID, 10/10
9.2. Common Query Functions geof:relate 1/1
9.3. Topological Simple Features Relation Family Query Functions geof:sfEquals, geof:sfDisjoint, geof:sfIntersects, geof:sfTouches, geof:sfCrosses, geof:sfWithin, geof:sfContains, geof:sfOverlaps 8/8
9.4. Topological Egenhofer Relation Family Query Functions geof:ehEquals, geof:ehDisjoint, geof:ehMeet, geof:ehOverlap, geof:ehCovers, geof:ehCoveredBy, geof:ehInside, geof:ehContains 8/8
9.5. Topological RCC8 Relation Family Query Functions geof:rcc8eq, geof:rcc8dc, geof:rcc8ec, geof:rcc8po, geof:rcc8tppi, geof:rcc8tpp, geof:rcc8ntpp, geof:rcc8ntppi 8/8

Several non-topological query functions use a unit of measure URI which OGC defines under a specific namespace e.g. <http://www.opengis.net/def/uom/OGC/1.0/metre>. The latest version of Ontop currently supports the units metre, radian and degree.

# R2RML

Updated for 4.2.0

The latest version of Ontop is almost fully compliant with the R2RML (opens new window) standard.

At the moment, it does NOT support:

For complex SQL queries (e.g. with a GROUP BY) in the mapping, Ontop may not be able to infer the datatype of each column if the option ontop.allowRetrievingBlackBoxViewMetadataFromDB is not enabled (disabled by default). In such a situation, it may not be able to derive the natural RDF datatype (opens new window) of a literal built over a column and may not apply the expected normalization. This can be partially mitigated by expliciting the RDF datatype in the mapping, but normalization would remain unapplied.

# RDF 1.1

Ontop complies with RDF 1.1 (opens new window). It types simple literals (from RDF 1.0) as xsd:string and literals with a language tag as rdf:langString.

# OWL 2 QL

# RDFS

# Time functions

Updated for 5.1.0.

The functions using the prefix ofn (http://www.ontotext.com/sparql/functions/) and their documentation can be found here (opens new window). They accept both xsd:date and xsd:dateTime as arguments. (supported since 4.2.0).

The functions using the prefix obdaf (https://w3id.org/obda/functions#) have been introduced in 5.1.0 (see #705 (opens new window)).

Function
Argument 1 Argument 2
ofn:weeksBetween xsd:date xsd:date
ofn:weeksBetween xsd:dateTime xsd:dateTime
ofn:weeksBetween* xsd:date xsd:dateTime
ofn:weeksBetween* xsd:dateTime xsd:date
ofn:daysBetween xsd:date xsd:date
ofn:daysBetween xsd:dateTime xsd:dateTime
ofn:daysBetween* xsd:date xsd:dateTime
ofn:daysBetween* xsd:dateTime xsd:date
ofn:hoursBetween xsd:dateTime xsd:dateTime
ofn:minutesBetween xsd:dateTime xsd:dateTime
ofn:secondsBetween xsd:dateTime xsd:dateTime
ofn:millisBetween xsd:dateTime xsd:dateTime
obdaf:dateTrunc xsd:dateTime xsd:string
obdaf:milliseconds-from-dateTime xsd:dateTime
obdaf:microseconds-from-dateTime xsd:dateTime
obdaf:week-from-dateTime xsd:dateTime
obdaf:quarter-from-dateTime xsd:dateTime
obdaf:decade-from-dateTime xsd:dateTime
obdaf:century-from-dateTime xsd:dateTime
obdaf:millenium-from-dateTime xsd:dateTime

Combinations of argument datatypes marked with the symbol * are not supported for queries over the following data sources: Oracle and Microsoft SQL Server.

The obdaf:[datePart]-from-dateTime functions are supported for all dialects. They can be used to extract a specific part of the provided dateTime value in a numeric format (xsd:decimal for milliseconds and microseconds, xsd:integer for the remaining functions).

NOTE

The function obdaf:week-from-dateTime returns the ISO week index of the given date, where week 1 is considered the first week with a majority of its days in January.

The obdaf:dateTrunc function can be used to truncate a given xsd:dateTime to a new value with specified granularity. The granularity must be provided as an xsd:string literal. The following granularity values are supported:

  • microsecond
  • millisecond
  • second
  • minute
  • hour
  • day
  • week
  • month
  • quarter
  • year
  • decade
  • century
  • millennium

WARNING

Not all database systems support all granularities equally.

decade, century, and millennium are not supported by:

  • AWS Athena
  • Denodo (century is supported)
  • MySQL (century is supported)
  • MariaDB (century is supported)
  • Oracle
  • Presto
  • SQLServer
  • Snowflake
  • Spark
  • Trino

second is not supported by:

  • Denodo

millisecond and microsecond are not supported by:

  • AWS Athena
  • Denodo
  • MySQL
  • MariaDB
  • Oracle
  • Presto
  • Trino

PostgreSQL requires these granularities to be named milliseconds and microseconds instead.

# Examples

obdaf:year("2023-08-16T09:00:00"^^xsd:dateTime) "2023"^^xsd:integer

obdaf:hour("2023-08-16T09:00:00"^^xsd:dateTime) "9"^^xsd:integer

obdaf:dateTrunc("2023-08-16T09:00:00"^^xsd:dateTime, "month"^^xsd:string) "2023-08-01T00:00:00"^^xsd:dateTime

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/guide/concepts.html b/guide/concepts.html index fe9bce39b..a1e825c6f 100644 --- a/guide/concepts.html +++ b/guide/concepts.html @@ -6,7 +6,7 @@ Key concepts | Ontop - + @@ -48,7 +48,7 @@ RDF mainly targets data integration applications while property graphs are used for building graph databases.

In RDF, data is modelled using classes and properties.

Starting from 3.0, Ontop supports RDF 1.1 (opens new window).

# SPARQL query

SPARQL (opens new window) is the standard query language for RDF graphs.

Ontop is capable of answering SPARQL queries expressed over the VKG. Ontop translates these SPARQL queries into SQL queries, which are then executed over the relational data sources.

Ontop supports a large fragment of SPARQL 1.1 (opens new window).

# Mappings

Mappings specify the correspondence between the data models of the relational data sources and the RDF graph. Ontop supports the R2RML standard mapping language (opens new window) and the Ontop mapping language, which is fully interoperable with R2RML.

# Ontology

An ontology specifies the formal relations between the classes and properties used by the RDF graph. It is mainly used for enriching the RDF graph by, for instance, taking account of class hierarchies.

Ontop supports lightweight ontologies expressed in RDFS (opens new window) or in the slightly more expressive OWL 2 QL (opens new window) fragment of OWL.

# VKG specification

VKG specifications are composed of mappings and optionally of ontologies.

# SPARQL endpoint

A SPARQL endpoint (opens new window) is a standardized HTTP-based Web API. -It makes the RDF graph queryable by any HTTP client.

Ontop enables VKG specifications to be deployed as SPARQL endpoints.

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/athena.html b/guide/databases/athena.html index bb8f9d144..57a1fc215 100644 --- a/guide/databases/athena.html +++ b/guide/databases/athena.html @@ -6,7 +6,7 @@ AWS Athena | Ontop - + @@ -49,7 +49,7 @@ jdbc.driver = com.simba.athena.jdbc.Driver

# Nested Type Support

Ontop implements explicit compatibility with the Athena array type ARRAY<T>. When used with the flatten lens, it is able to automatically infer the type of the result column.

The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.

# Struct Access

Individual MAP objects can be accessed by SQL expressions in the dialect's default way:

SELECT my_struct['my_attribute'] FROM ...
 

ROW objects, can also be accessed using the [key] operator. Please note, that in this case, key must be an integer index instead of the name of the field:

SELECT my_struct[1] FROM ...
-

WARNING

Accessing object fields using the "dot operator" is not supported. Please use the [] operator instead.

Last Updated: 8/17/2024, 10:08:05 AM

WARNING

Accessing object fields using the "dot operator" is not supported. Please use the [] operator instead.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/bigquery.html b/guide/databases/bigquery.html index b7059bbf7..1e004be74 100644 --- a/guide/databases/bigquery.html +++ b/guide/databases/bigquery.html @@ -6,7 +6,7 @@ Google BigQuery | Ontop - + @@ -47,7 +47,7 @@ jdbc.property.OAuthServiceAcctEmail = service.account@dummydomain.com jdbc.property.OAuthPvtKey = paht/to/private/key/file.json jdbc.driver = com.simba.googlebigquery.jdbc.Driver -

NOTE

The Google BigQuery JDBC supports different types of authentication methods. The above .property file corresponds to the OAuthType 0: Service Account method, which involves creating a service account for BigQuery and downloading its private key from the web interface. However, any other authentication method can be used with Ontop as well.

# Nested Type Support

Ontop implements explicit compatibility with the ARRAY<T> type. When used with the flatten lens, it is able to automatically infer the type of the result column.

The flatten lens cannot be used on arrays stored as JSON columns in the database. For such use cases, the column first has to be converted to an array type.

NOTE

The position counter starts counting at 0 instead of 1 for BigQuery.

WARNING

In BigQuery, columns cannot directly be "arrays of arrays". To represent a two-dimensional array, the type ARRAY<STRUCT<ARRAY<T>>> has to be used instead of just ARRAY<ARRAY<T>>

# Struct Access

In BigQuery, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute JSON_VALUE(TO_JSON(my_struct), '$.my_attribute')

Last Updated: 8/17/2024, 10:08:05 AM

NOTE

The Google BigQuery JDBC supports different types of authentication methods. The above .property file corresponds to the OAuthType 0: Service Account method, which involves creating a service account for BigQuery and downloading its private key from the web interface. However, any other authentication method can be used with Ontop as well.

# Nested Type Support

Ontop implements explicit compatibility with the ARRAY<T> type. When used with the flatten lens, it is able to automatically infer the type of the result column.

The flatten lens cannot be used on arrays stored as JSON columns in the database. For such use cases, the column first has to be converted to an array type.

NOTE

The position counter starts counting at 0 instead of 1 for BigQuery.

WARNING

In BigQuery, columns cannot directly be "arrays of arrays". To represent a two-dimensional array, the type ARRAY<STRUCT<ARRAY<T>>> has to be used instead of just ARRAY<ARRAY<T>>

# Struct Access

In BigQuery, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute JSON_VALUE(TO_JSON(my_struct), '$.my_attribute')

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/databricks.html b/guide/databases/databricks.html index 56893de12..411e8200d 100644 --- a/guide/databases/databricks.html +++ b/guide/databases/databricks.html @@ -6,7 +6,7 @@ Databricks | Ontop - + @@ -51,7 +51,7 @@ jdbc.user = token jdbc.password = private-access-token jdbc.driver=com.simba.spark.jdbc.Driver -

# Nested Type Support

Ontop implements explicit compatibility with the SparkSQL array type Array<T>. When used with the flatten lens, it is able to automatically infer the type of the result column.

Furthermore, the flatten lens can also be used with the JSON-encoded string columns. For these columns, however, Ontop cannot infer the output type of the flattened column.

# Struct Access

In SparkSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute GET_JSON_OBJECT(TO_JSON(my_struct), '$.my_attribute')

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Ontop implements explicit compatibility with the SparkSQL array type Array<T>. When used with the flatten lens, it is able to automatically infer the type of the result column.

Furthermore, the flatten lens can also be used with the JSON-encoded string columns. For these columns, however, Ontop cannot infer the output type of the flattened column.

# Struct Access

In SparkSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute GET_JSON_OBJECT(TO_JSON(my_struct), '$.my_attribute')

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/db2.html b/guide/databases/db2.html index fdcb45289..2994cd872 100644 --- a/guide/databases/db2.html +++ b/guide/databases/db2.html @@ -6,7 +6,7 @@ DB2 | Ontop - + @@ -46,7 +46,7 @@ jdbc.user = user jdbc.password = password jdbc.driver = com.ibm.db2.jcc.DB2Driver -

# Nested Type Support

Nested data types and the flatten lens are not supported for DB2.

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Nested data types and the flatten lens are not supported for DB2.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/denodo.html b/guide/databases/denodo.html index d3dc7c42f..7d8850f82 100644 --- a/guide/databases/denodo.html +++ b/guide/databases/denodo.html @@ -6,7 +6,7 @@ Denodo | Ontop - + @@ -46,7 +46,7 @@ jdbc.user = admin jdbc.password = ${denodo.password} jdbc.driver = com.denodo.vdp.jdbc.Driver -

# Nested Type Support

Nested data types and the flatten lens are not supported for Denodo.

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Nested data types and the flatten lens are not supported for Denodo.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/dremio.html b/guide/databases/dremio.html index e45b42ec3..609b7e1f9 100644 --- a/guide/databases/dremio.html +++ b/guide/databases/dremio.html @@ -6,7 +6,7 @@ Dremio | Ontop - + @@ -53,7 +53,7 @@ jdbc.password = password jdbc.driver = org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver

# Nested Type Support

Ontop implements explicit compatibility with the Dremio array type LIST which can be used with the flatten lens. However, it cannot infer the type of the flattened result column.

To use a flatten lens on a JSON-encoded array stored in the database, it first has to be converted to a LIST.

WARNING

The position argument for flatten lenses cannot be used with Dremio.

# Struct Access

Individual struct objects can be accessed by SQL expressions in the dialect's default way:

SELECT my_struct['my_attribute'] FROM ...
-
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/duckdb.html b/guide/databases/duckdb.html index 51548a2c5..0e6f82e01 100644 --- a/guide/databases/duckdb.html +++ b/guide/databases/duckdb.html @@ -6,7 +6,7 @@ DuckDB | Ontop - + @@ -45,7 +45,7 @@ (opens new window)

# DuckDB

Supported since 5.0.2.

Through the DuckDB (opens new window) connector, Ontop is able to construct VKGs on DuckDB database files.

# Limitations & Exceptions

  • DuckDB database files prior to version 1.0 are not guaranteed to be compatible with later versions.
  • Setting a default schema is not supported when connecting to DuckDB.
  • Nested data types are only supported starting from version 0.7 of DuckDB.
  • Accessing struct fields using the "dot operator" is not supported.
  • The Ontop option ontop.exposeSystemTables is not supported for DuckDB, as the JBDC does not allow us to access system tables.
  • DuckDB has a very specific concurrency model (opens new window). In particular, it does not support concurrent multi-process read-write queries.
  • DuckDB supports integrity constraints, but they tend to costly for large tables (opens new window). Consider instead specifying constraints using lenses for large datasets.

# Database Connection

The following shows the content of a sample .properties file that can be used to connect Ontop to DuckDB:

jdbc.url = jdbc:duckdb:path/to/database.db
 jdbc.driver = org.duckdb.DuckDBDriver
 

# Nested Type Support

Ontop implements explicit compatibility with the DuckDB array type T[]. When used with the flatten lens, it is able to automatically infer the type of the result column.

The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.

NOTE

Nested data types are only supported starting from version 0.7 of DuckDB.

# Struct Access

Individual struct objects can be accessed by SQL expressions in the dialect's default way:

SELECT my_struct['my_attribute'] FROM ...
-

WARNING

Accessing struct fields using the "dot operator" is not supported.

Last Updated: 8/17/2024, 10:08:05 AM

WARNING

Accessing struct fields using the "dot operator" is not supported.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/dynamodb.html b/guide/databases/dynamodb.html index 5575489d4..dc575a6aa 100644 --- a/guide/databases/dynamodb.html +++ b/guide/databases/dynamodb.html @@ -6,7 +6,7 @@ AWS DynamoDB | Ontop - + @@ -47,7 +47,7 @@ jdbc.property.AWSAccessKey = public-access-key jdbc.property.AWSSecretKey = private-access-key jdbc.driver = cdata.jdbc.amazondynamodb.AmazonDynamoDBDriver -

# Nested Type Support

Nested data types and the flatten lens are not supported for DynamoDB.

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Nested data types and the flatten lens are not supported for DynamoDB.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/generic.html b/guide/databases/generic.html index c067d1c10..a66ebc71b 100644 --- a/guide/databases/generic.html +++ b/guide/databases/generic.html @@ -6,7 +6,7 @@ Generic JDBC (not recommended) | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Generic JDBC (not recommended)

WARNING

Don't rely on generic JDBC support. It isn't sufficient for any data source.

Ontop provides a generic implementation, that is used as default for any JDBC. While part of the functionality may work right out of the box with this default implementation, there is no guarantee that Ontop will be able to handle any database setup and SPARQL queries correctly, especially once special limitations and exceptions come into play.

However, Ontop also provides dialect-specific implementations for a variety of different database management systems and SQL dialects. The following documents describe the process of connecting Ontop to each of them, as well as special points and caveats for specific cases.

In this section, we provide general information and important points for each of the supported systems.

NOTE

If your SQL dialect of interest is not included in this list, it is possible to implement a connector for it, following this guide.

NOTE

To use Ontop with any database system, its corresponding JDBC driver is required in the jdbc directory, which is passed to the Ontop instance as described in the setup guide.

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/guide/databases/h2.html b/guide/databases/h2.html index 9e6ff8877..d3fcdb9fa 100644 --- a/guide/databases/h2.html +++ b/guide/databases/h2.html @@ -6,7 +6,7 @@ H2 | Ontop - + @@ -46,7 +46,7 @@ jdbc.user = user jdbc.password = password jdbc.driver = org.h2.Driver -

# Nested Type Support

Nested data types and the flatten lens are not supported for H2.

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Nested data types and the flatten lens are not supported for H2.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/mariadb.html b/guide/databases/mariadb.html index aa808860e..e8802552f 100644 --- a/guide/databases/mariadb.html +++ b/guide/databases/mariadb.html @@ -6,7 +6,7 @@ MariaDB | Ontop - + @@ -46,7 +46,7 @@ jdbc.user = user jdbc.password = password jdbc.driver = org.mariadb.jdbc.Driver -

# Nested Type Support

Ontop implements explicit compatibility with the MariaDB type JSON which can be used with the flatten lens. However, it cannot infer the type of the flattened result column.

In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), MariaDB's JSON functions (opens new window) can be used to further work with them.

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Ontop implements explicit compatibility with the MariaDB type JSON which can be used with the flatten lens. However, it cannot infer the type of the flattened result column.

In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), MariaDB's JSON functions (opens new window) can be used to further work with them.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/mssql.html b/guide/databases/mssql.html index e3f5a99df..73f827129 100644 --- a/guide/databases/mssql.html +++ b/guide/databases/mssql.html @@ -6,7 +6,7 @@ MS SQL Server | Ontop - + @@ -46,7 +46,7 @@ jdbc.user = user jdbc.password = password jdbc.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver -

# Nested Type Support

Nested data types are not supported by SQLServer. However, Ontop allows the usage of the flatten lens over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.

WARNING

The position argument for flatten lenses cannot be used with SQLServer.

In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), SQLServer's JSON functions (opens new window) can be used to further work with them.

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Nested data types are not supported by SQLServer. However, Ontop allows the usage of the flatten lens over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.

WARNING

The position argument for flatten lenses cannot be used with SQLServer.

In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), SQLServer's JSON functions (opens new window) can be used to further work with them.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/mysql.html b/guide/databases/mysql.html index 38aa8c477..b08a12b75 100644 --- a/guide/databases/mysql.html +++ b/guide/databases/mysql.html @@ -6,7 +6,7 @@ MySQL | Ontop - + @@ -46,7 +46,7 @@ jdbc.user = user jdbc.password = password jdbc.driver = com.mysql.cj.jdbc.Driver -

WARNING

The parameter useCursorFetch=true needs to be added to the JDBC URL for streaming to be enabled. Otherwise, the JDBC driver will block until the full result set is fetched, which may cause out-of-memory exceptions when materializing or running large queries.

# Nested Type Support

Ontop implements explicit compatibility with the MySQL type JSON which can be used with the flatten lens. However, it cannot infer the type of the flattened result column.

In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), MySQL's JSON functions (opens new window) can be used to further work with them.

WARNING

Accessing object fields using the "arrow operator" is not supported.

WARNING

Nested type only supported for MySQL >= 8.0

Last Updated: 8/17/2024, 10:08:05 AM

WARNING

The parameter useCursorFetch=true needs to be added to the JDBC URL for streaming to be enabled. Otherwise, the JDBC driver will block until the full result set is fetched, which may cause out-of-memory exceptions when materializing or running large queries.

# Nested Type Support

Ontop implements explicit compatibility with the MySQL type JSON which can be used with the flatten lens. However, it cannot infer the type of the flattened result column.

In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), MySQL's JSON functions (opens new window) can be used to further work with them.

WARNING

Accessing object fields using the "arrow operator" is not supported.

WARNING

Nested type only supported for MySQL >= 8.0

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/oracle.html b/guide/databases/oracle.html index bab666bdd..be186f529 100644 --- a/guide/databases/oracle.html +++ b/guide/databases/oracle.html @@ -6,7 +6,7 @@ Oracle | Ontop - + @@ -47,7 +47,7 @@ jdbc.password = password jdbc.driver = oracle.jdbc.OracleDriver

# Nested Type Support

Ontop does not implement explicit compatibility with nested datatypes in Oracle. -However, Ontop allows the usage of the flatten lens over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.

To use the flatten lens with Oracle array types, they must first be converted to JSON strings.

In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), Oracle's JSON functions (opens new window) can be used to further work with them.

WARNING

Accessing object fields using the "dot operator" is not supported. Please use SQL JSON functions instead.

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/postgres.html b/guide/databases/postgres.html index 57c9bfe59..d77bd7281 100644 --- a/guide/databases/postgres.html +++ b/guide/databases/postgres.html @@ -6,7 +6,7 @@ PostgreSQL | Ontop - + @@ -46,7 +46,7 @@ jdbc.user = admin jdbc.password = password jdbc.driver = org.postgresql.Driver -

# Nested Type Support

Ontop implements explicit compatibility with the PostgreSQL array type T[]. When used with the flatten lens, it is able to automatically infer the type of the result column.

Furthermore, the flatten lens can also be used with the JSON and JSONB datatypes, which are both recognized by Ontop. For these types, however, Ontop cannot infer the output type of the flattened column.

# Struct Access

In PostgreSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute JSON_EXTRACT_PATH(TO_JSON(my_struct), '$.my_attribute')

WARNING

The "arrow operators" used to access JSON objects in PostgreSQL are not supported in Ontop. Please use JSON functions instead.

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Ontop implements explicit compatibility with the PostgreSQL array type T[]. When used with the flatten lens, it is able to automatically infer the type of the result column.

Furthermore, the flatten lens can also be used with the JSON and JSONB datatypes, which are both recognized by Ontop. For these types, however, Ontop cannot infer the output type of the flattened column.

# Struct Access

In PostgreSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute JSON_EXTRACT_PATH(TO_JSON(my_struct), '$.my_attribute')

WARNING

The "arrow operators" used to access JSON objects in PostgreSQL are not supported in Ontop. Please use JSON functions instead.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/presto.html b/guide/databases/presto.html index 77d710d3d..e1bba49d0 100644 --- a/guide/databases/presto.html +++ b/guide/databases/presto.html @@ -6,7 +6,7 @@ Presto | Ontop - + @@ -48,7 +48,7 @@ jdbc.password = password jdbc.driver = com.facebook.presto.jdbc.PrestoDriver

In case Presto is set up without authentication, the jdbc.user and jdbc.password lines can also be left out.

# Nested Type Support

Ontop implements explicit compatibility with the Presto array type array(t). When used with the flatten lens, it is able to automatically infer the type of the result column.

The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.

# Struct Access

In Presto, individual ROW objects can be accessed by SQL expressions using the "dot operator" on the ROW column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_row.my_attribute JSON_EXTRACT(CAST(my_struct AS JSON), '$.my_attribute')

Elements of MAP objects can be accessed using the [] operator, as in

SELECT my_map['my_attribute'] FROM ...
-
Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/redshift.html b/guide/databases/redshift.html index 4a6107f7e..00019b55c 100644 --- a/guide/databases/redshift.html +++ b/guide/databases/redshift.html @@ -6,7 +6,7 @@ AWS Redshift | Ontop - + @@ -47,7 +47,7 @@ jdbc.property.AccessKeyID = public-access-key jdbc.property.SecretAccessKey = private-access-key jdbc.driver = com.amazon.redshift.jdbc42.Driver -

NOTE

The AWS Redshift JDBC supports different types of authentication methods. The above .property file corresponds to authentication with access keys. However, any other authentication method can be used with Ontop as well. In these cases, the corresponding connection properties have to be supplied as jdbc.property.<property-name> instead of the AccessKeyID and SecretAccessKey properties.

# Nested Type Support

Ontop implements explicit compatibility with the Redshift type SUPER.

This type can be used with the flatten lens. However, Ontop is not able to automatically infer the type of the result column.

# Struct Access

In Redshift, individual SUPER struct objects can be accessed by SQL expressions using the "dot operator" on the SUPER column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute JSON_EXTRACT_PATH_TEXT(JSON_SERIALIZE(my_struct), 'my_attribute')

Last Updated: 8/17/2024, 10:08:05 AM

NOTE

The AWS Redshift JDBC supports different types of authentication methods. The above .property file corresponds to authentication with access keys. However, any other authentication method can be used with Ontop as well. In these cases, the corresponding connection properties have to be supplied as jdbc.property.<property-name> instead of the AccessKeyID and SecretAccessKey properties.

# Nested Type Support

Ontop implements explicit compatibility with the Redshift type SUPER.

This type can be used with the flatten lens. However, Ontop is not able to automatically infer the type of the result column.

# Struct Access

In Redshift, individual SUPER struct objects can be accessed by SQL expressions using the "dot operator" on the SUPER column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute JSON_EXTRACT_PATH_TEXT(JSON_SERIALIZE(my_struct), 'my_attribute')

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/snowflake.html b/guide/databases/snowflake.html index a2a73e81b..dd55986ff 100644 --- a/guide/databases/snowflake.html +++ b/guide/databases/snowflake.html @@ -6,7 +6,7 @@ Snowflake | Ontop - + @@ -48,7 +48,7 @@ jdbc.password = password jdbc.driver = net.snowflake.client.jdbc.SnowflakeDriver

# Nested Type Support

Ontop implements explicit compatibility with the ARRAY type, which can be used with the flatten lens. However, it is not able to automatically infer the type of the resulting column.

WARNING

Due to an issue mentioned above, using special characters inside the output and position fields of the flatten lens for Snowflake will fail. Furthermore, these fields will always be case-insensitive.

# Struct Access

Individual object fields can be accessed by SQL expressions in the dialect's default way:

SELECT my_object['my_field'] FROM ...
-

WARNING

Accessing object fields using the "colon operator" is not supported. Please use the [] operator instead.

Last Updated: 8/17/2024, 10:08:05 AM

WARNING

Accessing object fields using the "colon operator" is not supported. Please use the [] operator instead.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/spark.html b/guide/databases/spark.html index 84eb45864..e4ddcb5b2 100644 --- a/guide/databases/spark.html +++ b/guide/databases/spark.html @@ -6,7 +6,7 @@ SparkSQL | Ontop - + @@ -47,7 +47,7 @@ jdbc.driver = org.apache.hive.jdbc.HiveDriver jdbc.user = user jdbc.password = password -

# Nested Type Support

Ontop implements explicit compatibility with the SparkSQL array type Array<T>. When used with the flatten lens, it is able to automatically infer the type of the result column.

Furthermore, the flatten lens can also be used with the JSON-encoded string columns. For these columns, however, Ontop cannot infer the output type of the flattened column.

# Struct Access

In SparkSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute GET_JSON_OBJECT(TO_JSON(my_struct), '$.my_attribute')

Last Updated: 8/17/2024, 10:08:05 AM

# Nested Type Support

Ontop implements explicit compatibility with the SparkSQL array type Array<T>. When used with the flatten lens, it is able to automatically infer the type of the result column.

Furthermore, the flatten lens can also be used with the JSON-encoded string columns. For these columns, however, Ontop cannot infer the output type of the flattened column.

# Struct Access

In SparkSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.

Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.

Example:

my_struct.my_attribute GET_JSON_OBJECT(TO_JSON(my_struct), '$.my_attribute')

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/databases/trino.html b/guide/databases/trino.html index 9f9f15205..8c3b58191 100644 --- a/guide/databases/trino.html +++ b/guide/databases/trino.html @@ -6,7 +6,7 @@ Trino | Ontop - + @@ -49,7 +49,7 @@ jdbc.driver = io.trino.jdbc.TrinoDriver

In case Trino is set up without authentication, the jdbc.user and jdbc.password lines can also be left out.

# Nested Type Support

Ontop implements explicit compatibility with the Trino array type array(t). When used with the flatten lens, it is able to automatically infer the type of the result column.

The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.

# Struct Access

Individual MAP (opens new window) structures can be accessed by SQL expressions in the dialect's default way:

SELECT my_struct['my_attribute'] FROM ...
 

ROW (opens new window) structures can be accessed using the [position] operator. position must be an integer index starting from 1:

SELECT my_struct[1] FROM ...
-

WARNING

Accessing object fields using the "dot operator" is not supported. Please use the [] operator instead.

Last Updated: 8/17/2024, 10:08:05 AM

WARNING

Accessing object fields using the "dot operator" is not supported. Please use the [] operator instead.

Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/db.html b/guide/db.html index 2e5dd8417..a4b228e8d 100644 --- a/guide/db.html +++ b/guide/db.html @@ -6,7 +6,7 @@ Data sources | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Data sources

# PostgreSQL

DOUBLE-CHECK restrictions

SIMILAR TO (not parsed by JSQLParser)

Last Updated: 8/17/2024, 10:08:05 AM
- + (opens new window)

# Data sources

# PostgreSQL

DOUBLE-CHECK restrictions

SIMILAR TO (not parsed by JSQLParser)

Last Updated: 8/17/2024, 10:08:53 AM
+ diff --git a/guide/getting-started.html b/guide/getting-started.html index 92ecfd5b1..90d7e2340 100644 --- a/guide/getting-started.html +++ b/guide/getting-started.html @@ -6,7 +6,7 @@ Getting started | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Getting started

# Tutorial

If you are new to Ontop and Virtual Knowledge Graphs, we encourage you to have a look at the official tutorial.

# Using Ontop

Ontop is distributed under various forms. They can be downloaded on Github (opens new window), Docker Hub (opens new window), Sourceforge (opens new window) and in the Protégé plugin repository.

# Mapping designer

For editing and testing your mappings, you can use our plugin of the Protégé ontology editor (opens new window). You can download the latest stable release directly from Protégé. Alternatively, pre-releases can be found on Github (opens new window) and Sourceforge (opens new window).

Limited support of advanced features

In particular, the Protégé plugin doesn't support lenses. For advanced usage, we recommend using text editors or considering commercial offerings.

# Deployment

Once your mappings and your ontology are ready, you can deploy your VKG as a SPARQL endpoint. The Ontop endpoint is available both as a CLI command (ontop endpoint) and as a Docker image (opens new window).

You can also use the Ontop endpoint during development as it embeds a nice YASGUI client (opens new window) and an optional portal (since 4.0-beta-1) containing pre-defined queries.

# Command Line Interface

Want to materialize your VKG, convert your mappings into R2RML, bootstrap your mappings or start a SPARQL endpoint? You can use the CLI for that. It can be found on on Github (opens new window) and Sourceforge (opens new window).

# Former solutions

Historically, Ontop has been made available under other means that we don't recommend anymore.

It remains possible to use Ontop as a Java API through RDF4J (opens new window) although we recommend the HTTP SPARQL endpoint as a first option (think of a microservice). Why? Because such a Java API would add many dependencies to your project and constraint you to use certain versions of Java.

Ontop-rdf4j is available on Maven Central (opens new window).

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/guide/glossary.html b/guide/glossary.html index 0c28b5c6f..7d38081e3 100644 --- a/guide/glossary.html +++ b/guide/glossary.html @@ -6,7 +6,7 @@ Glossary | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Glossary

# VKG

Virtual Knowledge Graph

# Mapping

# OBDA

Ontology-Based Data Access

# Ontology

# RDF

# RDFS

# SPARQL

# SPARQL Query

# SPARQL Endpoint

# OWL

# R2RML

Last Updated: 8/17/2024, 10:08:05 AM
- + diff --git a/guide/index.html b/guide/index.html index bc74e1553..4b41b1a2f 100644 --- a/guide/index.html +++ b/guide/index.html @@ -6,7 +6,7 @@ Introduction | Ontop - + @@ -43,13 +43,13 @@ GitHub (opens new window)

# Introduction

Ontop is a Virtual Knowledge Graph system. -It exposes the content of arbitrary relational databases as knowledge graphs. These graphs are virtual, which means that data remains in the data sources instead of being moved to another database.

Ontop translates SPARQL queries (opens new window) expressed over the knowledge graphs into SQL queries executed by the relational data sources. It relies on R2RML mappings (opens new window) and can take advantage of lightweight ontologies.

# Versions

This documentation is for Ontop 3.0 and more recent versions.

For earlier versions, please refer to our previous Wiki (opens new window).

Most recent version:

  • Stable: Ontop 5.1.2, released on January 17, 2024.

See release notes for more details.

# Main features

# Organizations

Ontop is backed by the Free University of Bozen-Bolzano (opens new window) and Ontopic s.r.l. (opens new window). It also receives regular important contributions from University of Bergen (opens new window) and Birkbeck, University of London (opens new window). See the community section for more details.

# Licenses

Ontop is available under the Apache 2.0 (opens new window) license.

All the documentation is licensed under the +It exposes the content of arbitrary relational databases as knowledge graphs. These graphs are virtual, which means that data remains in the data sources instead of being moved to another database.

Ontop translates SPARQL queries (opens new window) expressed over the knowledge graphs into SQL queries executed by the relational data sources. It relies on R2RML mappings (opens new window) and can take advantage of lightweight ontologies.

# Versions

This documentation is for Ontop 3.0 and more recent versions.

For earlier versions, please refer to our previous Wiki (opens new window).

Most recent version:

  • Stable: Ontop 5.2.0, released on August 16, 2024.

See release notes for more details.

# Main features

# Organizations

Ontop is backed by the Free University of Bozen-Bolzano (opens new window) and Ontopic s.r.l. (opens new window). It also receives regular important contributions from University of Bergen (opens new window) and Birkbeck, University of London (opens new window). See the community section for more details.

# Licenses

Ontop is available under the Apache 2.0 (opens new window) license.

All the documentation is licensed under the Creative Commons (Attribution) (opens new window) -license.

# Social

You can find us on the following social platforms:

# Citations

Last Updated: 8/17/2024, 10:08:05 AM
Last Updated: 8/17/2024, 10:08:53 AM
- + diff --git a/guide/materialization.html b/guide/materialization.html index a081350fe..502f63656 100644 --- a/guide/materialization.html +++ b/guide/materialization.html @@ -6,7 +6,7 @@ Materialization | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

# Materialization

Last Updated: 8/17/2024, 10:08:05 AM
- + (opens new window)

# Materialization

Last Updated: 8/17/2024, 10:08:53 AM
+ diff --git a/guide/releases.html b/guide/releases.html index f0d2848cc..186701fa0 100644 --- a/guide/releases.html +++ b/guide/releases.html @@ -6,7 +6,7 @@ Release notes | Ontop - + @@ -279,11 +279,11 @@ (Issues: #58).
  • Fix the exceptions that appeared when loading/saving/reloading ontologies (Issues: #59, #60, #61, #75).
  • Fix problems with several progress dialogs in the GUI (Issues: #50, #87).
  • Fix problems in the 'tuple count' functionality (Issues: #82, -#84).
  • Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/guide/troubleshooting/faq.html b/guide/troubleshooting/faq.html index e8b594184..5012d46c6 100644 --- a/guide/troubleshooting/faq.html +++ b/guide/troubleshooting/faq.html @@ -6,7 +6,7 @@ FAQ | Ontop - + @@ -49,7 +49,7 @@ and JDBC Information (opens new window).

    # No "JDBC drivers" tab in the preferences

    You probably can see the following message in the Protégé console:

    org.osgi.framework.BundleException: Activator start error in bundle org.protege.osgi.jdbc.prefs [20].)
     org.protege.osgi.jdbc.RegistryException: java.lang.ClassNotFoundException: org.h2.Driver
     

    Please go to the Preferences and click on "Reset preferences".

    # Protégé does not show the Ontop tabs

    To see the tabs go to Windows -> tabs -> Ontop Mappings and Ontop SPARQL.

    # RDF4J workbench (not supported anymore)

    # Why RDF4J Workbench refuses to delete some repositories?

    For deleting metadata about a repository, the RDF4J Workbench should be able to create an instance of this repository. However, if the repository configuration is invalid (due to, for instance to bad mapping and ontology files), such an instance cannot be created. -To avoid this situation, the configuration is validated in depth when a new repository is added to the Workbench. However, if the mapping and ontology files are changed afterwards, we offer no protection. One workaround is to create a valid repository with the same name and then to delete it. Another workaround is to delete it from the RDF4J console.

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/index.html b/index.html index 73d2b2646..07ba817e4 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Ontop - + @@ -51,6 +51,6 @@

    - + diff --git a/jobs/index.html b/jobs/index.html index 509ce4d9c..539a02760 100644 --- a/jobs/index.html +++ b/jobs/index.html @@ -6,7 +6,7 @@ Work with us | Ontop - + @@ -43,7 +43,7 @@ GitHub (opens new window)

    # Work with us

    if you are enthusiastic in the Ontop system and the Virtual Knowledge Graph technology, -there are many opportunities, which range from a small course project, to a complete PhD study, or a full time developer position.

    # Free University of Bozen-Bolzano

    At the In2Data research group (opens new window) at the KBDB group of Free University of Bozen-Bolzano, we are offering:

    If you are interested, please get in touch with Prof. Diego Calvanese (opens new window) or Dr. Guohui Xiao (opens new window).

    # Ontopic

    At the company Ontopic s.r.l. (opens new window), we are offering:

    • Student internship
    • Bachelor/Master thesis
    • Part time or full time developer positions.

    If you are interested, please get in touch with inquiry@ontopic.ai.

    Last Updated: 8/17/2024, 10:08:05 AM
    - +there are many opportunities, which range from a small course project, to a complete PhD study, or a full time developer position.

    # Free University of Bozen-Bolzano

    At the In2Data research group (opens new window) at the KBDB group of Free University of Bozen-Bolzano, we are offering:

    If you are interested, please get in touch with Prof. Diego Calvanese (opens new window) or Dr. Guohui Xiao (opens new window).

    # Ontopic

    At the company Ontopic s.r.l. (opens new window), we are offering:

    • Student internship
    • Bachelor/Master thesis
    • Part time or full time developer positions.

    If you are interested, please get in touch with inquiry@ontopic.ai.

    Last Updated: 8/17/2024, 10:08:53 AM
    + diff --git a/obda-pages/index.html b/obda-pages/index.html index 2dc767672..693059d76 100644 --- a/obda-pages/index.html +++ b/obda-pages/index.html @@ -6,7 +6,7 @@ Vocabularies for Ontology-Based Data Access | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

    # Vocabularies for Ontology-Based Data Access

    Coming soon!

    Last Updated: 8/17/2024, 10:08:05 AM
    - + (opens new window)

    # Vocabularies for Ontology-Based Data Access

    Coming soon!

    Last Updated: 8/17/2024, 10:08:53 AM
    + diff --git a/research/index.html b/research/index.html index db51a61df..231de4f8d 100644 --- a/research/index.html +++ b/research/index.html @@ -6,7 +6,7 @@ Research team | Ontop - + @@ -43,11 +43,11 @@ GitHub (opens new window)

    # Research team

    Ontop is a project initiated by Diego Calvanese and Mariano Rodriguez-Muro in 2009 in the KRDB research centre for Knowledge and Data (opens new window) at the Free University of Bolzano (opens new window).

    A decade after, Ontop remains very active, both from a research and a software development point of view.

    # Researchers

    Here we list the people who have been involved in the research side of the Ontop project. -For the development side, see the community page.

    # At the Free University of Bozen-Bolzano (Unibz)

    # International collaborations

    # Alumni researchers from Unibz

    # Projects

    The development and the research around Ontop over the years have been mainly funded by research projects.

    # Current projects

    # Past projects

    • Thinking ONtologiES (TONES), EU FET project
    • Optique (opens new window) (Scalable End-User Access to Big Data) FP7 project
    • Ontology-based Data Access to NoSQL Database (OBDAM), Unibz project
    • Ontology-based analysis of temporal and streaming data (OBATS), Unibz project
    • IDEE (data integration in the energy sector), FESR Project
    • GeoVKG (geo-spatial VKG), Unibz project
    • High Quality Data Integration with Ontologies (QUADRO), Unibz project
    • High quality Open data Publishing and Enrichment (HOPE), Italian national PRIN (Research Projects of National Relevance)
    • PACMEL (VKG for process mining), CHIST-ERA EU Project
    • INODE (opens new window) (data management infrastructures), H2020 EU project
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/research/iq-formal.html b/research/iq-formal.html index 5729f8256..69bb000f1 100644 --- a/research/iq-formal.html +++ b/research/iq-formal.html @@ -6,7 +6,7 @@ Formal characterization of IQs | Ontop - + @@ -177,7 +177,7 @@ in that the projection with all selected attributes (and no non-trivial additional operation) is the identity operator, and so is renaming with empty substituion. So in practice, -a construction node may encode one of these operations.

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/research/notation.html b/research/notation.html index af47c4236..1d499a71a 100644 --- a/research/notation.html +++ b/research/notation.html @@ -6,7 +6,7 @@ Notation | Ontop - + @@ -62,7 +62,7 @@ the projected attributes must be a subset of the attributes of the argument relation. Similarly, the arguments of a union operator must have identical set of attributes (this is not natively the case of the UNION SPARQL operator, -but can be enforced with a straightforward normalization).

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/research/optimization.html b/research/optimization.html index f8a6444e5..8c8c6aec1 100644 --- a/research/optimization.html +++ b/research/optimization.html @@ -6,7 +6,7 @@ Intermediate query optimization | Ontop - + @@ -139,11 +139,11 @@ such that ||l1|| = { {y ↦ 2} } and ||r1|| = { {x ↦ 1} }.

    Then ||j1|| = { {x ↦ 1, y ↦ 2} }, and ||n1|| = { {} }.

    But ||l2|| = { {y ↦ 2} } and ||r2|| = { {} } must also hold, therefore ||j2|| = { {y ↦ 2} } and ||n2|| = { {y ↦ 2} }, -such that ||n1|| ≠ ||n2||.

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/research/publications.html b/research/publications.html index 6a7783119..65a78ceaa 100644 --- a/research/publications.html +++ b/research/publications.html @@ -6,7 +6,7 @@ Publications | Ontop - + @@ -142,7 +142,7 @@ Course. (opens new window) (Roman Kontchakov, Mariano Rodriguez-Muro, Michael Zakharyaschev. Reasoning Web 2013)
  • Ontop: A Tutorial (opens new window) -(Mariano Rodriguez-Muro, Vienna'13)
  • # Master theses

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/research/tutorials/cikm-2018.html b/research/tutorials/cikm-2018.html index 4009a43c5..869f07742 100644 --- a/research/tutorials/cikm-2018.html +++ b/research/tutorials/cikm-2018.html @@ -6,7 +6,7 @@ Ontop - + @@ -60,7 +60,7 @@ tutorial. Similarly, background in Semantic Web standards, such as RDF and SPARQL can be of help, although these notions are an integral part of the tutorial, and are introduced and discussed in -the first part.

    Last Updated: 8/17/2024, 10:08:05 AM
    - +the first part.

    Last Updated: 8/17/2024, 10:08:53 AM
    + diff --git a/tutorial/api/index.html b/tutorial/api/index.html index a7bc9e1d5..15621fa9f 100644 --- a/tutorial/api/index.html +++ b/tutorial/api/index.html @@ -6,7 +6,7 @@ Ontop API | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

    # Ontop API

    Ontop API examples are available at its own repository:

    https://github.com/ontop/ontop-api-examples (opens new window)

    You can import it directly into a Java IDE. IntelliJ is recommended.

    Last Updated: 8/17/2024, 10:08:05 AM
    - + (opens new window)

    # Ontop API

    Ontop API examples are available at its own repository:

    https://github.com/ontop/ontop-api-examples (opens new window)

    You can import it directly into a Java IDE. IntelliJ is recommended.

    Last Updated: 8/17/2024, 10:08:53 AM
    + diff --git a/tutorial/basic/setup.html b/tutorial/basic/setup.html index a11db7e09..2ea53ae9f 100644 --- a/tutorial/basic/setup.html +++ b/tutorial/basic/setup.html @@ -6,7 +6,7 @@ Database and Ontop Setup | Ontop - + @@ -49,7 +49,7 @@ FROM "uni1"."academic" WHERE "position" = 1

    # Ontop-Protégé setup

    Protégé is an open source ontology editor and knowledge management system. Ontop-Protégé is a plugin for designing and testing a VKG specification.

    1. Download the latest Ontop-Protégé bundle for your Operating System (opens new window) and unzip the archive and go into its folder
    2. Run it (run.bat on Windows, run.sh on Mac/Linux)
    3. Register the H2 JDBC driver: go to Preferences -> JDBC Drivers and add an entry with the following information -
      • Description: h2
      • Class Name: org.h2.Driver
      • Driver file (jar): /path/to/h2/bin/h2-1.4.196.jar

    # Programme

    1. Mapping the first data source
    2. Mapping the second data source
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/basic/university-1.html b/tutorial/basic/university-1.html index 35ca9558f..d466b13af 100644 --- a/tutorial/basic/university-1.html +++ b/tutorial/basic/university-1.html @@ -6,7 +6,7 @@ First data source: university 1 | Ontop - + @@ -91,7 +91,7 @@ ?teacher a :Teacher . }

    These inference capabilities can be, for a large part, understood as the ability to infer new mappings -from the original mappings and the ontological axioms (e.g. Professor is a sub-class of Teacher). We will discuss it later in this tutorial.

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/basic/university-2.html b/tutorial/basic/university-2.html index e8e2cada8..70bcc6cf9 100644 --- a/tutorial/basic/university-2.html +++ b/tutorial/basic/university-2.html @@ -6,7 +6,7 @@ Second data source: university 2 | Ontop - + @@ -70,7 +70,7 @@ FROM "uni2"."person" WHERE "status" = 1

    And so on for the graduate students, postdocs, full professors, associate professors and assistant professors.

    # SPARQL

    We can now run the previous SPARQL queries and observe that the results combine -entries from the two datasets.

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/endpoint/endpoint-cli.html b/tutorial/endpoint/endpoint-cli.html index e5536fcfa..92a92d2c2 100644 --- a/tutorial/endpoint/endpoint-cli.html +++ b/tutorial/endpoint/endpoint-cli.html @@ -6,7 +6,7 @@ Setting up an Ontop SPARQL endpoint with Ontop CLI | Ontop - + @@ -54,7 +54,7 @@ --properties=input/university-complete.properties ^ --cors-allowed-origins=http://yasgui.org
    1. Open the web interface of the SPARQL endpoint to try some queries: -http://localhost:8080/ (opens new window)
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/endpoint/endpoint-docker.html b/tutorial/endpoint/endpoint-docker.html index d180b2e04..3dba70919 100644 --- a/tutorial/endpoint/endpoint-docker.html +++ b/tutorial/endpoint/endpoint-docker.html @@ -6,7 +6,7 @@ Setting up an Ontop SPARQL endpoint with Docker | Ontop - + @@ -101,7 +101,7 @@ ports: - "8080:8080"

    Now we can simply start it:

    $ docker-compose up
    -

    It exposes the following two ports for the browser:

    Last Updated: 8/17/2024, 10:08:05 AM

    It exposes the following two ports for the browser:

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/endpoint/endpoint-tomcat.html b/tutorial/endpoint/endpoint-tomcat.html index c6b2f449a..8393a43e8 100644 --- a/tutorial/endpoint/endpoint-tomcat.html +++ b/tutorial/endpoint/endpoint-tomcat.html @@ -6,7 +6,7 @@ SPARQL endpoint deployment using Ontop Tomcat/RDF4J bundle | Ontop - + @@ -57,7 +57,7 @@ ?prof a :FullProfessor ; foaf:lastName ?lastName . } ' -
    Last Updated: 8/17/2024, 10:08:05 AM
    - +
    Last Updated: 8/17/2024, 10:08:53 AM
    + diff --git a/tutorial/endpoint/index.html b/tutorial/endpoint/index.html index 36bae0d79..bfac26413 100644 --- a/tutorial/endpoint/index.html +++ b/tutorial/endpoint/index.html @@ -6,7 +6,7 @@ Deploying a SPARQL endpoint | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)

    # Deploying a SPARQL endpoint

    To deploy a SPARQL endpoint, we recommend to use the Ontop endpoint from the

    Last Updated: 8/17/2024, 10:08:05 AM
    - + diff --git a/tutorial/external-tutorials.html b/tutorial/external-tutorials.html index d6270eaa0..4b211afa4 100644 --- a/tutorial/external-tutorials.html +++ b/tutorial/external-tutorials.html @@ -6,7 +6,7 @@ External tutorials | Ontop - + @@ -43,11 +43,11 @@ GitHub (opens new window)

    # External tutorials

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/federation/denodo/index.html b/tutorial/federation/denodo/index.html index 140a3c225..5662eef47 100644 --- a/tutorial/federation/denodo/index.html +++ b/tutorial/federation/denodo/index.html @@ -6,7 +6,7 @@ Ontop with Denodo | Ontop - + @@ -73,7 +73,7 @@ ?o sosa:resultTime ?t . } LIMIT 100 -
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/federation/dremio/index.html b/tutorial/federation/dremio/index.html index de2a01891..b155fc592 100644 --- a/tutorial/federation/dremio/index.html +++ b/tutorial/federation/dremio/index.html @@ -6,7 +6,7 @@ Ontop with Dremio | Ontop - + @@ -95,7 +95,7 @@ ?student foaf:firstName ?firstName . ?student foaf:lastName ?lastName . } -
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/federation/index.html b/tutorial/federation/index.html index a0526579e..f448c30ce 100644 --- a/tutorial/federation/index.html +++ b/tutorial/federation/index.html @@ -6,7 +6,7 @@ Federating multiple databases | Ontop - + @@ -42,7 +42,7 @@ Work with us GitHub - (opens new window)
    Last Updated: 8/17/2024, 10:08:05 AM
    - + diff --git a/tutorial/federation/teiid/index.html b/tutorial/federation/teiid/index.html index 3aeb85a18..9563ce413 100644 --- a/tutorial/federation/teiid/index.html +++ b/tutorial/federation/teiid/index.html @@ -6,7 +6,7 @@ Ontop with Teiid | Ontop - + @@ -128,7 +128,7 @@

    you can obtain the following certain answers which are generated by extracting and merging the data obatined from uni1 and uni2:

    [x z y e]
     [x/<http://example.org/voc#uni1/course/1602>,z/<http://example.org/voc#uni2/course/1>,y/"Information security",e/<http://example.org/voc#uni2/person/1>]
     [x/<http://example.org/voc#uni1/course/1601>,z/<http://example.org/voc#uni2/course/6>,y/"Intelligent Systems",e/<http://example.org/voc#uni2/person/7>]
    -
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/index.html b/tutorial/index.html index 3ef6303b5..d03c65d4b 100644 --- a/tutorial/index.html +++ b/tutorial/index.html @@ -6,7 +6,7 @@ Presentation | Ontop - + @@ -44,11 +44,11 @@ GitHub (opens new window)

    # Presentation

    In this tutorial, we will see how to design a Virtual Knowledge Graph (VKG) specification, how to deploy it as a SPARQL endpoint, how to consume it and further more advanced topics.

    # Requirements

    # Clone this repository

    Before start, please clone this repository in order to download all the files

    git clone https://github.com/ontop/ontop-tutorial.git
     cd ontop-tutorial
    -

    # Program

    1. Basics of VKG Modeling
    2. Deploying an Ontop SPARQL endpoint
    3. Interacting with an Ontop SPARQL endpoint
    4. Mapping Engineering
    5. Materialization using Ontop
    6. Federating multiple databases
    7. Lenses
    8. External tutorials
    Last Updated: 8/17/2024, 10:08:05 AM

    # Program

    1. Basics of VKG Modeling
    2. Deploying an Ontop SPARQL endpoint
    3. Interacting with an Ontop SPARQL endpoint
    4. Mapping Engineering
    5. Materialization using Ontop
    6. Federating multiple databases
    7. Lenses
    8. External tutorials
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/interact/cli.html b/tutorial/interact/cli.html index 8447e59c2..8f4d1cdb6 100644 --- a/tutorial/interact/cli.html +++ b/tutorial/interact/cli.html @@ -6,7 +6,7 @@ Interact with an Ontop SPARQL Endpoint | Ontop - + @@ -55,7 +55,7 @@ --header 'accept: application/json' \ --header 'content-type: application/sparql-query' \ --data 'PREFIX : <http://example.org/voc#> SELECT DISTINCT ?teacher {?teacher a :Teacher .}' -

    # Using a SPARQL client library

    Alternatively, you may use one of the many SPARQL clients (opens new window) available for many programming and data analysis environments, as we demonstrate next using the SPARQLWrapper library within a Python Jupyter Notebook.

    Last Updated: 8/17/2024, 10:08:05 AM

    # Using a SPARQL client library

    Alternatively, you may use one of the many SPARQL clients (opens new window) available for many programming and data analysis environments, as we demonstrate next using the SPARQLWrapper library within a Python Jupyter Notebook.

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/interact/jupyter.html b/tutorial/interact/jupyter.html index 511741010..dc50c6408 100644 --- a/tutorial/interact/jupyter.html +++ b/tutorial/interact/jupyter.html @@ -6,7 +6,7 @@ Use Jupyter Notebook with an Ontop SPARQL endpoint | Ontop - + @@ -157,7 +157,7 @@ </code></pre> <!--beforeend--></div><!--afterend-->
    lname course_title
    count 17 17
    unique 8 11
    top Smith Linear Algebra
    freq 3 3
    df['course_title'].value_counts().plot(kind='bar')
     
    <matplotlib.axes._subplots.AxesSubplot at 0x11475ebd0>
    -
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/lenses/basic-lens.html b/tutorial/lenses/basic-lens.html index 4675a694d..d7bda6a81 100644 --- a/tutorial/lenses/basic-lens.html +++ b/tutorial/lenses/basic-lens.html @@ -6,7 +6,7 @@ Basic Lens | Ontop - + @@ -173,7 +173,7 @@ } ] } -

    Lenses can reference each other! As a further exercise, you can try using this newly created lens as the baseRelation of the managers filter from before. Once that is done, you can query it again - the results should be the same as before.

    NOTE

    We could also have added all of these constraints to the same managers_filter lens from the previous section to achieve the same results. This has the advantage of reducing the work required for the lens setup and reducing the total number of relations accessible by Ontop, but it is less flexible, as we would have to copy all the constraints to the guides_filter and guard_filter lenses as well, resulting in a lot of duplication.

    Generally, the optimal solution depends on the specific scenario.

    Last Updated: 8/17/2024, 10:08:05 AM

    Lenses can reference each other! As a further exercise, you can try using this newly created lens as the baseRelation of the managers filter from before. Once that is done, you can query it again - the results should be the same as before.

    NOTE

    We could also have added all of these constraints to the same managers_filter lens from the previous section to achieve the same results. This has the advantage of reducing the work required for the lens setup and reducing the total number of relations accessible by Ontop, but it is less flexible, as we would have to copy all the constraints to the guides_filter and guard_filter lenses as well, resulting in a lot of duplication.

    Generally, the optimal solution depends on the specific scenario.

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/lenses/flatten-lens.html b/tutorial/lenses/flatten-lens.html index 6cc27b640..ad8d29ad4 100644 --- a/tutorial/lenses/flatten-lens.html +++ b/tutorial/lenses/flatten-lens.html @@ -6,7 +6,7 @@ Flatten Lens | Ontop - + @@ -88,7 +88,7 @@ ?worker :hasTitle ?title . ?worker :preferredTitle ?prefTitle } -

    This should result in a list of all employees, together with their titles and their preferred title.

    # Flattening other types of arrays

    The flatten lens works on all types of arrays, and, depending on the capabilities of the dialect, can infer the output type of the flattened column. As a further exercise, try looking at the table museums.

    column type
    museum_id integer
    name string
    address string
    yearly_income integer
    yearly_spendings integer
    ratings array of floats

    The field ratings is an array of floating point numbers between 1 and 10. Try creating a flatten lens that can unnest this array to populate the datatype property :hasRating! Ontop will be able to automatically detect that the flattened column has the type FLOAT. Keep in mind that we do not necessarily need a "position" column for this use case.

    WARNING

    When arrays in a given dialect are defined as ARRAY<T>, T[], or similarly, Ontop is able to infer the data type of the output column after flattening. However, when this is not the case (either the array was provided as JSON or the array data type of the dialect is simply called ARRAY or similarly), Ontop cannot perform this inference. In those cases, it is suggested to put a basic lens over the flatten lens that explicitly performs a CAST on the output, to allow Ontop to know the column type once again.

    WARNING

    The level of support for the flatten lens depends strongly on the dialect. Please consult the flatten lens documentation page for more info on each supported dialect.

    Last Updated: 8/17/2024, 10:08:05 AM

    This should result in a list of all employees, together with their titles and their preferred title.

    # Flattening other types of arrays

    The flatten lens works on all types of arrays, and, depending on the capabilities of the dialect, can infer the output type of the flattened column. As a further exercise, try looking at the table museums.

    column type
    museum_id integer
    name string
    address string
    yearly_income integer
    yearly_spendings integer
    ratings array of floats

    The field ratings is an array of floating point numbers between 1 and 10. Try creating a flatten lens that can unnest this array to populate the datatype property :hasRating! Ontop will be able to automatically detect that the flattened column has the type FLOAT. Keep in mind that we do not necessarily need a "position" column for this use case.

    WARNING

    When arrays in a given dialect are defined as ARRAY<T>, T[], or similarly, Ontop is able to infer the data type of the output column after flattening. However, when this is not the case (either the array was provided as JSON or the array data type of the dialect is simply called ARRAY or similarly), Ontop cannot perform this inference. In those cases, it is suggested to put a basic lens over the flatten lens that explicitly performs a CAST on the output, to allow Ontop to know the column type once again.

    WARNING

    The level of support for the flatten lens depends strongly on the dialect. Please consult the flatten lens documentation page for more info on each supported dialect.

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/lenses/index.html b/tutorial/lenses/index.html index d2a222da6..a0ab57eab 100644 --- a/tutorial/lenses/index.html +++ b/tutorial/lenses/index.html @@ -6,7 +6,7 @@ Using lenses | Ontop - + @@ -47,7 +47,7 @@ "relations": [Lens] }

    where each Lens object corresponds to one particular lens, holding a name through which it can be referenced in the mapping and a type which indicates the specific type of the lens. -We can include any number of lenses in this file, and they can reference database relations as well as each other.

    Some more common features of lenses will be discussed in the Basic Lens section.

    In each of these sections, we will construct one mapping file and one lenses file that can be passed to Ontop. To simplify testing, a common template for all mapping files is already included in the tutorial files. You can continue the preparation of the individual mappings from this template.

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/lenses/join-lens.html b/tutorial/lenses/join-lens.html index 49dc3d801..99aee64c7 100644 --- a/tutorial/lenses/join-lens.html +++ b/tutorial/lenses/join-lens.html @@ -6,7 +6,7 @@ Join Lens | Ontop - + @@ -122,7 +122,7 @@ ?worker :name ?name . ?worker :workAddress ?address . } -

    If everything was prepared correctly, this should result in a list of employee names, together with the address of the museum they work at.

    Last Updated: 8/17/2024, 10:08:05 AM

    If everything was prepared correctly, this should result in a list of employee names, together with the address of the museum they work at.

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/lenses/setup.html b/tutorial/lenses/setup.html index 80f2ed1ea..da63aa1b1 100644 --- a/tutorial/lenses/setup.html +++ b/tutorial/lenses/setup.html @@ -6,7 +6,7 @@ Database and Ontop Setup | Ontop - + @@ -57,7 +57,7 @@ --properties=input/duckdb.properties ^ --cors-allowed-origins=http://yasgui.org
    1. Open the web interface of the SPARQL endpoint to try some queries: -http://localhost:8080/ (opens new window)
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/lenses/sql-lens.html b/tutorial/lenses/sql-lens.html index 9d4b2e4a4..b11cc3391 100644 --- a/tutorial/lenses/sql-lens.html +++ b/tutorial/lenses/sql-lens.html @@ -6,7 +6,7 @@ SQL Lens | Ontop - + @@ -81,7 +81,7 @@ } ] } -

    While this will not change the output of the sample query, it may help Ontop optimize its queries in specific instances (see primary key).

    WARNING

    It is advised to be cautious when using SQL lenses. Generally, they should not refer to other lenses if the SQL expression is complex, and they may not be able to infer integrity constraints. For more information, please visit the documentation page of lenses.

    Last Updated: 8/17/2024, 10:08:05 AM

    While this will not change the output of the sample query, it may help Ontop optimize its queries in specific instances (see primary key).

    WARNING

    It is advised to be cautious when using SQL lenses. Generally, they should not refer to other lenses if the SQL expression is complex, and they may not be able to infer integrity constraints. For more information, please visit the documentation page of lenses.

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/lenses/union-lens.html b/tutorial/lenses/union-lens.html index 3d53af8e0..b70a5bd76 100644 --- a/tutorial/lenses/union-lens.html +++ b/tutorial/lenses/union-lens.html @@ -6,7 +6,7 @@ Union Lens | Ontop - + @@ -156,7 +156,7 @@ ?exhibit :exhibitType ?type . ?exhibit :artistName ?artist } -

    we will once again get all earlier results, in addition to all exhibits contained in the art_exhibit table. While the earlier results will have the value None as their artist name, the art_exhibits entries will include the name of their artists.


    As a further exercise, notice how the values of :exhibitType are rather ugly: "art_exhibits", "lenses.historical_exhibits_extended", and "lenses.nature_exhibits_extended". Try adding a new basic lens over the union lens that transforms these into the values "art", "historical", and "nature" instead.

    Hint: Look at the SQL function REPLACE. Could it be used in the expression field of an added column to get rid of the _exhibits, _extended, and lenses. part?

    Notice how the union lens allowed you to perform this operation on all three of its base relations by just defining it once. Without the union lens, you would have required three such basic lenses, one for each table, with the exact same contents.

    Last Updated: 8/17/2024, 10:08:05 AM

    we will once again get all earlier results, in addition to all exhibits contained in the art_exhibit table. While the earlier results will have the value None as their artist name, the art_exhibits entries will include the name of their artists.


    As a further exercise, notice how the values of :exhibitType are rather ugly: "art_exhibits", "lenses.historical_exhibits_extended", and "lenses.nature_exhibits_extended". Try adding a new basic lens over the union lens that transforms these into the values "art", "historical", and "nature" instead.

    Hint: Look at the SQL function REPLACE. Could it be used in the expression field of an added column to get rid of the _exhibits, _extended, and lenses. part?

    Notice how the union lens allowed you to perform this operation on all three of its base relations by just defining it once. Without the union lens, you would have required three such basic lenses, one for each table, with the exact same contents.

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/mapping/existential.html b/tutorial/mapping/existential.html index cea802724..a076e977c 100644 --- a/tutorial/mapping/existential.html +++ b/tutorial/mapping/existential.html @@ -6,7 +6,7 @@ Bonus: existential reasoning | Ontop - + @@ -52,7 +52,7 @@ SELECT ?x { ?x a :GraduateStudent . } -
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/mapping/foreign-keys.html b/tutorial/mapping/foreign-keys.html index 2e01f2a86..74811fe24 100644 --- a/tutorial/mapping/foreign-keys.html +++ b/tutorial/mapping/foreign-keys.html @@ -6,7 +6,7 @@ Role of foreign keys | Ontop - + @@ -116,7 +116,7 @@ ?p foaf:firstName ?firstName ; foaf:lastName ?lastName . } -
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/mapping/index.html b/tutorial/mapping/index.html index 93a81242e..e3abe55b2 100644 --- a/tutorial/mapping/index.html +++ b/tutorial/mapping/index.html @@ -6,7 +6,7 @@ Second session: Mapping Engineering | Ontop - + @@ -43,7 +43,7 @@ GitHub (opens new window)

    # Second session: Mapping Engineering

    We discuss here some advanced topics related to mappings engineering and the exploitation of -available database constraints, which affect the performance of generated SQL queries:

    1. Role of primary keys
    2. Role of foreign keys
    3. Choice of the IRI templates
    4. Existential reasoning
    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/mapping/primary-keys.html b/tutorial/mapping/primary-keys.html index 0e57140de..71e926d74 100644 --- a/tutorial/mapping/primary-keys.html +++ b/tutorial/mapping/primary-keys.html @@ -6,7 +6,7 @@ Role of primary keys (unique constraints) | Ontop - + @@ -111,7 +111,7 @@ WHERE QVIEW1."s_id" IS NOT NULL AND QVIEW1."first_name" IS NOT NULL AND QVIEW1."last_name" IS NOT NULL -

    As you can see, the self-joins are removed when primary keys are provided and used as joining conditions.

    Last Updated: 8/17/2024, 10:08:05 AM

    As you can see, the self-joins are removed when primary keys are provided and used as joining conditions.

    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/mapping/uri-templates.html b/tutorial/mapping/uri-templates.html index 0f4e56448..bb58e7d17 100644 --- a/tutorial/mapping/uri-templates.html +++ b/tutorial/mapping/uri-templates.html @@ -6,7 +6,7 @@ Choice of the IRI templates | Ontop - + @@ -114,7 +114,7 @@

    # Mapping uni2.person-canonical

    • Target:
    :person/{ssn} obda:isCanonicalIRIOf :uni2/person/{pid} . 
     
    • Source:
    SELECT * FROM "uni2"."person"
     

    With these three mapping assertions and the ones of the first session, Ontop produces the same saturated mapping assertions as in the manual approach. -Query evaluation performance is thus the same (and similarly affected to the additional joins needed to build person IRIs), but the use of canonical IRI templates makes simpler for users to define and adapt mappings.

    Last Updated: 8/17/2024, 10:08:05 AM
    Last Updated: 8/17/2024, 10:08:53 AM
    - + diff --git a/tutorial/materialization/materialization.html b/tutorial/materialization/materialization.html index f2f5c7b44..ad11ac92d 100644 --- a/tutorial/materialization/materialization.html +++ b/tutorial/materialization/materialization.html @@ -6,7 +6,7 @@ How to materialize data into a graph database | Ontop - + @@ -58,7 +58,7 @@ ?s ?p ?o } } -

    This query materializes the same triples as with the first approach.

    # Choosing the Right Approach for Your Use Case

    1. Small Dataset, Easy Communication: If your dataset isn't large and you can easily set up communication between the Ontop SPARQL endpoint and the graph database, go with solution #2. It avoids dealing with files and intermediate storage.

    2. Large Dataset, Efficient Loading: For very large datasets, choose the most efficient loading solution supported by the triplestore, even if it requires more effort to set up.

    3. Materializing Fragments of the KG: Solution #2 allows easy materialization of specific fragments of the Knowledge Graph by adapting the SPARQL query. You can have hybrid KGs with some parts stored in the graph database and the rest kept virtual.

    4. Advantage of Keeping Data Virtual: Keeping data virtual is great for large volumes of sensor data that constantly update. It's better to keep this part virtual while storing rich contextual information in the graph database.

    # Ontology Usage

    If you're familiar with Ontop, you might have noticed that we didn't use an ontology in this example. Providing an ontology to Ontop can result in a significantly larger KG due to the reasoning capabilities embedded in Ontop. However, GraphDB also has reasoning capabilities, allowing reasoning to be done later in GraphDB, making materialization simpler and faster. If your graph database doesn't support reasoning, Ontop can handle it.

    Last Updated: 8/17/2024, 10:08:05 AM

    This query materializes the same triples as with the first approach.

    # Choosing the Right Approach for Your Use Case

    1. Small Dataset, Easy Communication: If your dataset isn't large and you can easily set up communication between the Ontop SPARQL endpoint and the graph database, go with solution #2. It avoids dealing with files and intermediate storage.

    2. Large Dataset, Efficient Loading: For very large datasets, choose the most efficient loading solution supported by the triplestore, even if it requires more effort to set up.

    3. Materializing Fragments of the KG: Solution #2 allows easy materialization of specific fragments of the Knowledge Graph by adapting the SPARQL query. You can have hybrid KGs with some parts stored in the graph database and the rest kept virtual.

    4. Advantage of Keeping Data Virtual: Keeping data virtual is great for large volumes of sensor data that constantly update. It's better to keep this part virtual while storing rich contextual information in the graph database.

    # Ontology Usage

    If you're familiar with Ontop, you might have noticed that we didn't use an ontology in this example. Providing an ontology to Ontop can result in a significantly larger KG due to the reasoning capabilities embedded in Ontop. However, GraphDB also has reasoning capabilities, allowing reasoning to be done later in GraphDB, making materialization simpler and faster. If your graph database doesn't support reasoning, Ontop can handle it.

    Last Updated: 8/17/2024, 10:08:53 AM
    - +