Skip to content

Instantly share code, notes, and snippets.

View Shuaib-8's full-sized avatar
🎯
Focusing

Shuaib-8

🎯
Focusing
  • London, United Kingdom
  • 02:29 (UTC +01:00)
View GitHub Profile
from google.cloud import bigquery
from google.oauth2 import service_account
credentials = service_account.Credentials.from_service_account_file('FILE PATH JSON')
project_id = 'PROJECT ID'
client = bigquery.Client(credentials = credentials, project = project_id)
# Example querying
@Shuaib-8
Shuaib-8 / SQL_data_types_check.sql
Created March 2, 2020 13:13
SQL determining data types sanity check
-- Get the column name and data type
SELECT column_name, data_type
-- From the system database information schema
FROM INFORMATION_SCHEMA.COLUMNS
-- For the customer table
WHERE table_name = <'table_name'>;