Before calling the Jupyter Notebook, i run the below code in Terminal for Google Application Credentials :
export GOOGLE_APPLICATION_CREDENTIALS="/Users/mac/Desktop/Bigquery-Key.json"
Then set the below configuration in Jupyter Notebook :
%load_ext google.cloud.bigquery
# Imports the Google Cloud Client Library
from google.cloud import bigquery
# Instantiates a Client for Bigquery Service
bigquery_client = bigquery.Client()
Now, i wanted to write a Python script(.py file) which will do both the tasks instead of using Terminal.
How can it be done ? Kindly advise ? Thanks