0

I am having a lot of trouble in converting the below SQL query to SQLAlchemy query. Please help:

insert into conform_layer (unique_no,key_name,value_name) 
SELECT id, key, value FROM (select row_to_json(t.*) AS line, id 
FROM csvimport AS t) AS r JOIN LATERAL json_each_text(r.line) ON (key <> 'id')

closed as off-topic by a_horse_with_no_name, Max Vernon, hot2use, Md Haidar Ali Khan, Colin 't Hart Sep 18 '18 at 11:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

Try sqlitis ("a tool to convert plain SQL queries to SQLAlchemy expressions"). It's a WIP project, but should be a good starting point.

Not the answer you're looking for? Browse other questions tagged or ask your own question.