maor ankri
maor ankri

Reputation: 51

Adding GDELT to BigQuery

I've been trying to add GDELT events data to BigQuery with no success so far.. I use the link below in my attmpets; clicking view dataset >> create table >> add arbitrary table name >> create table and then I get this error:

You are missing permissions and may need to talk to your administrator. Original error message: Failed to create table: Access Denied: Dataset gdelt-bq:gdeltv2: Permission bigquery.tables.create denied on dataset gdelt-bq:gdeltv2 (or it may not exist).

I tried changing my roles to admin and data editor but I still get the same error above.

Anyone who can help?

https://console.cloud.google.com/marketplace/details/the-gdelt-project/gdelt-2-events?filter=solution-type:dataset&id=a41570ce-2ee5-444c-80d8-1dd6ee6602ad&walkthrough_tutorial_id=java_gae_quickstart _gae_quickstart

Upvotes: 0

Views: 508

Answers (2)

kong hector
kong hector

Reputation: 11

Steps to Use BigQuery with the GDELT Database

  1. Set Up a Google Cloud Account If you haven't already, sign up for a Google Cloud account. New users often get free credits to start with, which you can use for BigQuery.
  2. Access BigQuery Go to the Google Cloud Console. Navigate to BigQuery from the left-hand menu under Big Data.
  3. Add the GDELT Dataset In the BigQuery console, click on the + Add Data button, then select Explore public datasets. Search for "GDELT" and click on it. You'll see several datasets available for different aspects of the GDELT data.
  4. Querying the GDELT Dataset You can write SQL queries directly in the BigQuery console to analyze the data. Here’s an example query that counts the number of events by country for the year 2023:

SELECT ActionGeo_CountryCode, COUNT(*) AS event_count FROM gdelt-bq.gdeltv2.events WHERE Year = 2023 GROUP BY ActionGeo_CountryCode ORDER BY event_count DESC;

The sql code can not show itself in the right format, see the picture below

Two Pictures below show themselves clearly

pic.1 enter image description here

pic.2 enter image description here

Upvotes: 1

Poala Astrid
Poala Astrid

Reputation: 832

GDELT is a public dataset where it can't be edited or you can't create a table without the administrator's permissions. Even if you tried changing your roles to Admin and Data Editor, the changes you made are within your project only. The ones who handle GDELT dataset are the ones who will grant you the permissions, but I don't think it is possible since GDELT is for public use.

I highly recommend the procedure written in the comment above for you to be able to view and explore GDELT database.

Upvotes: 1

Related Questions