Skip to content

0.1.1 Insert Data into Iceberg #21

Closed
@tusharchou

Description

@tusharchou

After you have the data from BigQuery and an Iceberg table ready, you can insert the dataset into Iceberg for storage.

Load the Iceberg table

from pyiceberg.table import Table
table = catalog.load_table("near.transactions")

Write data into Iceberg (converting Pandas DataFrame to PySpark DataFrame)

import pyspark
spark = pyspark.sql.SparkSession.builder.appName("IcebergApp").getOrCreate()
spark_df = spark.createDataFrame(transactions_df)

Append the data to the Iceberg table

table.new_append(spark_df).commit()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions