Skip to content

Commit

Permalink
[ZEPPELIN-6003] Log source info of SQL in JDBCInterpreter (apache#4732)
Browse files Browse the repository at this point in the history
* [ZEPPELIN-6003] Log detail info of SQL in JDBCInterpreter

* Update

Co-authored-by: Philipp Dallig <philipp.dallig@gmail.com>

---------

Co-authored-by: Philipp Dallig <philipp.dallig@gmail.com>
(cherry picked from commit 57331ef)
  • Loading branch information
kevinjmh committed Apr 18, 2024
1 parent 523075a commit daa51e1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ private InterpreterResult executeSql(String sql,
Statement statement;
ResultSet resultSet = null;
String paragraphId = context.getParagraphId();
String noteId = context.getNoteId();
String user = getUser(context);

try {
Expand Down Expand Up @@ -778,7 +779,7 @@ private InterpreterResult executeSql(String sql,
// so we need to trim it first in this case.
sqlToExecute = sqlToExecute.trim();
}
LOGGER.info("Execute sql: " + sqlToExecute);
LOGGER.info("[{}|{}|{}] Execute sql: {}", user, noteId, paragraphId, sqlToExecute);
statement = connection.createStatement();

// fetch n+1 rows in order to indicate there's more rows available (for large selects)
Expand Down

0 comments on commit daa51e1

Please sign in to comment.