Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.

Add support for args/params for extraCredentials to be passed via headers to trino #35

Open
matt12eagles opened this issue Oct 12, 2021 · 3 comments

Comments

@matt12eagles
Copy link

Add support for args/params for extraCredentials to be passed via headers to trino

Thinking this link may be of use:

dropbox/PyHive#311 (comment)

@mapshen
Copy link

mapshen commented Oct 15, 2021

+1 on this. It would be even better if we can pass in arbitrary headers. For our use case, the Host header is needed.

@dungdm93
Copy link
Owner

Hello @matt12eagles, @mapshen
Did you try:

engine = create_engine(...,
   connect_args=dict(
    http_headers={
      'X-Presto-Extra-Credential': f"access-token={ACCESS_TOKEN}"
    },
  )
)
``

@mapshen
Copy link

mapshen commented Dec 21, 2021

@dungdm93 I can confirm this setting does take effect - is there a doc on the args users can pass into connect_args?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants