Reputation: 37
There's a guide that I followed to query BigQuery using Python from here.
At the bottom, here's the code snippet that I'm confused about:
NameGeo = bqdata["schema"]["fields"][0]["name"]
NameVal = bqdata["schema"]["fields"][1]["name"]
table.add_column(NameGeo, unicode, NameGeo)
table.add_column(NameVal, float, NameVal)
for row in bqdata["rows"]:
table.append(["US-"+row["f"][0]["v"], float(row["f"][1]["v"])])
I don't understand what this whole "schema
" and "field
" thing is...
I understand that they're columns, because I've changed it based upon what I need. However now I need to add an N number of columns, and I'm just not sure how I'd go about doing that!
Any help would be nice.
Upvotes: 1
Views: 88
Reputation: 37
Turns out I'm a dummy, and was just searching for the wrong thing.
Found documentation that goes over everything I just asked. Doi.
For anyone else that's in the same boat Here's the link to the BigQuery API Documentation
Upvotes: 1