Hi,
Newbie here just trying to get a simple insert SP that requires 1 parameter (called BrandandRetailer) with PyMySQL.
Cant quite get the syntax right and was hoping for some assistance. Followed https://dev.mysql.com/doc/connector-pyth...lproc.html but she is still not working. Lambda says
name 'sql' is not defined: NameError
Todd
Newbie here just trying to get a simple insert SP that requires 1 parameter (called BrandandRetailer) with PyMySQL.
Cant quite get the syntax right and was hoping for some assistance. Followed https://dev.mysql.com/doc/connector-pyth...lproc.html but she is still not working. Lambda says
name 'sql' is not defined: NameError
with conn.cursor() as cursor: # Call Stored Procedure args = [(event['BrandandRetailer'],)] result_args = cursor.callproc('IH_SP_AddBrandAndRetailer', args) cursor.execute(sql,) # connection is not autocommit by default. So you must commit to save # your changes. conn.commit()Thanks in advance for any assistance.
Todd