mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-08 13:36:32 +00:00
Add impyla as scheme for hive connector (#10270)
This commit is contained in:
parent
83be5d933b
commit
cd4461397d
@ -164,6 +164,7 @@ plugins: Dict[str, Set[str]] = {
|
||||
"thrift>=0.13,<1",
|
||||
"sasl~=0.3",
|
||||
"thrift-sasl~=0.4",
|
||||
"impyla~=0.18.0",
|
||||
},
|
||||
"kafka": {*COMMONS["kafka"]},
|
||||
"kinesis": {VERSIONS["boto3"]},
|
||||
|
||||
@ -15,6 +15,7 @@ Hive source methods.
|
||||
import re
|
||||
from typing import Tuple
|
||||
|
||||
from impala.sqlalchemy import ImpalaDialect
|
||||
from pyhive.sqlalchemy_hive import HiveDialect, _type_map
|
||||
from sqlalchemy import types, util
|
||||
from sqlalchemy.engine import reflection
|
||||
@ -184,6 +185,7 @@ def get_table_comment( # pylint: disable=unused-argument
|
||||
|
||||
HiveDialect.get_columns = get_columns
|
||||
HiveDialect.get_table_comment = get_table_comment
|
||||
ImpalaDialect.get_table_comment = get_table_comment
|
||||
|
||||
|
||||
HIVE_VERSION_WITH_VIEW_SUPPORT = "2.2.0"
|
||||
@ -223,6 +225,10 @@ class HiveSource(CommonDbSourceService):
|
||||
):
|
||||
HiveDialect.get_table_names = get_table_names
|
||||
HiveDialect.get_view_names = get_view_names
|
||||
ImpalaDialect.get_table_names = get_table_names
|
||||
ImpalaDialect.get_table_names = get_view_names
|
||||
else:
|
||||
HiveDialect.get_table_names = get_table_names_older_versions
|
||||
HiveDialect.get_view_names = get_view_names_older_versions
|
||||
ImpalaDialect.get_table_names = get_table_names_older_versions
|
||||
ImpalaDialect.get_table_names = get_view_names_older_versions
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"hiveScheme": {
|
||||
"description": "SQLAlchemy driver scheme options.",
|
||||
"type": "string",
|
||||
"enum": ["hive", "hive+http", "hive+https"],
|
||||
"enum": ["hive", "hive+http", "hive+https", "impala", "impala4"],
|
||||
"default": "hive"
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user