Member-only story
Overcoming Limitations: Creating Custom Views in Trino Connectors (JDBC) without Native Support
During a feasibility test using distributed SQL (Trino/Starburst) for handling large volume Adhoc SQL queries, a common challenge arose. Trino, an open-source distributed SQL query engine, supports various connectors for interacting with different data sources. However, we discovered that creating views/tables on Oracle-based connectors was not directly supported by Trino. In this article, we will explore a solution to overcome this limitation by leveraging a dummy connector to create custom views in Trino.
Solution Steps:
- Create a Dummy Connector:
To enable the creation of custom views in Trino, we need to set up a dummy connector. This connector will serve as a catalog for storing the custom views and tables.
Create a new file named dummy.properties and add the following content:
connector.name=memory
- Restart Trino:
Restart the Trino server to apply the configuration changes and make the dummy connector available.
- Verify and Select the Catalog:
Check the available catalogs using the following command:
trino> show catalogs;
atalog
---------
dummy
jmx…