Quoted Identifiers in TDengine

30 views
Skip to first unread message

Stefan Bischof

unread,
Feb 22, 2024, 9:55:57 AM2/22/24
to ontop4obda
Hi all!

I'm currently trying to the timeseries database TDengine (https://tdengine.com/) from ontop. TDengine uses backticks instead of double quotes for quoted identifiers in SQL queries.

For example, a simple SQL query looks like this:

SELECT * FROM `mydb`.`my_table`;

and double quotes are not allowed by the SQL engine.

What works: I can establish a connection from ontop to the database and I can create and debug mappings from the Protege plugin.
What doesn't work: I can not start the reasoner because it can not find the table, exactly because of this backtick issue.

Now my question: is there an easy way to configure ontop to use backticks instead of double quotes for quoted identifiers?
I already tried to use the python scaffolding tool, but couldn't find an obvious way to configure this.

Best,
Stefan Bischof

LB

unread,
Feb 22, 2024, 10:38:38 AM2/22/24
to ontop...@googlegroups.com

Hi,


I think in the Ontop properties file can can change parts of the used components for the creation of the SQL query. I can't find better docs but in the dev section you can see the different components that make up a DB system in Ontop: https://ontop-vkg.org/dev/db-adapter.html#declaring-an-implementation

I think for you the SQLQuotedIDFactory is relevant and MySQL and Apache Spark, among others, do also have backticks escaping.

So starting from the JDBC driver name (not sure if this is the correct one)


and probably changing the metadata provider to MySQL might work? You can try to add this line to your Ontop properties file


com.taosdata.jdbc-metadataProvider = it.unibz.inf.ontop.dbschema.impl.MySQLDBMetadataProvider


Lorenz

--
Please follow our guidelines on how to report a bug https://ontop-vkg.org/community/contributing/bug-report
---
You received this message because you are subscribed to the Google Groups "ontop4obda" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontop4obda+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ontop4obda/8cefb88c-92b8-4d30-b3ad-e1e09922d110n%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages