使用Python将数据从MySQL(内部部署)迁移到COSMOS(SQL api) [英] Migrating data from MySQL (on-premise) to COSMOS (SQL api) using Python
问题描述
大家好,
我被指派执行此类任务,但我对此非常陌生。
首先,我想使用Python将表转换为文档类型(JSON),或者建议使用更好的方法。
其次,然后我将这些文档存储在COSMOS DB中以供进一步使用。 / p>
我的问题是如何使用Python脚本执行此类任务?可以将Python脚本注入Data Factory吗?
我对这里的所有建议都很开放。
提前谢谢,
你好nat236919。 谢谢你的提问。 有许多方法可以完成您的任务。
以下是一些将数据从内部部署复制到云端的教程。 虽然教程在他们的示例中使用BLOB存储作为接收器,但切换为使用不同的服务作为接收器很容易。
https://docs.microsoft .com / zh-CN / azure / data-factory / tutorial-hybrid-copy-portal
https://docs.microsoft.com/en-us/azure/data-factory/tutorial-hybrid-copy-data-tool
如果这些教程满足您的需求,请将其标记为已回答。 否则可以随意提出更多问题。
Hello everyone,
I have been assigned to do such tasks, but I am extremely new to this.
Firstly, I want to transform a table into a document type (JSON) using Python, or any better ways as suggested.
Secondly, then I will store those docs in COSMOS DB for further use.
My questions are how can I use Python script to perform such tasks? Can Python scripts be injected to Data Factory for this?
I am really open to all suggestions here.
Thank you in advance,
Hello nat236919. Thank you for your question. There are a number of ways to accomplish your task.
Here are some tutorials for copying data from on premise to the cloud. Although the tutorials use BLOB storage as a sink in their example, switching to use a different service as a sink is easy.https://docs.microsoft.com/en-us/azure/data-factory/tutorial-hybrid-copy-portal
https://docs.microsoft.com/en-us/azure/data-factory/tutorial-hybrid-copy-data-tool
If these tutorials satisfy your needs, please mark this as answered. Otherwise feel free to ask more questions.
这篇关于使用Python将数据从MySQL(内部部署)迁移到COSMOS(SQL api)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!