-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stored procedure call from the python script not working. #19
Comments
Can you show the body of your stored procedure? User-defined Variables have only been recently added to MemSQL (We still don't allow use of User Defined Variables inside Stored Procedure). Prior to that, User-Defined Variables were only allowed inside LOAD DATA queries. This is what your error message is saying: "user-defined variables without a SET clause or WHERE clause" -> i.e. you are trying to use UDVs in a non-LOAD DATA query. |
Hi @sakjain92 The proc is working perfectly fine , when I am executing it on the Memsql DB directly. Package body is as below:- INSERT INTO test_table(nftype,nfinstanceid,metrics,model_name,timestamp,model) VALUES (PI_nfType,PI_nfinstanceid,PI_metrics,PI_model_name,PI_timestamp,PI_MODEL); COMMIT; END // I tested it using below command :- call INJEST_MODEL('NFType_1','Instid1','{"user" : "Roger waters", "uid" : {"clientId" : 1, "Role" : "God", "id" : 327 }}','LSTM',1610096364,'XDFWFWfwfnkfn'); and it was working fine with this Call . but the same thing in python is not working. Please let me know if i am missing something. |
Also please note the PI_MODEL longblob input is actually a pickle object which I want to store into MEMSQL DB. Thanks |
I will have to look into how the Alternatively, what happens if you run
I suspect |
Hi @sakjain92 , You are right. "mycursor.execute()" seems to be working fine. The Proc execution was completed successfully. Can you please debug on the callproc(). try: But i am getting the below Error: Though the Record exist in DB. Thanks |
@sakjain92 Any comments.? |
I haven't looked much into python API but as I said, I suspect that callproc() uses User-Defined Variables in a manner that is not supported by MemSQL currently. As I said, if you could provide me with actual queries that are being run on MemSQL side, I can confirm this for you (I mentioned the steps above for this). For the second part of your question, what is the output of |
Hi @sakjain92 The first part is resolved by using mycursor.execute. |
I don't have enough debug information to debug this issue. You will have to give me more data to figure out the issue. Not sure if this is posted by you, but this could also be helpful to you: https://www.singlestore.com/forum/t/nodejs-php-problems-when-calling-stored-procedures/2705 |
Hello Team ,
I am trying to execute the Stored procedure in the Memsql Db from my python script.
Sample code as below:
But i am getting the below error:-
1706 (HY000): Feature 'user-defined variables without a SET clause or WHERE clause' is not supported by MemSQL.
What could be the possible solution for this.?
Thanks,
Vijayant
The text was updated successfully, but these errors were encountered: