ashoksri0 opened a new issue #3299:
URL: https://github.com/apache/iceberg/issues/3299
`
public class SampleIngestion_test {
private static final Logger logger =
LogManager.getLogger(SampleIngestion_test.class);
public static void main(String[] args) throws IOException {
final Configuration configuration = new Configuration();
configuration.set("spark.sql.catalog.spark_catalog","org.apache.iceberg.spark.SparkSessionCatalog");
configuration.set("spark.sql.catalog.spark_catalog.type","hive");
configuration.set("spark.sql.catalog.spark_catalog.warehouse","hdfs://localhost:54310/test");
configuration.set("spark.sql.warehouse.dir","hdfs://localhost:54310/test");
configuration.set("hive.metastore.warehouse.dir","hdfs://localhost:54310/test");
configuration.set("hive.metastore.uris", "thrift://localhost:9083");
HiveCatalog hiveCatalog = new HiveCatalog();
hiveCatalog.setConf(configuration);
Map<String, String> properties =new HashMap<>();
hiveCatalog.initialize("hive",properties);
final Table table =
hiveCatalog.loadTable(TableIdentifier.of(Namespace.of("claims_sys"),
"SUBSCRIBER"));
System.out.println(table.location());
PartitionSpec partitionSpec = PartitionSpec
.builderFor(table.schema())
.build();
final InputFile inputFile =
Files.localInput("/home/ash/data/claim_sys/parquet(copy)" +
"/SUBSCRIBER/part-00000-ca14f1f2-2567-4bb6-a681-0c9944afabcd" +
"-c000" +
".snappy.parquet");
final DataFile dataFile = DataFiles.builder(partitionSpec)
.withFormat(FileFormat.PARQUET)
.withInputFile(inputFile)
.withFileSizeInBytes(inputFile.getLength())
.withRecordCount(10000)
.build();
table.newAppend().appendFile(dataFile);
}
}`
by using the above code, I can see the metadata folder inside HDFS in
SUBSCRIBER table folder but not the data
please guide to how to do it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]