[ZEPPELIN-1988] trim precode

This commit is contained in:
Tinkoff DWH 2017-03-05 13:00:21 +05:00
parent 42ffcb7f75
commit cd46cce05e

View file

@ -547,6 +547,7 @@ public class JDBCInterpreter extends Interpreter {
private void executePrecode(Connection connection) throws SQLException {
String precode = getProperty(ZEPPELIN_JDBC_PRECODE_KEY);
if (StringUtils.isNotBlank(precode)) {
precode = StringUtils.trim(precode);
logger.info("Run SQL precode '{}'", precode);
try (Statement statement = connection.createStatement()) {
statement.execute(precode);