小编Rya*_*ier的帖子

aws-如何通过配置文件将多个postgresql连接器添加到EMR

要在AWS EMR中的presto中添加一个 postgresql连接器,可以使用下面的配置文件来实现。

[
    {
        "Classification": "presto-connector-postgresql",
        "Properties": {
            "connection-url": "jdbc:postgresql://<host>:<port>/<database>",
            "connection-user": "<user>",
            "connection-password": "<password>"
        },
        "Configurations": []
    }
]
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试将一个项目简单地添加到配置文件中时,如下所示:

[
    {
        "Classification": "presto-connector-postgresql",
        "Properties": {
            "connection-url": "jdbc:postgresql://<host>:<port>/<database>",
            "connection-user": "<user>",
            "connection-password": "<password>"
        },
        "Configurations": []
    },
    {
        "Classification": "presto-connector-postgresql",
        "Properties": {
            "connection-url": "jdbc:postgresql://<host>:<port>/<another-database>",
            "connection-user": "<user>",
            "connection-password": "<password>"
        },
        "Configurations": []
    }

]
Run Code Online (Sandbox Code Playgroud)

Terraform抱怨: Classification 'presto-connector-postgresql' was specified multiple times.

这可以通过在/ etc / presto / conf / catalog文件夹下的database.properties文件中手动添加每个数据库来实现。

database.properties

connector.name=postgresql
connection-password = <password>
connection-url = jdbc:postgresql://<host>:<port>/<database>
connection-user = <user> …
Run Code Online (Sandbox Code Playgroud)

postgresql amazon-web-services amazon-emr emr

6
推荐指数
0
解决办法
177
查看次数

标签 统计

amazon-emr ×1

amazon-web-services ×1

emr ×1

postgresql ×1