azure - 在 Azure Blob 存储(或其他服务)中加载外部数据
问题描述
几个小时以来,我一直在尝试在 Azure 数据工厂和 Azure SQL Server 上找到解决问题的方法。
我无法相信做这个“简单的任务”有多复杂。好吧,它可能是我自己,我刚从天蓝色开始。
我有一个 Google Drive Sheet,我想将它上传到 Microsoft Azure SQL Server 的数据表中。该文件将每小时更新一次,因此该过程将每小时运行一次。
到目前为止,我尝试了什么。
1:我创建了一个 excel 文件,它连接到我的 Google 表格的https://www.excell-en.com/link-google-sheets-to-excel-tutorial 。我希望我能够将 azure 连接到 excel,转换为 CSV 并将其发送到 Microsoft SQL Server。不成功
我在我的谷歌表格中做了一个自动 CSV 导出,我可以从我的驱动器云中导入外部数据https://docs.microsoft.com/en-us/azure/storage/common/storage-import-export-data -to-blob?toc=/azure/storage/blobs/toc.json。不成功
我试图在 azure 中运行 python 脚本。我在导入库时遇到了困难并且不成功。
import pandas as pd import CSV datagooglesheets = "https://docs.google.com/spreadsheets/d/11wCTgaHMM/export?format=csv&gid=1659475835" datadictionnaryfull = "https://docs.google.com/spreadsheets/d/1Mv8hE/export?format=csv&gid870497447" datagooglesheets=pd.read_csv(datagooglesheets, sep=",", error_bad_lines=False, index_col=False, dtype="unicode",low_memory=False, na_values=["NA"]) datadictionnaryfull=pd.read_csv(datadictionnaryfull, sep=",", error_bad_lines=False, index_col=False, dtype="unicode",low_memory=False, na_values=["NA"]) datadictionnaryfull.rename(columns = {"drug_name":"all_drug_name"}, inplace = True)
尝试一下,我可以通过这种方式加载外部 google CSV 文件吗?https://abouconde.com/2019/03/03/attach-or-detach-an-external-storage-account-microsoft-azure-storage-explorer/
任何免费的解决方案将不胜感激!
工作流程是
- 加载 Azure Excel 表/或 google 表/或来自 Google Drive 的 Csv/或 Microsoft Drive 上的 CSV
- 将数据导入 Azure(每小时安排一次)
- 在 Azure SQL Server 数据表中返回(每小时更新新表)
解决方案
因此,对于您提到的工作流,您应该尝试使用 Azure 逻辑应用,它提供了最小的编码解决方案以及更少麻烦的方法。当我切换到它时,它对我来说也更便宜。 https://azure.microsoft.com/en-us/services/logic-apps/#overview
推荐阅读
- html - 我需要帮助来设置下拉菜单的样式
- php - PHP 表单 POST 变量为空
- django - Django:有没有办法从 mail_admins 日志处理程序中过滤掉 503 个“服务不可用”响应?
- c++ - 我可以逐个元素删除数组元素吗?
- python - python 使用 ord() 和 getch() 来获取 unicode
- unity3d - 统一碰撞的奇怪行为
- c# - 有没有办法使用枚举中包含的枚举自动填充 C# HashSet?
- sql - MS SQL 中的外键引用无效列错误
- reactjs - 使用 craco 在 creat-react-app 中导入别名未按预期工作
- python - 从样式表解析属性值以绘制自定义小部件