I am trying to invoke maria db sql query via python system.db.runPrepQuery but the query is a little more complex than usually. The query runs fine in maria db and it has 2 global parameters at the beginning which define start and end time needed for the query.
I tried the syntax below which does not work and error is pointing at the very first line and parameter that cannot be assigned - any ideas how to fix that? In particular how to pass or wrap in quotes the global parameters. Example of the function is below:
SET @StartTime = DATE_FORMAT(str(?),’%Y-%m-%d %H:%i:%s’);
SET @EndTime= DATE_FORMAT(str(?),’%Y-%m-%d %H:%i:%s’);
SELECT SOME SQL CODE HERE WHICH DOES NOT MATTER
resultsDataSet = system.dataset.toDataSet(resultsPyDataSet)