GitHub user dosubot[bot] added a comment to the discussion: Help with hive+http 
data source

<!-- Answer -->
Passing custom headers like `http.header.Host` in the Hive/Spark connection 
string isn't supported in Superset—these are not recognized by SQLAlchemy or 
PyHive and will cause errors like `Connection.__init__() got an unexpected 
keyword argument` because only documented parameters are accepted by the 
driver. Superset doesn't have special handling for arbitrary HTTP headers in 
Hive connections, so unsupported parameters are passed straight through and 
trigger this error 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/hive.py)).

To get more detailed error output, you can enable debug logging in Superset by 
setting `LOG_LEVEL = logging.DEBUG` in your `superset/config.py`. For 
persistent logs, you can also configure log rotation:

```python
LOG_LEVEL = logging.DEBUG
ENABLE_TIME_ROTATE = True
TIME_ROTATE_LOG_LEVEL = logging.DEBUG
FILENAME = os.path.join(DATA_DIR, "superset.log")
ROLLOVER = "midnight"
INTERVAL = 1
BACKUP_COUNT = 30
```
([reference](https://github.com/apache/superset/discussions/32998))

If you want SQLAlchemy to log all SQL and connection activity, add 
`SQLALCHEMY_ECHO = True` to your config as well.

For Hive/Spark connections, only use parameters documented as supported by 
SQLAlchemy, PyHive, and Superset (like `auth`, `httpPath`, `transportMode`). 
Arbitrary HTTP headers cannot be set via the connection string or the "extra" 
field in Superset ([source](https://github.com/apache/superset/issues/22316)). 
If you need to set custom headers, you may need to look for a driver-level 
workaround outside of Superset.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/2d727d5f-18ff-476a-adb3-a7ce56d01e73?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/2d727d5f-18ff-476a-adb3-a7ce56d01e73?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/2d727d5f-18ff-476a-adb3-a7ce56d01e73?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/2d727d5f-18ff-476a-adb3-a7ce56d01e73?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/2d727d5f-18ff-476a-adb3-a7ce56d01e73?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/2d727d5f-18ff-476a-adb3-a7ce56d01e73?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/2d727d5f-18ff-476a-adb3-a7ce56d01e73?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34404)

GitHub link: 
https://github.com/apache/superset/discussions/34404#discussioncomment-13937263

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to