public static Table createTable(Configuration conf, Properties props) {
    Schema schema = schema(props);
    PartitionSpec spec = spec(props, schema);
    String location = props.getProperty(LOCATION);
    String catalogName = props.getProperty(InputFormatConfig.CATALOG_NAME);

    Map<String, String> map = filterIcebergTableProperties(props);

    Optional<Catalog> catalog = loadCatalog(conf, catalogName);
    SortOrder sortOrder = getSortOrder(props, schema);
    if (catalog.isPresent()) {
      String name = props.getProperty(NAME);
      Preconditions.checkNotNull(name, "Table identifier not set");
      return catalog.get().buildTable(TableIdentifier.parse(name), schema).withPartitionSpec(spec)
          .withLocation(location).withProperties(map).withSortOrder(sortOrder).create();
    }

    Preconditions.checkNotNull(location, "Table location not set");
    return new HadoopTables(conf).create(schema, spec, sortOrder, map, location);
  }
Creates an Iceberg table using the catalog specified by the configuration.
<p>
The properties should contain the following values:
<ul>
<li>Table identifier ({@link Catalogs#NAME}) or table path ({@link Catalogs#LOCATION}) is required
<li>Table schema ({@link InputFormatConfig#TABLE_SCHEMA}) is required
<li>Partition specification ({@link InputFormatConfig#PARTITION_SPEC}) is optional. Table will be unpartitioned if
 not provided
</ul><p>
Other properties will be handled over to the Table creation. The controlling properties above will not be
propagated.
@param conf a Hadoop conf
@param props the controlling properties
@return the created Iceberg table
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java