e6data-python-connector 2.2.0__tar.gz → 2.2.0rc0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {e6data_python_connector-2.2.0/e6data_python_connector.egg-info → e6data_python_connector-2.2.0rc0}/PKG-INFO +2 -2
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/README.md +1 -1
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/e6data_grpc.py +26 -4
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0/e6data_python_connector.egg-info}/PKG-INFO +2 -2
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/setup.py +1 -1
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/LICENSE +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/MANIFEST.in +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/__init__.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/cluster_manager.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/cluster_server/__init__.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/cluster_server/cluster_pb2.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/cluster_server/cluster_pb2_grpc.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/common.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/constants.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/datainputstream.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/date_time_utils.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/dialect.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/e6x_vector/__init__.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/e6x_vector/constants.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/e6x_vector/ttypes.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/exceptions.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/server/QueryEngineService.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/server/__init__.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/server/constants.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/server/e6x_engine_pb2.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/server/e6x_engine_pb2.pyi +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/server/ttypes.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/typeId.py +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector.egg-info/entry_points.txt +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector.egg-info/requires.txt +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector.egg-info/top_level.txt +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/pyproject.toml +0 -0
- {e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.0rc0
|
|
4
4
|
Summary: Client for the e6data distributed SQL Engine.
|
|
5
5
|
Home-page: https://github.com/e6x-labs/e6data-python-connector
|
|
6
6
|
Author: Uniphi, Inc.
|
|
@@ -27,7 +27,7 @@ Requires-Dist: sqlalchemy
|
|
|
27
27
|
|
|
28
28
|
# e6data Python Connector
|
|
29
29
|
|
|
30
|
-

|
|
30
|
+

|
|
31
31
|
|
|
32
32
|
## Introduction
|
|
33
33
|
|
|
@@ -53,14 +53,31 @@ def _parse_timestamp(value):
|
|
|
53
53
|
value = datetime.datetime.strptime(value, format)
|
|
54
54
|
else:
|
|
55
55
|
raise Exception(
|
|
56
|
-
'Cannot convert "{}" into a datetime'.format(value)
|
|
56
|
+
'Cannot convert "{}" into a datetime'.format(value)
|
|
57
|
+
)
|
|
57
58
|
else:
|
|
58
59
|
value = None
|
|
59
60
|
return value
|
|
60
61
|
|
|
61
62
|
|
|
62
|
-
TYPES_CONVERTER = {
|
|
63
|
-
|
|
63
|
+
TYPES_CONVERTER = {
|
|
64
|
+
"DECIMAL_TYPE": Decimal,
|
|
65
|
+
"TIMESTAMP_TYPE": _parse_timestamp
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def re_auth(func):
|
|
70
|
+
def wrapper(self, *args, **kwargs):
|
|
71
|
+
try:
|
|
72
|
+
return func(self, *args, **kwargs)
|
|
73
|
+
except _InactiveRpcError as e:
|
|
74
|
+
if e.code() == grpc.StatusCode.INTERNAL and 'Access denied' in e.details():
|
|
75
|
+
self.connection.get_re_authenticate_session_id()
|
|
76
|
+
return func(self, *args, **kwargs)
|
|
77
|
+
else:
|
|
78
|
+
raise e
|
|
79
|
+
|
|
80
|
+
return wrapper
|
|
64
81
|
|
|
65
82
|
|
|
66
83
|
class HiveParamEscaper(ParamEscaper):
|
|
@@ -202,6 +219,10 @@ class Connection(object):
|
|
|
202
219
|
)
|
|
203
220
|
self._client = e6x_engine_pb2_grpc.QueryEngineServiceStub(self._channel)
|
|
204
221
|
|
|
222
|
+
def get_re_authenticate_session_id(self):
|
|
223
|
+
self._session_id = None
|
|
224
|
+
return self.get_session_id
|
|
225
|
+
|
|
205
226
|
@property
|
|
206
227
|
def get_session_id(self):
|
|
207
228
|
"""
|
|
@@ -496,6 +517,7 @@ class Cursor(DBAPICursor):
|
|
|
496
517
|
)
|
|
497
518
|
return self.connection.client.status(status_request, metadata=self.metadata)
|
|
498
519
|
|
|
520
|
+
@re_auth
|
|
499
521
|
def execute(self, operation, parameters=None, **kwargs):
|
|
500
522
|
"""Prepare and execute a database operation (query or command).
|
|
501
523
|
Return values are not defined.
|
|
@@ -551,6 +573,7 @@ class Cursor(DBAPICursor):
|
|
|
551
573
|
|
|
552
574
|
self._query_id = prepare_statement_response.queryId
|
|
553
575
|
self._engine_ip = prepare_statement_response.engineIP
|
|
576
|
+
|
|
554
577
|
execute_statement_request = e6x_engine_pb2.ExecuteStatementV2Request(
|
|
555
578
|
engineIP=self._engine_ip,
|
|
556
579
|
sessionId=self.connection.get_session_id,
|
|
@@ -635,7 +658,6 @@ class Cursor(DBAPICursor):
|
|
|
635
658
|
return self._fetch_all()
|
|
636
659
|
|
|
637
660
|
def fetchmany(self, size: int = None):
|
|
638
|
-
# _logger.info("fetching all from overriden method")
|
|
639
661
|
if size is None:
|
|
640
662
|
size = self.arraysize
|
|
641
663
|
if self._data is None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.0rc0
|
|
4
4
|
Summary: Client for the e6data distributed SQL Engine.
|
|
5
5
|
Home-page: https://github.com/e6x-labs/e6data-python-connector
|
|
6
6
|
Author: Uniphi, Inc.
|
|
@@ -27,7 +27,7 @@ Requires-Dist: sqlalchemy
|
|
|
27
27
|
|
|
28
28
|
# e6data Python Connector
|
|
29
29
|
|
|
30
|
-

|
|
30
|
+

|
|
31
31
|
|
|
32
32
|
## Introduction
|
|
33
33
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/common.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{e6data_python_connector-2.2.0 → e6data_python_connector-2.2.0rc0}/e6data_python_connector/typeId.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|