<?xml version="1.0" encoding="utf-8"?>

<!-- EngineVersion = Java version -->
<ApiConfig Name="Apache Kyuubi"
           Slug="apache-kyuubi-connector"
           Type="JDBC"
           Category="big-data"
           Id="6FD9F412-3A27-5B91-B7CD-88E4EF657259"
           Version="1"
           EngineVersion="8"
           Desc="Query Apache Kyuubi (HiveServer2-compatible) with JDBC from Power BI, SQL Server Linked Server via ZappySys Data Gateway, Crystal Reports, SSRS, Azure Data Factory, and other ODBC tools -- almost no coding required."
           Logo="https://cdn.zappysys.com/api/Images/logos/apache-kyuubi-connector.png"
           HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html">

    <VersionHistory>
      <Change Ver="1" Date="2026-09-15" Type="New">Initial JDBC Bridge catalog version. Hands-free JAR download. Auth Notes and SQL examples for ODBC apps.</Change>
    </VersionHistory>
    <Template>
        <Param Name="DriverDownloadPageLink"
               Value="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
        <Param Name="MvnRepositoryDriverDownloadLink"
               Value="https://mvnrepository.com/artifact/org.apache.kyuubi/kyuubi-hive-jdbc-shaded" />
        <Param Name="DriverDownloadLinks"
               Hidden="True"
               Value="kyuubi-hive-jdbc-shaded-1.11.1.jar=https://repo1.maven.org/maven2/org/apache/kyuubi/kyuubi-hive-jdbc-shaded/1.11.1/kyuubi-hive-jdbc-shaded-1.11.1.jar" />
    </Template>

    <Auths>
        <Auth Name="Default"
              Label="Default"
              ConnStr="jdbc:kyuubi://[$HostName$]:[$Port$]/[$Database$]"
              HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html">
            <Params>
                <Param Name="DriverClass" Label="Driver class" Required="False" Value="org.apache.kyuubi.jdbc.KyuubiHiveDriver" Desc="Optional. Leave blank to auto-detect from the JAR unless SPI is ambiguous (e.g. org.apache.kyuubi.jdbc.KyuubiHiveDriver)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="DriverFilePaths" Editor="FileOpen" Label="JDBC driver file(s)" Required="True" Value="{DownloadFolder}\kyuubi-hive-jdbc-shaded-1.11.1.jar" Desc="Filled by the wizard after download. Separate multiple JARs with a semicolon (e.g. C:\ZappySys\Jdbc\MyConnector\driver.jar)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="HostName" Label="Host" Required="True" Value="MyHostName" Desc="JDBC host name or IP (e.g. MyHostName)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="Port" Label="TCP port" Required="True" Value="10009" Desc="JDBC port (e.g. 10009)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="Database" Label="Database name" Required="False" Value="MyDatabase" Desc="Database, schema, or catalog name (e.g. MyDatabase)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="UserName" Label="User name" Required="False" Desc="Database user. Leave empty if the server allows anonymous JDBC." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="Password" Label="Password" Required="False" Secret="True" Desc="Database password. Leave empty if no password is required." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
            </Params>
            <Notes>
                <![CDATA[<p>Apache Kyuubi JDBC (shaded HiveServer2 client) from Power BI, SQL Server Linked Server via ZappySys Data Gateway, Crystal Reports, SSRS, Azure Data Factory, and other ODBC tools. This tile is distinct from Apache Hive and Apache Spark: Kyuubi speaks <code>jdbc:kyuubi://</code> on port <code>10009</code> by default and uses <code>KyuubiHiveDriver</code>.</p>
<ol>
  <li>Note the Kyuubi server host and binary port (default <code>10009</code>) and the default schema name.</li>
  <li>Create a Kyuubi / LDAP user if the server requires authentication. Lab clusters sometimes allow empty user and password.</li>
  <li>The wizard downloads <code>kyuubi-hive-jdbc-shaded</code> 1.11.1. Do not mix it with a standalone Hive JAR on the same DSN.</li>
  <li>After Finish, replace the host (e.g. MyHostName) and schema on the DSN Main UI.</li>
  <li>Finish the wizard. Then click <strong>Test Connection</strong> on the DSN Main UI (the wizard does not run Test Connection).</li><li>Done. You can query from C#, Python, PowerShell, and ODBC apps.</li>
</ol>]]>
            </Notes>
        </Auth>
        <Auth Name="SslLdap"
              Label="SSL / LDAP"
              ConnStr="jdbc:kyuubi://[$HostName$]:[$Port$]/[$Database$];ssl=[$Ssl$]"
              HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html">
            <Params>
                <Param Name="DriverClass" Label="Driver class" Required="False" Value="org.apache.kyuubi.jdbc.KyuubiHiveDriver" Desc="Optional. Leave blank to auto-detect from the JAR unless SPI is ambiguous (e.g. org.apache.kyuubi.jdbc.KyuubiHiveDriver)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="DriverFilePaths" Editor="FileOpen" Label="JDBC driver file(s)" Required="True" Value="{DownloadFolder}\kyuubi-hive-jdbc-shaded-1.11.1.jar" Desc="Filled by the wizard after download. Separate multiple JARs with a semicolon (e.g. C:\ZappySys\Jdbc\MyConnector\driver.jar)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="HostName" Label="Host" Required="True" Value="MyHostName" Desc="JDBC host name or IP (e.g. MyHostName)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="Port" Label="TCP port" Required="True" Value="10009" Desc="JDBC port (e.g. 10009)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="Database" Label="Database name" Required="False" Value="MyDatabase" Desc="Database, schema, or catalog name (e.g. MyDatabase)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="Ssl" Label="SSL" Required="False" Options="Notset=;Yes=true;No=false" Value="true" Desc="SSL flag for this JDBC URL (e.g. Yes from the dropdown)." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="UserName" Label="User name" Required="True" Desc="LDAP or Kyuubi user." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
                <Param Name="Password" Label="Password" Required="True" Secret="True" Desc="LDAP or Kyuubi password." HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html" />
            </Params>
            <Notes>
                <![CDATA[<p>Kyuubi with SSL and user/password (LDAP-style). URL session vars use semicolons, same family as HiveServer2.</p>
<ol>
  <li>Confirm TLS is enabled on the Kyuubi server and that you have an LDAP or custom user.</li>
  <li>This Auth sets <code>ssl=true</code>. Paste user and password. If the driver asks for a trust store password, set JVM truststore properties on the Bridge rather than putting a secret in XML.</li>
  <li>Keep this tile separate from Hive (port 10000, <code>jdbc:hive2://</code>) and Spark Thrift Server.</li>
  <li>After Finish, replace host, port, and schema.</li>
  <li>Finish the wizard. Then click <strong>Test Connection</strong> on the DSN Main UI (the wizard does not run Test Connection).</li><li>Done. You can query from C#, Python, PowerShell, and ODBC apps.</li>
</ol>]]>
            </Notes>
        </Auth>
    </Auths>

    <Examples>
        <Example Default="True" Group="ODBC" Slug="list-tables" Label="List tables" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Lists tables available to this connection. Use this in Power BI or a SQL Server Linked Server to confirm the catalog before building reports.</p>]]></Desc>
            <Code>
                <![CDATA[SHOW TABLES]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="select-rows" Label="Select rows" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Returns rows from <code>default.MyTable</code>. Replace the identifier with your catalog object. Works in Excel, SSRS, and Crystal Reports.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT * FROM default.MyTable]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="filter-rows" Label="Filter with WHERE" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Returns matching rows from <code>default.MyTable</code>. Swap the column and literal for your schema.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT * FROM default.MyTable
