I want to retrieve data from Google big query. But user authentication is not happening for me. This is the message I am getting.
"Access Denied: Project bigquery-public-data: The user [email protected] does not have bigquery.jobs.create permission in project bigquery-public-data"
Here is the code:
from google.cloud import bigquery
from google.oauth2 import service_account
credentials = service_account.Credentials.from_service_account_file(
'NYCTaxi-c81bd00c9864.json')
project_id = 'bigquery-public-data'
client = bigquery.Client(credentials= credentials,project=project_id)
query_job = client.query("""
SELECT *
FROM new_york.tlc_yellow_trips_2016
LIMIT 1000""")
results = query_job.result() # Waits for job to complete.