@SuppressWarnings({"squid:S2093"}) // ignore try-with-resources
  private static int importFromTargetPath() {
    AbstractImportSchema importSchema;
    try {
      if (sqlDialectTree) {
        importSchema = new ImportSchemaTree();
      } else {
        importSchema = new ImportSchemaTable();
      }
      importSchema.init();
      AbstractImportSchema.init(importSchema);
      return Constants.CODE_OK;
    } catch (InterruptedException e) {
      ioTPrinter.println(String.format("Import schema fail: %s", e.getMessage()));
      Thread.currentThread().interrupt();
      return Constants.CODE_ERROR;
    } catch (Exception e) {
      ioTPrinter.println(String.format("Import schema fail: %s", e.getMessage()));
      return Constants.CODE_ERROR;
    }
  }
Specifying a CSV file or a directory including CSV files that you want to import. This method
can be offered to console cli to implement importing CSV file by command.

@return the status code
@throws IoTDBConnectionException
iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ImportSchema.java