WHERE id = 1]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="join-tables" Label="Join tables" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Joins two tables on a key. Use in Azure Data Factory or SSIS when you need a combined extract.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT a.id, a.name, b.amount
FROM default.MyTable AS a
JOIN my_other_table AS b ON a.id = b.parent_id]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="group-by" Label="Aggregate with GROUP BY" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Counts rows per group. Typical Power BI import pattern before a visual.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT status, COUNT(*) AS row_count
FROM default.MyTable
GROUP BY status]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="having" Label="Filter groups with HAVING" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Keeps groups whose count is at least 10.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT status, COUNT(*) AS row_count
FROM default.MyTable
GROUP BY status
HAVING COUNT(*) >= 10]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="order-limit" Label="Order and limit" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Returns the first 100 rows ordered by a column. Useful for preview in Excel or Crystal Reports.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT * FROM default.MyTable
ORDER BY id
LIMIT 100]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="count-all" Label="Count rows" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Returns the number of rows in <code>default.MyTable</code>.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT COUNT(*) AS row_count FROM default.MyTable]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="case-expr" Label="CASE expression" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Maps a column to labels with <code>CASE</code>.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT id,
       CASE WHEN status = 'A' THEN 'Active' ELSE 'Other' END AS status_label
FROM default.MyTable]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="select-list" Label="Select specific columns" HelpLink="https://spark.apache.org/docs/latest/sql-ref-syntax.html">
            <Desc><![CDATA[<p>Returns a column list instead of star. Prefer this in Linked Server views.</p>]]></Desc>
            <Code>
                <![CDATA[SELECT id, name, status
FROM default.MyTable]]>
            </Code>
        </Example>

        <Example Group="ODBC" Slug="show-databases" Label="Show databases" HelpLink="https://kyuubi.readthedocs.io/en/latest/client/jdbc/kyuubi_jdbc.html">
            <Desc><![CDATA[<p>Lists databases/schemas visible to this Kyuubi session.</p>]]></Desc>
            <Code>
                <![CDATA[SHOW DATABASES]]>
            </Code>
        </Example>
    </Examples>
</ApiConfig>
