Getting Started: Database
Currently, the easiest way to use Nansen Query via a commercial database is via Google BigQuery. We're in the process of evaluating additional cloud vendors to facilitate additional access.
Before you can access Nansen Query via BigQuery, you will have to take the following steps in order to setup BigQuery. All the information can be found on Google BigQuery Guide.
- Create a billing account for your Google Cloud Project. Note this is required even when using free tier services within Google Cloud
- Authenticate with your Google Account and accept the terms of service
- Create a Google Cloud project. For example, call it "Nansen Query"
- Once the project has been created, you should land on a blank BigQuery console page
- Next to the Explorer, click on "Add Data", select "Pin a Project", then select "Enter Project Name"
Enter Project Name
nansen-queryas the project name and click "PIN"
- If everything worked, you should now see Nansen Query datasets in your Explorer and can begin writing queries against the dataset!
Sample SQL statements using Nansen Query dataset
- To execute a query, enter a valide SQL statement in the editor. A sample statement can be found below:
SUM(CAST(balance / 1e18 AS FLOAT64)) AS eth_balance,
GROUP BY address
ORDER BY eth_balance DESC
- When the query is completed the results will appear in the Query Results section below the Query editorBigQuery Query Results Window
- The results can then be saved locally, to a Google drive folder, or exported to another Google Cloud productExporting Query Results into Sheets, Looker, or Colab NotebookSavings Query Results to CSV, Google Drive, or Clipboard
Last modified 2mo ago