def _ensure_format(obj): if isinstance(obj, FileFormat): return obj elif obj == "parquet": return ParquetFileFormat() elif obj in {"ipc", "arrow", "feather"}: return IpcFileFormat() elif obj == "csv": return CsvFileFormat() else: raise ValueError("format '{}' is not supported".format(obj))
def _ensure_format(obj): if isinstance(obj, FileFormat): return obj elif obj == "parquet": return ParquetFileFormat() elif obj in {"ipc", "arrow", "feather"}: return IpcFileFormat() elif obj == "csv": return CsvFileFormat() elif obj == "rados-parquet": return RadosParquetFileFormat("/etc/ceph/ceph.conf", "cephfs_data") else: raise ValueError("format '{}' is not supported".format(obj))