The query()
function is executed on a view that resides in one of the projects.
Syntax and Example
Project mindsdb = server.getProject();
Query viewQuery = mindsdb.query("SELECT * FROM mindsdb.car_info_view LIMIT 10;");
You can query for newly added data using the functionality introduced by the Last
keyword as follows:
View carInfoView = server.getView("car_info_view");
Query filterQuery = carInfoView.track("timestamp_column");
System.out.println(filterQuery.fetch());