Skip to content

Commit 64a3421

Browse files
committed
wrap sql endpoint
1 parent 550f50c commit 64a3421

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dataikuapi/apinode_client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ def apply_on_record(self, endpoint_id, features):
7878
"""
7979
return self._perform_json("POST", "%s/run" % endpoint_id, body = features)
8080

81+
def query_on_record(self, endpoint_id, features):
82+
"""
83+
Run a record on a DSS API node SQL endpoint
84+
85+
:param str endpoint_id: Identifier of the endpoint to query
86+
:param features: Python dictionary of features of the record
87+
88+
:return: a Python dict of the API answer. The answer is the a dict with a columns field and a rows field (list of rows as list of strings)
89+
"""
90+
return self._perform_json("POST", "%s/query" % endpoint_id, body = features)
91+
8192
def lookup_record(self, endpoint_id, record, context=None):
8293
"""
8394
Lookup a single record on a DSS API node endpoint

0 commit comments

Comments
 (0)