private void commandExecuteFile(CliCommand command) throws ExecutorException {
    String fullCmdStr = command.getFullCommand();
    String parameters = command.getParameters();
    URI uri = null;
    boolean valid = false;
    File file = null;
    try {
      uri = new URI(parameters);
      file = new File(uri.getPath());
      valid = file.exists() && !file.isDirectory();
    } catch (URISyntaxException e) {
    }
    if (!valid) {
      writer.println("Invalid URI.");
      writer.flush();
      return;
    }

    NonQueryResult nonQueryResult = executor.executeNonQuery(exeContext, file);
    executions.put(nonQueryResult.getExecutionId(), fullCmdStr);
    List<String> submittedStmts = nonQueryResult.getSubmittedStmts();
    List<String> nonsubmittedStmts = nonQueryResult.getNonSubmittedStmts();

    writer.println("Sql file submitted. Execution ID: " + nonQueryResult.getExecutionId());
    writer.println("Submitted statements:");
    if (submittedStmts == null || submittedStmts.size() == 0) {
      writer.println("\tNone.");
    } else {
      for (String statement : submittedStmts) {
        writer.print("\t");
        writer.println(statement);
      }
    }

    if (nonsubmittedStmts != null && nonsubmittedStmts.size() != 0) {
      writer.println("Statements NOT submitted:");
      for (String statement : nonsubmittedStmts) {
        writer.print("\t");
        writer.println(statement);
      }
    }

    writer.println("Note: All query statements in a sql file are NOT submitted.");
    writer.flush();
  }
Handles the given command
@param command input {@link CliCommand} to handle
@return false if command is to quit, or fatal error happened that Shell should not continue running. True o.w.
@throws CommandHandlerException if unrecoverable error happened while handling the input {@link CliCommand}
samza-sql-shell/src/main/java/org/apache/samza/sql/client/impl/CliCommandHandler.java