<commit_before>===============
Druid Connector
===============

The Druid Connector allows querying `Apache Druid <https://druid.apache.org/>`_ data from Presto.

Configuration
-------------

To configure the Druid connector, create a catalog properties file
``etc/catalog/druid.properties`` with the following contents, replacing
``BROKER:8082`` with the correct host and port of your Druid Broker.

.. code-block:: none

    connector.name=druid
    connection-url=jdbc:avatica:remote:url=http://BROKER:8082/druid/v2/sql/avatica/

<commit_msg>Add authentication info and reword<commit_after>===============
Druid Connector
===============

The Druid connector allows querying an `Apache Druid <https://druid.apache.org/>`_
database from Presto.

Configuration
-------------

Create a catalog properties file that specifies the Druid connector by setting
the ``connector.name`` to ``druid`` and configuring the ``connection-url`` with
the JDBC string to connect to Druid.

For example, to access a database as ``druiddb``, create the file
``etc/catalog/druiddb.properties``. Replace ``BROKER:8082`` with the correct
host and port of your Druid broker.

.. code-block:: properties

    connector.name=druid
    connection-url=jdbc:avatica:remote:url=http://BROKER:8082/druid/v2/sql/avatica/

You can add authentication details to connect to a Druid deployment that is
secured by basic authentication by updating the URL and adding credentials:

.. code-block:: properties

    connection-url=jdbc:avatica:remote:url=http://BROKER:port/druid/v2/sql/avatica/;authentication=BASIC
    connection-user=root
    connection-password=secret

Now you can access your Druid database in Presto with the ``druiddb`` catalog
name from the properties file.

{'fraction_non_alphanumeric': 0.13761467889908258, 'fraction_numerical': 0.010894495412844037, 'mean_word_length': 4.647249190938512, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5036813', 'n_tokens_mistral': 533, 'n_tokens_neox': 511, 'n_words': 169}