INSERT query from python function endpoint

Options
ssuhas76
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'])

Best Answer

Setup Info
    Tags
      Help me…