INSERT query from python function endpoint
ssuhas76
Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 31 ✭
Hi I am trying to execute a insert query from the dataikuapi client object. How do I get to know if the query is excecuted successfully or not?
import dataiku
client = dataiku.api_client()
query = "insert into table1 values('sample_string4','sample_string','sample_string','sample_string','sample_string','sample_string','Jan 1 2020')"
streamed_query = client.sql_query(query,connection="XXX",post_queries=['COMMIT'])
Tagged:
Best Answer
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,153 Neuron
You need to call the verify() method, see this example:
streamed_query.verify()