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

fix(Trino): create PrestoBaseEngineSpec base class to share common code between Trino and Presto #21066

Merged
merged 9 commits into from
Aug 29, 2022
18 changes: 16 additions & 2 deletions docs/docs/databases/trino.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,21 @@ In `Secure Extra` field, config as following example:

All fields in `auth_params` are passed directly to the [`KerberosAuthentication`](https://github.com/trinodb/trino-python-client/blob/0.306.0/trino/auth.py#L40) class.

#### 3. JWT Authentication
#### 3. Certificate Authentication
In `Secure Extra` field, config as following example:
```json
{
"auth_method": "certificate",
"auth_params": {
"cert": "/path/to/cert.pem",
"key": "/path/to/key.pem"
}
}
```

All fields in `auth_params` are passed directly to the [`CertificateAuthentication`](https://github.com/trinodb/trino-python-client/blob/0.315.0/trino/auth.py#L416) class.

#### 4. JWT Authentication
Config `auth_method` and provide token in `Secure Extra` field
```json
{
Expand All @@ -67,7 +81,7 @@ Config `auth_method` and provide token in `Secure Extra` field
}
```

#### 4. Custom Authentication
#### 5. Custom Authentication
To use custom authentication, first you need to add it into
`ALLOWED_EXTRA_AUTHENTICATIONS` allow list in Superset config file:
```python
Expand Down
5 changes: 0 additions & 5 deletions superset/db_engine_specs/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
# prevent circular imports
from superset.models.core import Database


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -262,10 +261,6 @@ def convert_dttm(
.isoformat(sep=" ", timespec="microseconds")}' AS TIMESTAMP)"""
return None

@classmethod
def epoch_to_dttm(cls) -> str:
return "from_unixtime({col})"

@classmethod
def adjust_database_uri(
cls, uri: URL, selected_schema: Optional[str] = None
Expand Down
Loading