CREATE USER looker WITH ENCRYPTED PASSWORD 'password';
GRANT CONNECT ON DATABASE database_name to looker;
\c database_name
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO looker;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO looker;
如需向 Looker 授予取消其查询的必要权限,请运行以下命令:
CREATE OR REPLACE FUNCTION pg_kill_connection(integer) RETURNS boolean AS 'select pg_terminate_backend($1);' LANGUAGE SQL SECURITY DEFINER;
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Greenplum\n\nEncrypting network traffic\n--------------------------\n\nIt is a best practice to encrypt network traffic between the Looker application and your database. Consider one of the options described on the [Enabling secure database access](/looker/docs/enabling-secure-db-access) documentation page.\n\nIf you're interested in using SSL encryption, see this [official Greenplum security configuration guide](http://gpdb.docs.pivotal.io/security/pdf/GP_SecurityConfig_A01.pdf).\n\nUsers and security\n------------------\n\nChange `some_password_here` to a unique, secure password: \n\n CREATE USER looker WITH ENCRYPTED PASSWORD 'password';\n GRANT CONNECT ON DATABASE database_name to looker;\n \\c database_name\n GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO looker;\n GRANT SELECT ON ALL TABLES IN SCHEMA public TO looker;\n\nTo grant Looker the necessary permissions to cancel its queries, run the following command: \n\n CREATE OR REPLACE FUNCTION pg_kill_connection(integer) RETURNS boolean AS 'select pg_terminate_backend($1);' LANGUAGE SQL SECURITY DEFINER;\n\nTemp schema setup\n-----------------\n\nCreate a schema owned by the Looker user: \n\n CREATE SCHEMA looker_scratch AUTHORIZATION looker;\n\nCreating the Looker connection to your database\n-----------------------------------------------\n\nFollow these steps to create the connection from Looker to your database:\n\n1. In the **Admin** section of Looker, select **Connections** , and then click **Add Connection**.\n2. Select **Greenplum** from the **Dialect** drop-down menu.\n\n | **Note:** If you are on a [Looker (Google Cloud core)](/looker/docs/looker-core-overview) instance and you don't see your dialect listed in the **Dialect** drop-down menu, see the [Looker (Google Cloud core) documentation](/looker/docs/looker-core-dialects#supported_dialects_for) to verify that the dialect is supported for Looker (Google Cloud core) instances.\n3. Fill out the connection details. The majority of the settings are common to most database dialects. See the [Connecting Looker to your database](/looker/docs/connecting-to-your-db) documentation page for information.\n\n4. To verify that the connection is successful, click **Test** . See the [Testing database connectivity](/looker/docs/testing-db-connectivity) documentation page for troubleshooting information.\n\n5. To save these settings, click **Connect**.\n\nFeature support\n---------------\n\nFor Looker to support some features, your database dialect must also support them.\n\nGreenplum supports the following features as of Looker 25.14:\n\nNext steps\n----------\n\nAfter completing the database configuration, you can [connect to the database from Looker](/looker/docs/connecting-to-your-db)."]]