-
1. Re: teiid how do I get translated query?
rareddy May 25, 2017 10:01 AM (in response to kulbhushanc)Command Logging Logging · Teiid Documentation
-
2. Re: teiid how do I get translated query?
kulbhushanc May 26, 2017 3:40 AM (in response to rareddy)Thanks Ramesh,
@link Logging · Teiid Documentation it's already mentioned that:
sql: is the command submitted to the engine or to the translator for execution - which is NOT necessarily the final sql command submitted to the actual data source. But it does show what the query engine decided to push down.
Can I get that actual query submitted to the datasource?
-
3. Re: teiid how do I get translated query?
shawkins May 26, 2017 8:30 AM (in response to kulbhushanc)The issue [TEIID-3361] Add source query details to the command log - JBoss Issue Tracker does add the exact source query for most sources that have a textual query. It should appear in command log as sourceCommand=...
A documentation issue needs to be added as that is not covered on the doc page.
-
4. Re: teiid how do I get translated query?
kulbhushanc Jun 2, 2017 1:31 AM (in response to shawkins)I checked the logs, it doesn't have any entry about sourceCommand= ...
-
5. Re: teiid how do I get translated query?
van.halbert Jun 2, 2017 7:28 AM (in response to kulbhushanc)If' COMMAND LOGGING has been enabled, as indicated in the Logging section in the documentation, you should see an entry in the command log that looks like the following example:
requestID=BRgFRZQoDY6a.0 sourceCommandID=0 executionID=0 txID=null modelName=TestDS translatorName=h2 sessionID=BRgFRZQoDY6a principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."ID_WORKSPACE" AS c_0, g_0."LOOK" AS c_1, g_0."ENVELOPE" AS c_2, g_0."URL" AS c_3, g_0."DEFAULT_WORKSPACE" AS c_4, g_0."HOME_SEARCH_MODE" AS c_5 FROM "DASHB_WORKSPACE" AS g_0 ORDER BY c_0]
-
6. Re: teiid how do I get translated query?
shawkins Jun 2, 2017 9:04 AM (in response to van.halbert)What translator are you using?
-
7. Re: teiid how do I get translated query?
kulbhushanc Jun 5, 2017 3:01 AM (in response to shawkins)I am trying this scenario with Mysql Database, I am using mysql5 as a translator, the entry in standalone-teiid.xml is
<translator name="mysql5" module="org.jboss.teiid.translator.jdbc"/>
-
8. Re: teiid how do I get translated query?
shawkins Jun 6, 2017 7:36 AM (in response to kulbhushanc)With a jdbc translator, such as mysql, you should expect to see a log just as Van shows above when the detail/debug level is enabled for the org.teiid.COMMAND_LOG context. What does your logging configuration look like?