Didn’t Find the Data Source You Want? Contribute!

With the interfaces ThirdEye provide, it is not too difficult to add a new data source. Please refer to SQL and Pinot data source code sql/ and pinot/ under thirdeye-pinot/config/data-sources. Contributions are highly welcomed. If you have any question, feel free to contact us.

If it is a SQL based data source and can be connected via JDBC

Under thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/datasource/sql/:

In SqlResponseCacheLoader.java, refer to Presto and MySQL code and add relevent code for the loader. In SqlUtils.java, you may need to change some SQL queries according to your data source.

That’s it! Then you can add corresponding database config to thirdeye-pinot/config/data-sources/data-sources-config.yml, and see your database showing up on Import metric from Presto/MySQL page and import it the same way.

If it is not SQL based

One interface is required to be implemented: ThirdEyeDataSource:

For ThirdEyeDataSource, execute is the most important function to implement, which returns a ThirdEyeResponse. The ThirdEyeResponse can be built using RelationalThirdEyeResponse.

CacheLoader is highly recommended to be used by ThirdEyeDataSource to improve performance. To learn more, please refer to our existing code for Pinot and SQL, or learn more at CacheLoader (Google Core Libraries for Java).

Again, Please refer to SQL and Pinot data source code sql/ and pinot/ under thirdeye-pinot/config/data-sources.