Skip to content

Instantly share code, notes, and snippets.

@gonaumov
Created March 21, 2022 14:22
Show Gist options
  • Save gonaumov/e97b84bee7e1e6338a52ac063cc7ec9d to your computer and use it in GitHub Desktop.
Save gonaumov/e97b84bee7e1e6338a52ac063cc7ec9d to your computer and use it in GitHub Desktop.
awk -F "," '{print "INSERT INTO table_name(\"first_field\",\"second_field\") VALUES('\''"$1"'\'','\''"$2"'\'') ON CONFLICT DO NOTHING;"}' CSVFileNAme.csv > V1.22_migration_name.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment