Procedure to ingest data in memSQL table that is read from kafka pipeline

can you guys let me know how to create procedure to ingest data in memSQL table that is read from kafka pipeline?

Below is the example procedure to load JSON data

DELIMITER //
CREATE OR REPLACE PROCEDURE process_users(GENERIC_BATCH query(GENERIC_JSON json)) AS
BEGIN
INSERT INTO test2(id,fname,lname,addr)
SELECT GENERIC_JSON::id, GENERIC_JSON::fname,GENERIC_JSON::lname,GENERIC_JSON::addr
FROM GENERIC_BATCH;
END //
DELIMITER ;

CREATE or replace PIPELINE jsonproce1 AS LOAD DATA KAFKA 'local_server:9092/N_SAMPE’
INTO PROCEDURE process_users (GENERIC_JSON <- %)FORMAT JSON ;

test pipeline jsonproce1;

start pipeline jsonproce1;

Hi @karrisatyanagasri – thank you for posting your solution!