[[["易于理解","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,["# Apache Druid\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\nConfiguring your Apache Druid cluster\n-------------------------------------\n\n`\u003cDRUID_BASE_DIR\u003e` refers to the base directory in which the Apache Druid cluster is installed on a server.\n\n### Enabling SQL\n\nTo enable SQL on your Druid database, add this line to the [`broker/runtime.properties`](https://druid.apache.org/docs/latest/configuration/index.html#broker) configuration file:\n\n`\u003cDRUID_BASE_DIR\u003e/conf/druid/broker/runtime.properties` \n\n druid.sql.enable=true\n\n### Turning off `COUNT DISTINCT` approximation (optional)\n\nBy default, Druid approximates `COUNT DISTINCT`. For precise results, add this line to the [`broker/runtime.properties`](https://druid.apache.org/docs/latest/configuration/index.html#broker) configuration file:\n\n`\u003cDRUID_BASE_DIR\u003e/conf/druid/broker/runtime.properties` \n\n `druid.sql.planner.useApproximateCountDistinct=false`\n\nCreating the Looker connection to your database\n-----------------------------------------------\n\nIn the **Admin** section of Looker, select **Connections** , and then click **Add Connection**.\n\nFill 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. Some of the settings are described next:\n\n- **Name**: The name of the connection.\n- **Dialect** : **Apache Druid** , **Apache Druid 0.13+** (Apache Druide 0.13.x - 0.17.x), or **Apache Druid 0.18+**.\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.\n- **Host** : DNS or IP address of the cluster [Broker](https://druid.apache.org/docs/latest/design/broker.html). You can find this in your [`broker/runtime.properties`](https://druid.apache.org/docs/latest/configuration/index.html#broker) file.\n\n- **Port** : The port of the [Broker](https://druid.apache.org/docs/latest/design/broker.html). The default port is 8082. If your cluster is secured by SSL, the default port is 8182.\n\n- **Database** : The name of your database. The default is `druid`.\n\n- **Username** : The database username if your Apache Druid cluster is configured to use [Druid Basic Security](https://druid.apache.org/docs/latest/development/extensions-core/druid-basic-security.html). If it is not, then you can specify any string.\n\n- **Password** : The user password. If your cluster is not configured to use [Druid Basic Security](https://druid.apache.org/docs/latest/development/extensions-core/druid-basic-security.html), then you can specify any string.\n\n- **Schema** : The default schema to use when there is no schema specified. Entering a schema is optional.\n\n- **Additional JDBC parameters** : Semicolon delimited [Avatica JDBC parameters](https://calcite.apache.org/avatica/docs/client_reference.html).\n\n - These properties can be set as connection properties:\n - `useApproximateCountDistinct`\n - `useApproximateTopN`\n - `useFallback`\n - `sqlTimeZone`\n\n Example:\n `none\n useApproximateCountDistinct=false;truststore=/path/to/truststore.jks;truststore_password=changeit`\n- **Maintenance Schedule** : A [`cron`](https://en.wikipedia.org/wiki/Cron#CRON_expression) expression that indicates when Looker should check [datagroups](/looker/docs/caching-and-datagroups#specifying_caching_policies_with_datagroup_parameters) and persistent derived tables. Read more about this setting in the [Maintenance Schedule](/looker/docs/connecting-to-your-db#pdt_maintenance_schedule) documentation.\n\n- **SSL** : Check if your Apache Druid cluster is configured to use [Druid TLS](https://druid.apache.org/docs/latest/operations/tls-support.html).\n\n- **Verify SSL**: Check to enforce strict hostname verification.\n\n- **Max connections per node** : The default is 25. This setting can be left at the default value initially. See the [Connecting Looker to your database](/looker/docs/connecting-to-your-db#max_connections) documentation page for more information.\n\n- **Connection Pool Timeout**: The default is 120 seconds.\n\n- **SQL Runner Precache** : To cause SQL Runner not to preload table information and to load table information only when a table is selected, clear this option. Read more about this setting in the [SQL Runner Precache](/looker/docs/connecting-to-your-db#sql_runner_precache) documentation.\n\n- **Database Time Zone**: Database timezone. Supported in Apache Druid 0.13+ and Apache Druid 0.18+.\n\nTo verify that the connection is successful, click **Test** . See the [Testing database connectivity](/looker/docs/testing-db-connectivity) documentation page for troubleshooting information.\n\nLooker runs a `SELECT 1` query to verify a basic connection and perform a query test. It does not validate that the catalog and schema combination exist or that the user has the required access to that schema.\n\nIf you have any issues, check out our [Testing Connections](/looker/docs/admin-panel-database-connections#testing_connections) documentation.\n\nTo save these settings, click **Connect**.\n\nTest the connection in SQL Runner. Navigate to [SQL Runner](/looker/docs/sql-runner-basics), select your connection and schema, then [check if you can see your database tables](/looker/docs/sql-runner-basics-manage-db#getting_table_information).\n\nFeature support\n---------------\n\nFor Looker to support some features, your database dialect must also support them.\n\n### Apache Druid\n\nApache Druid supports the following features as of Looker 25.14:\n\n### Apache Druid 0.13+ (Apache Druide 0.13.x - 0.17.x)\n\nApache Druid 0.13+ supports the following features as of Looker 25.14:\n\n### Apache Druid 0.18+\n\nApache Druid 0.18+ supports the following features as of Looker 25.14:\n\nNext steps\n----------\n\nAfter you have completed the database connection, [configure authentication options](/looker/docs/getting-started-with-users)."]]