MindsDB 25.3.1.0__py3-none-any.whl → 25.3.3.0__py3-none-any.whl
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.
Potentially problematic release.
This version of MindsDB might be problematic. Click here for more details.
- mindsdb/__about__.py +1 -1
- mindsdb/__main__.py +1 -2
- mindsdb/api/executor/sql_query/steps/union_step.py +21 -24
- mindsdb/api/http/gui.py +5 -4
- mindsdb/api/http/initialize.py +19 -19
- mindsdb/integrations/handlers/github_handler/generate_api.py +228 -0
- mindsdb/integrations/handlers/github_handler/github_handler.py +15 -8
- mindsdb/integrations/handlers/github_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/jira_handler/__init__.py +1 -0
- mindsdb/integrations/handlers/jira_handler/jira_handler.py +22 -80
- mindsdb/integrations/handlers/pgvector_handler/pgvector_handler.py +3 -3
- mindsdb/integrations/handlers/redshift_handler/redshift_handler.py +1 -0
- mindsdb/integrations/handlers/salesforce_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/salesforce_handler/salesforce_handler.py +20 -25
- mindsdb/integrations/handlers/salesforce_handler/salesforce_tables.py +2 -2
- mindsdb/integrations/handlers/slack_handler/slack_handler.py +2 -1
- mindsdb/integrations/handlers/timescaledb_handler/timescaledb_handler.py +11 -6
- mindsdb/integrations/libs/api_handler_generator.py +583 -0
- mindsdb/integrations/libs/ml_handler_process/learn_process.py +9 -3
- mindsdb/utilities/config.py +1 -1
- mindsdb/utilities/render/sqlalchemy_render.py +11 -5
- {mindsdb-25.3.1.0.dist-info → mindsdb-25.3.3.0.dist-info}/METADATA +219 -220
- {mindsdb-25.3.1.0.dist-info → mindsdb-25.3.3.0.dist-info}/RECORD +26 -28
- {mindsdb-25.3.1.0.dist-info → mindsdb-25.3.3.0.dist-info}/WHEEL +1 -1
- mindsdb/integrations/handlers/jira_handler/jira_table.py +0 -172
- mindsdb/integrations/handlers/jira_handler/requirements.txt +0 -1
- mindsdb/integrations/handlers/timescaledb_handler/tests/__init__.py +0 -0
- mindsdb/integrations/handlers/timescaledb_handler/tests/test_timescaledb_handler.py +0 -47
- {mindsdb-25.3.1.0.dist-info → mindsdb-25.3.3.0.dist-info}/LICENSE +0 -0
- {mindsdb-25.3.1.0.dist-info → mindsdb-25.3.3.0.dist-info}/top_level.txt +0 -0
|
@@ -27,7 +27,7 @@ logger = log.getLogger(__name__)
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
# todo Issue #7316 add support for different indexes and search algorithms e.g. cosine similarity or L2 norm
|
|
30
|
-
class PgVectorHandler(
|
|
30
|
+
class PgVectorHandler(PostgresHandler, VectorStoreHandler):
|
|
31
31
|
"""This handler handles connection and execution of the PostgreSQL with pgvector extension statements."""
|
|
32
32
|
|
|
33
33
|
name = "pgvector"
|
|
@@ -64,11 +64,11 @@ class PgVectorHandler(VectorStoreHandler, PostgresHandler):
|
|
|
64
64
|
return Response(RESPONSE_TYPE.OK)
|
|
65
65
|
return super().get_tables()
|
|
66
66
|
|
|
67
|
-
def native_query(self, query) -> Response:
|
|
67
|
+
def native_query(self, query, params=None) -> Response:
|
|
68
68
|
# Prevent execute native queries
|
|
69
69
|
if self._is_shared_db:
|
|
70
70
|
return Response(RESPONSE_TYPE.OK)
|
|
71
|
-
return super().native_query(query)
|
|
71
|
+
return super().native_query(query, params=params)
|
|
72
72
|
|
|
73
73
|
def raw_query(self, query, params=None) -> Response:
|
|
74
74
|
resp = super().native_query(query, params)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
salesforce_api
|
|
1
|
+
salesforce_api==0.1.45
|
|
@@ -39,31 +39,8 @@ class SalesforceHandler(APIHandler):
|
|
|
39
39
|
|
|
40
40
|
self.connection = None
|
|
41
41
|
self.is_connected = False
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
self.resource_names = {
|
|
45
|
-
'Account',
|
|
46
|
-
'Contact',
|
|
47
|
-
'Opportunity',
|
|
48
|
-
'Lead',
|
|
49
|
-
'Task',
|
|
50
|
-
'Event',
|
|
51
|
-
'User',
|
|
52
|
-
'Product2',
|
|
53
|
-
'Pricebook2',
|
|
54
|
-
'PricebookEntry',
|
|
55
|
-
'Order',
|
|
56
|
-
'OrderItem',
|
|
57
|
-
'Case',
|
|
58
|
-
'Campaign',
|
|
59
|
-
'CampaignMember',
|
|
60
|
-
'Contract',
|
|
61
|
-
'Asset'
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
for resource_name in self.resource_names:
|
|
65
|
-
table_class = create_table_class(resource_name, resource_name)
|
|
66
|
-
self._register_table(resource_name, table_class(self))
|
|
42
|
+
self.thread_safe = True
|
|
43
|
+
self.resource_names = []
|
|
67
44
|
|
|
68
45
|
def connect(self) -> salesforce_api.client.Client:
|
|
69
46
|
"""
|
|
@@ -92,6 +69,12 @@ class SalesforceHandler(APIHandler):
|
|
|
92
69
|
is_sandbox=self.connection_data.get('is_sandbox', False)
|
|
93
70
|
)
|
|
94
71
|
self.is_connected = True
|
|
72
|
+
|
|
73
|
+
# Register Salesforce tables.
|
|
74
|
+
for resource_name in self._get_resource_names():
|
|
75
|
+
table_class = create_table_class(resource_name)
|
|
76
|
+
self._register_table(resource_name.lower(), table_class(self))
|
|
77
|
+
|
|
95
78
|
return self.connection
|
|
96
79
|
except AuthenticationError as auth_error:
|
|
97
80
|
logger.error(f"Authentication error connecting to Salesforce, {auth_error}!")
|
|
@@ -179,3 +162,15 @@ class SalesforceHandler(APIHandler):
|
|
|
179
162
|
)
|
|
180
163
|
|
|
181
164
|
return response
|
|
165
|
+
|
|
166
|
+
def _get_resource_names(self) -> None:
|
|
167
|
+
"""
|
|
168
|
+
Retrieves the names of the Salesforce resources.
|
|
169
|
+
|
|
170
|
+
Returns:
|
|
171
|
+
None
|
|
172
|
+
"""
|
|
173
|
+
if not self.resource_names:
|
|
174
|
+
self.resource_names = [resource['name'] for resource in self.connection.sobjects.describe()['sobjects']]
|
|
175
|
+
|
|
176
|
+
return self.resource_names
|
|
@@ -11,7 +11,7 @@ from mindsdb.utilities import log
|
|
|
11
11
|
logger = log.getLogger(__name__)
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
def create_table_class(
|
|
14
|
+
def create_table_class(resource_name: Text) -> APIResource:
|
|
15
15
|
"""
|
|
16
16
|
Creates a table class for the given Salesforce resource.
|
|
17
17
|
"""
|
|
@@ -31,7 +31,7 @@ def create_table_class(table_name: Text, resource_name: Text) -> APIResource:
|
|
|
31
31
|
Returns:
|
|
32
32
|
pd.DataFrame: A DataFrame containing the data retrieved from the Salesforce resource.
|
|
33
33
|
"""
|
|
34
|
-
query.from_table =
|
|
34
|
+
query.from_table = resource_name
|
|
35
35
|
|
|
36
36
|
# SOQL does not support * in SELECT queries. Replace * with column names.
|
|
37
37
|
if isinstance(query.targets[0], Star):
|
|
@@ -267,7 +267,8 @@ class SlackHandler(APIChatHandler):
|
|
|
267
267
|
user_info = web_connection.auth_test().data
|
|
268
268
|
return user_info['bot_id']
|
|
269
269
|
|
|
270
|
-
def subscribe(self, stop_event: threading.Event, callback: Callable, table_name: Text
|
|
270
|
+
def subscribe(self, stop_event: threading.Event, callback: Callable, table_name: Text = 'messages',
|
|
271
|
+
columns: List = None, **kwargs: Any) -> None:
|
|
271
272
|
"""
|
|
272
273
|
Subscribes to the Slack API using the Socket Mode for real-time responses to messages.
|
|
273
274
|
|
|
@@ -10,8 +10,6 @@ class TimeScaleDBHandler(PostgresHandler):
|
|
|
10
10
|
super().__init__(name, **kwargs)
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
connection_args = OrderedDict(
|
|
16
14
|
host={
|
|
17
15
|
'type': ARG_TYPE.STR,
|
|
@@ -31,6 +29,12 @@ connection_args = OrderedDict(
|
|
|
31
29
|
'type': ARG_TYPE.STR,
|
|
32
30
|
'description': 'The password to authenticate the user with the TimeScaleDB server.'
|
|
33
31
|
},
|
|
32
|
+
schema={
|
|
33
|
+
'type': ARG_TYPE.STR,
|
|
34
|
+
'description': 'The schema in which objects are searched first.',
|
|
35
|
+
'required': False,
|
|
36
|
+
'label': 'Schema'
|
|
37
|
+
},
|
|
34
38
|
port={
|
|
35
39
|
'type': ARG_TYPE.INT,
|
|
36
40
|
'description': 'Specify port to connect TimeScaleDB '
|
|
@@ -39,8 +43,9 @@ connection_args = OrderedDict(
|
|
|
39
43
|
|
|
40
44
|
connection_args_example = OrderedDict(
|
|
41
45
|
host='127.0.0.1',
|
|
42
|
-
port=
|
|
43
|
-
password='
|
|
44
|
-
user='
|
|
45
|
-
database="
|
|
46
|
+
port=5432,
|
|
47
|
+
password='password',
|
|
48
|
+
user='root',
|
|
49
|
+
database="timescaledb",
|
|
50
|
+
schema='public'
|
|
46
51
|
)
|