Link create prepared statement jobs to execute statement jobs

Hello,

we are using the Dremio API to get some statistics on the execution of jobs. The problem we have is that some users use create statements and it creates biased query volumes (doubling counts) and/or biased total query durations if we try to add up create and execute statements (not that well also without a clear common key…).

Is there a way in the Dremio API or a system table to unambiguously link corresponding “create prepared statement” and “execute prepared statement” jobs ?

Thanks & Regards,
Alexandre

@allCag I expect the SQL should match other than one being CREATE PREPARE and the other one EXECUTE PREPARE. Can you validate that? If that is the case then use the jobs API to print query text and match them if they are the same