This fixes issue #1 #2

Open
j wants to merge 123 commits from Branch_Karen into main
2 changed files with 11 additions and 10 deletions
Showing only changes of commit 4930f69a01 - Show all commits
+5 -5
View File
@@ -3,8 +3,9 @@ import csv
import os
import asyncio
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "C:/Users/Karen/AppData/Roaming/gcloud/application_default_credentials.json"
project_id = "fp-20230425"
# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "C:/Users/Karen/AppData/Roaming/gcloud/application_default_credentials.json"
# project_id = "fp-20230425"
project_id = "svig-384801"
'''
topic_name = "fp-topic-NFL-zipcodes"
@@ -28,8 +29,6 @@ publisher = pubsub_v1.PublisherClient()
topic_name = "fp-topic-NFL-zipcodes"
topic_path = publisher.topic_path(project_id, topic_name)
# Create a Pub/Sub subscription
subscriber = pubsub_v1.SubscriberClient()
'''
@@ -41,7 +40,8 @@ subscription = subscriber.create_subscription(
'''
# Publish a message to the topic
# Read the data from the csv file
file_path = "C:/Users/Karen/Desktop/zipcodes.csv"
# file_path = "C:/Users/Karen/Desktop/zipcodes.csv"
file_path = "zipcodes.csv"
with open(file_path, "r") as csv_file:
reader = csv.reader(csv_file)
+5 -4
View File
@@ -3,8 +3,9 @@ import csv
import os
import asyncio
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "C:/Users/Karen/AppData/Roaming/gcloud/application_default_credentials.json"
project_id = "fp-20230425"
# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "C:/Users/Karen/AppData/Roaming/gcloud/application_default_credentials.json"
# project_id = "fp-20230425"
project_id = "svig-384801"
'''
topic_name = "fp-topic-NFL-zipcodes"
@@ -37,11 +38,11 @@ subscription_path = subscriber.subscription_path(project_id, subscription_name)
subscription = subscriber.create_subscription(
name=subscription_path, topic=topic_path
)
'''
# Publish a message to the topic
# Read the data from the csv file
file_path = "C:/Users/Karen/Desktop/NFL_Cities.csv"
# file_path = "C:/Users/Karen/Desktop/NFL_Cities.csv"
file_path = zipcodes.csv
with open(file_path, "r") as csv_file:
reader = csv.reader(csv_file)