如何自动化将 txt 文件数据从 Azure 逻辑应用程序上传到本地 Oracle 数据库的过程?

How I can automate a process that uploads txt file data from Azure Logic App to on-premise Oracle database?

这是我每月例行的流程:

  1. 我收到了另一家公司的文本文件。
  2. 我通过调用 sqlldr.exe 将文件加载到 Oracle 数据库中。
  3. 运行 Oracle 数据库中的几个存储过程。
  4. 将一个存储过程的输出导出到CSV文件 我想通过使用 Azure Logic App 或 Azure 函数来自动执行此过程,是否可行?

感谢 Skin 提出 Azure 的使用。您可以使用许多构建块,一个虚拟机。你可以在虚拟机上触发它可以灵活使用任何你想要的。

但是在您的要求中,您必须使用以下步骤来实现此目的。

我不认为在 azure 函数和逻辑应用程序中使用此模块时使用 sqlldr.exe 会很复杂。

因此您可以使用 BCP 来实现这一点,这是使用 azure 函数将文件数据加载到数据库中的易用性。

这里可以使用Logic App & Azure功能来实现。

创建一个 azure 函数来执行以下任务

  1. I received a text file from another company.
  2. I load the file into the Oracle database by calling sqlldr.exe.

您可以使用 BCP.

而不是使用 SQLDIR.EXE

检查对 use BCP to load the file into the database 的引用。

完成上述过程后,创建逻辑应用程序并在流程中包含 azure 函数。

Select Azure 函数并添加您创建的 azure 函数。

  1. Run a couple of store procedures in the Oracle database.
  2. Export output of one store procedure to CSV file

接下来您可以使用 oracle 数据库 并使用操作作为执行存储过程并配置您的 oracle 服务器和 运行 您的存储过程。

参考here了解更多信息