Issue with batch query in Pipeline procedure. Batch does not exist

I am trying to read from Kafka topic which has to be populated into multiple tables in memsql.

Below procedure I am using which will be called in a pipeline:

USING my_db_demo
CREATE OR REPLACE PROCEDURE test_batch_json(batch query(my_json json)) AS
INSERT INTO demo_json_table(id)
SELECT my_json::id FROM batch;
INSERT INTO demo_json_table2(name)
SELECT my_json::name FROM batch;
END //

On execution of the proc I am getting the error:

“ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘PROCEDURE test_batch_json(batch query(my_json json)) AS BEGIN INSERT INTO d’ at line 1 ERROR 1146 (42S02): Table ‘my_db_demo.batch’ doesn’t exist”

I am new to memsql and currently using Version: 6.7.5. Below is the format of the json I am using, how to resolve the error, not sure if batch here is a table:

{“id”: 345, “name”: “Roony”}


Hello Vinod Vasudevan,

There are some nuances in MemSQL when it comes to inserting JSON data. I would recommend you go through this guide in our docs and see if it helps resolve your issue.

Let us know how it goes.