Python

Execute Values for Batch Inserts

[ Execute Values for Batch Inserts¶ In [2]: %run 02_function_get_database_connection.ipynb In [3]: %load_ext sql In [4]: %env DATABASE_URL=postgresql://itversity_sms_user:itversity@pg.itversity.com:5432/itversity_sms_db env: DATABASE_URL=postgresql://itversity_sms_user:itversity@pg.itversity.com:5432/itversity_sms_db In [5]: %%sql DROP TABLE IF EXISTS courses Done. Out[5]: [] In [6]: %%sql CREATE TABLE courses ( course_id SERIAL PRIMARY KEY, course_name VARCHAR(60), course_author VARCHAR(40), course_status VARCHAR(9) CHECK (course_status IN (‘published’, ‘inactive’, ‘draft’)), course_published_dt DATE ) * postgresql://itversity_sms_user:***@pg.itversity.com:5432/itversity_sms_db Done. …

Execute Values for Batch Inserts Read More »