Use Python's BigQuery API to pull the data from the Near Protocol dataset. For example, this code queries the transactions table and retrieves the data for processing:
python
from google.cloud import bigquery
Create a BigQuery client
client = bigquery.Client()
Define your query to pull data from Near Protocol dataset
query = """
SELECT *
FROM bigquery-public-data.crypto_near.transactions
LIMIT 1000;
"""
Run the query and convert the result to a Pandas DataFrame
Use Python's BigQuery API to pull the data from the Near Protocol dataset. For example, this code queries the transactions table and retrieves the data for processing: python
from google.cloud import bigquery
Create a BigQuery client
client = bigquery.Client()
Define your query to pull data from Near Protocol dataset
query = """ SELECT * FROM
bigquery-public-data.crypto_near.transactions
LIMIT 1000; """Run the query and convert the result to a Pandas DataFrame
query_job = client.query(query) transactions_df = query_job.to_dataframe()
This retrieves the transaction data, which you can load into Apache Iceberg for storage and further processing.