[英]Uploading Data from a CSV file to a Google Cloud SQL Instance using Python in Pycharm
I am having trouble figuring out how to upload data from a CSV file to an SQL instance on Google Cloud.我无法弄清楚如何将数据从 CSV 文件上传到 Google Cloud 上的 SQL 实例。 The scope of my project right now is to collect data from a website, import it into a CSV file, and then upload the data from the CSV file into my Cloud SQL instance, all automated by Python.我现在的项目范围是从网站收集数据,将其导入 CSV 文件,然后将 CSV 文件中的数据上传到我的 Cloud SQL 实例,所有这些都由 Python 自动化。 My IDE where I write my code in is in Pycharm, so I was wondering if it's possible to have Python handle everything- are there any necessary Python libraries that I have to import?我在其中编写代码的 IDE 是在 Pycharm 中,所以我想知道是否可以让 Python 处理所有事情——是否有任何我必须导入的必要 Python 库?
Yes you can do all of this in python.是的,你可以在 python 中完成所有这些。 There's 3 things to do here.这里有 3 件事要做。
Also, read up on how to connect from whereever you're running your code to a Cloud SQL instance.此外,请阅读有关如何从运行代码的任何位置连接到 Cloud SQL 实例的信息。 I very strongly advise to use the Cloud SQL proxy as described in this article .我非常强烈建议中所述使用云SQL代理这篇文章。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.