Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.1.1 Create a Google BigQuery Client
 #19

Open
tusharchou opened this issue Oct 1, 2024 · 10 comments · Fixed by #25 · May be fixed by #82
Open

0.1.1 Create a Google BigQuery Client
 #19

tusharchou opened this issue Oct 1, 2024 · 10 comments · Fixed by #25 · May be fixed by #82
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@tusharchou
Copy link
Owner

tusharchou commented Oct 1, 2024

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:

Create a BigQuery client

from google.cloud import bigquery
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.

@tusharchou tusharchou added enhancement New feature or request question Further information is requested labels Oct 1, 2024
@tusharchou tusharchou self-assigned this Oct 1, 2024
@tusharchou
Copy link
Owner Author

@mrutunjay-kinagi picking this up!

@tusharchou tusharchou changed the title Create a Google BigQuery Client
 0.1.1 Create a Google BigQuery Client
 Oct 1, 2024
@tusharchou
Copy link
Owner Author

Reviewing now

@mrutunjay-kinagi
Copy link
Collaborator

Reopening this issue to align with new approach as mentioned in #51

@mrutunjay-kinagi
Copy link
Collaborator

I'll be working on this. @tusharchou @redpheonixx

@tusharchou
Copy link
Owner Author

Hi @mrutunjay-kinagi Thanks you for picking this up.

We need a feature to login our credentials as a JSON template for GCP.

So that I can demo to the community

@tusharchou
Copy link
Owner Author

@mrutunjay-kinagi please create a pr to demo this capability

@mrutunjay-kinagi
Copy link
Collaborator

Pushed changes in PR #56

@tusharchou
Copy link
Owner Author

Thank you @mrutunjay-kinagi for working on this, and closing it

@tusharchou tusharchou linked a pull request Nov 4, 2024 that will close this issue
@redpheonixx
Copy link
Collaborator

image

@mrutunjay-kinagi
Copy link
Collaborator

This issue is resolved in PR #86
@tusharchou @redpheonixx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
3 participants