Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GoogleDataProcPresto:如何使用Python运行查询_Python_Google Cloud Platform_Presto_Google Cloud Dataproc_Trino - Fatal编程技术网

GoogleDataProcPresto:如何使用Python运行查询

GoogleDataProcPresto:如何使用Python运行查询,python,google-cloud-platform,presto,google-cloud-dataproc,trino,Python,Google Cloud Platform,Presto,Google Cloud Dataproc,Trino,通过完成本文中的步骤,我已经建立了一个运行Presto的GoogleDataProc集群 它工作正常,我可以通过gcloud命令行工具运行查询,如下面的链接所示 gcloud dataproc作业提交配置单元\ --簇前簇\ --region=${region}\ --执行“从芝加哥、出租车、旅行、拼花地板中选择计数(*) 最后,本教程展示了如何通过java应用程序在Presto上运行查询。我试图用Python找到类似的解决方案。有没有办法通过Python应用程序在Dataproc集群上运行查

通过完成本文中的步骤,我已经建立了一个运行Presto的GoogleDataProc集群

它工作正常,我可以通过gcloud命令行工具运行查询,如下面的链接所示

gcloud dataproc作业提交配置单元\
--簇前簇\
--region=${region}\
--执行“从芝加哥、出租车、旅行、拼花地板中选择计数(*)
最后,本教程展示了如何通过java应用程序在Presto上运行查询。我试图用Python找到类似的解决方案。有没有办法通过Python应用程序在Dataproc集群上运行查询

我知道有用于Presto的Python客户端,但我无法找到有关如何将其与Dataproc集群上运行的Presto连接的资源

类似地,有一个Python库可以向Dataproc提交作业,但是没有关于如何向Dataproc集群提交Presto查询作业的参考资料


有人能告诉我如何连接到Google Dataproc上的Presto并使用Python应用程序远程运行查询吗?

您可以在官方Dataproc Python客户端库文档中找到如何使用Dataproc作业API提交支持的作业(包括Presto)的示例: