code: public static URI toLocation(URI sourceUri, String table) {
          getLocationType(sourceUri); // Raises an exception if the location type is invalid.
          return UriBuilder.fromUri(sourceUri).path(table).build();
      }
docs: Returns a Location URI from a source URI and table name.