Stream CSV data via PubSub into BigQuery using simple Python scripts and the Google Cloud libaries for PubSub and Bigquery. These scripts do not use a GCP service account. They assume that application default credentials are in use.
gcloud auth application-default login
For best results use Python 3.
PubSub and BigQuery APIs should be enabled. Create a PubSub topic and subscription. Create a BigQuery dataset and table.
For best results use Python 3.
pip3 install requirements.txt
python3 stream_and_pub.py
python3 sub_and_insert.py