feat: Hive / Kyuubi / Spark Thrift Server connector#30
Conversation
Adds support for HiveServer2-compatible engines (Apache Hive, Kyuubi, Spark Thrift Server) following the existing isolated-connector architecture. - connectors/hive/ — new analytics-agent-connector-hive package: uses PyPI-stable pyhive[hive], pure-sasl, thrift-sasl (no git deps); supports NONE, NOSASL, LDAP, PLAIN, and KERBEROS auth modes - factory.py — registers "hive" in _CONNECTOR_MAP so the UI install flow and env-var wiring work automatically - sqlalchemy/engine.py — passes connect_args from connection config to create_engine(), enabling dialect-specific driver options for all SQLAlchemy-based connections (contributed by @wForget in #13) - frontend — adds Hive/Kyuubi/Spark plugin to the data source picker Closes #13 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| { key: "host", label: "Host", type: "mono", placeholder: "kyuubi-host or localhost", required: true }, | ||
| { key: "port", label: "Port", type: "mono", placeholder: "10000" }, | ||
| { key: "database", label: "Database", type: "mono", placeholder: "default" }, | ||
| { key: "auth", label: "Auth", type: "mono", placeholder: "NONE (or NOSASL, LDAP, KERBEROS)" }, |
There was a problem hiding this comment.
Missing kerberos_service_name
{ key: "kerberos_service_name", label: "Kerberos Service Name", type: "mono", placeholder: "hive" },
| requires-python = ">=3.10" | ||
| dependencies = [ | ||
| "mcp>=1.0.0", | ||
| "pyhive[hive]>=0.6.5", |
There was a problem hiding this comment.
For python 3.11+, we might need pyhive[hive_pure_sasl], see: https://github.com/apache/kyuubi/tree/master/python#requirements
"pyhive[hive_pure_sasl]>=0.7.0",
Note: 'pyhive[hive]' extras uses sasl that doesn't support Python 3.11, See cloudera/python-sasl#30. Hence PyHive also supports pure-sasl via additional extras 'pyhive[hive_pure_sasl]' which support Python 3.11.
Furthermore, it seems that kerberos is required on the Kerberos environment.
"kerberos>=1.3.0",
|
Thanks @shirshanka, after making the two changes above, I was able to successfully submit queries to our kyuubi server.
|
…os_service_name UI field - Switch from pyhive[hive]>=0.6.5 to pyhive[hive_pure_sasl]>=0.7.0 — the sasl extra relies on the `sasl` C library which doesn't build on Python 3.11+ - Add kerberos_service_name field to the Hive connection UI so Kerberos auth can be configured without manually editing env vars Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks @wForget — both fixes are now in: switched to |


Summary
Implements the Hive engine support requested in #13, following the isolated-connector architecture introduced in #24.
analytics-agent-connector-hivepackage (connectors/hive/) — runs as an MCP subprocess, keeping heavy Thrift/SASL deps out of the base install. Uses PyPI-stable releases (pyhive[hive],pure-sasl,thrift-sasl) instead of git-pinned dependencies._CONNECTOR_MAP— the UI "Install connector" flow and env-var wiring work automatically, same as Snowflake/BigQueryconnect_argspassthrough inSQLAlchemyQueryEngine— generic improvement from feat: Supports hive engine for connecting to hiveserver2/kyuubi/spark thrift server #13 that benefits all SQLAlchemy-based connectionsWhat changed from #13
pyhive @ git+kyuubi,kerberos,thrift)sql_allow_limitexposed as LLM tool param_apply_row_limitalready skips if LIMIT presenthive→SQLAlchemyQueryEngineinlinehive→ MCP subprocess (same pattern as Snowflake)Test plan
uv tool install analytics-agent-connector-hiveinstalls cleanlyexecute_sql,list_tables,get_schema,preview_tablereturn correct results@wForget — this PR addresses your request from #13. Could you give it a try against your Kyuubi setup and report back? The connector package will need to be installed separately (
uv tool install analytics-agent-connector-hive) until it lands on PyPI — for now you can install from the repo:Any feedback on the auth config or field names would be welcome.
🤖 Generated with Claude Code