@Override
      public void execute(String batchQueryText, int batchRowCount) throws MetaException {
        Object[] params = new Object[batchRowCount * columnCount];
        int paramIndex = 0;
        for (int index = 0; index < batchRowCount; index++) {
          Long stringListId = it.next();
          Long sdId = stringListIdToSdId.get(stringListId);
          params[paramIndex++] = sdId;
          params[paramIndex++] = stringListId;
          if (prevSdId != sdId) {
            colIndex = 0;
          }
          params[paramIndex++] = colIndex++;
          prevSdId = sdId;
        }
        executeQuery(batchQueryText, params);
      }
Interface to execute multiple row insert query in batch for direct SQL
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlInsertPart.java