您可以使用“HTTP 插件”来完成此操作,但您只会收到包含文件内容的 HTTP 正文内的文本响应。
In the Data Fusion, you should create pipeline (you've already did it, but you can try newer version)
GCS Configuration:
对于端点,我在 Google Compute Engine 中创建了一个虚拟机。
HTTP Plugin Configuration:
运行接收器之前你应该安装某种 HTTP 服务,例如龙卷风网络服务器 https://www.tornadoweb.org/en/stable/
$ sudo apt install python
$ sudo apt install python-pip
$ pip install tornado
创建如下脚本来观察 http 请求:
#!/usr/bin/env python
import tornado.ioloop
import tornado.web
import pprint
class MyDumpHandler(tornado.web.RequestHandler):
def post(self):
pprint.pprint(self.request)
pprint.pprint(self.request.body)
if __name__ == "__main__":
tornado.web.Application([(r"/.*", MyDumpHandler),]).listen(8080)
tornado.ioloop.IOLoop.instance().start()
并使用运行此脚本python echo.py
or python3 echo.py
取决于您的带有 Web 服务器的 VM 上的内容。
Below Response:
CSV file contains only 2 rows for test purpose: