Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra credentials in connection #385

Open
1 task done
mahic opened this issue Feb 22, 2024 · 3 comments
Open
1 task done

Extra credentials in connection #385

mahic opened this issue Feb 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@mahic
Copy link

mahic commented Feb 22, 2024

Describe the feature

dbt-trino doesn't support extra_credential while trino-python-client supports it

Describe alternatives you've considered

Use http_headers to supply X-Trino-Extra-Credential

This doesn't work with multiple extra credentials because http_headers is a dict.

Who will benefit?

Users who usually use extra credentials

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@mahic mahic added the enhancement New feature or request label Feb 22, 2024
@damian3031
Copy link
Member

Hi @mahic, I believe there are no contraindications for adding it to dbt-trino. You are more than welcome to contribute! Please let me know if you need any assistance

@mahic
Copy link
Author

mahic commented Feb 22, 2024

@damian3031 ref comment seems like the workaround might be the following:

http_headers: {X-Trino-Extra-Credential: "cred1=xxx,cred2=yyyy,cred3=zzzz"}

What threw us off was that when we tested this with DBeaver, the client sent 2 headers. This is because trino-client (and Trino JDBC Driver) seems to prefer to send multiple headers over the short-form

However, since trino-python-client supports the extra_credential parameter explicitly (and so does the trino-client/Trino JDBC driver), dbt-trino should match this IMO, do you agree?

@hovaesco
Copy link
Member

However, since trino-python-client supports the extra_credential parameter explicitly (and so does the trino-client/Trino JDBC driver), dbt-trino should match this IMO, do you agree?

Yes, it should match, feel free to post a PR with the implementation, we're ready to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants