lester
1
NOTE: This question was originally posted in the Trino Slack’s beginner channel by Hubert Irzyk.
Hi! We are sending requests to Trino from our Java application and I have a couple of questions:
- Is it possible to generate a custom queryId for a Trino request and attach it when sending the request?
- Is there a way to obtain the queryId from the Trino response?
lester
2
NOTE: This answer was provided by chenjian2664 (chenjian2664) · GitHub
Not able to custom queryId format, but you could put the info in source or clientTags then you could consume it in the downstream
you could set a callback https://github.com/trinodb/trino/blob/9b33f37182cb6a117082390930f66e2cb70b0c68/client/trino-jdbc/src/main/java/io/trino/jdbc/TrinoStatement.java#L62-L65 and obtain queryId there
1 Like