What PySpark API would you use to write a transformed DataFrame as an Iceberg table in watsonx.data?
Select an answer to reveal the explanation.
Short Explanation
The DataFrameWriterV2 API (writeTo) with .using('iceberg') writes the DataFrame as an Iceberg-managed table; registering metadata in the catalog and writing optimized Parquet data files to the object storage location.
Full Explanation
The DataFrameWriterV2 API (writeTo) with .using('iceberg') writes the DataFrame as an Iceberg-managed table; registering metadata in the catalog and writing optimized Parquet data files to the object storage location. The incorrect options ("df.saveAsTextFile('s3://bucket/table')", "df.write.format('parquet').save('s3://bucket/table')", "df.toJSON().saveAsSequenceFile('hdfs://table')") are distractors that don't fully capture the concept described.