Skip to content

Instantly share code, notes, and snippets.

@ValentinMouret
Created July 6, 2022 06:27
Show Gist options
  • Save ValentinMouret/6df14ce4e5cb6bf739c9ce54a90c5d2b to your computer and use it in GitHub Desktop.
Save ValentinMouret/6df14ce4e5cb6bf739c9ce54a90c5d2b to your computer and use it in GitHub Desktop.
for id, document in csv:
 connection.execute(
  """
insert into user
 (id, email)
  values (%s, ($s::jsonb)->>'email');
""",
[id, document],
 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment