File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 565565 " async def insert_data(pool):\n " ,
566566 " async with pool.connect() as db_conn:\n " ,
567567 " await db_conn.execute(sqlalchemy.text(\" CREATE EXTENSION IF NOT EXISTS vector;\" ))\n " ,
568+ " await db_conn.commit()\n " ,
569+ " print(\" Enabled vector extension\" )\n " ,
570+ " \n " ,
568571 " await db_conn.execute(create_table_cmd)\n " ,
572+ " await db_conn.commit()\n " ,
573+ " print(f\" Created {table_name} table.\" )\n " ,
574+ " \n " ,
569575 " await db_conn.execute(\n " ,
570576 " insert_data_cmd,\n " ,
571577 " df.to_dict('records'),\n " ,
572578 " )\n " ,
573579 " await db_conn.commit()\n " ,
580+ " print(f\" Inserted {len(df.index)} records into {table_name}.git\" )\n " ,
574581 " \n " ,
575582 " pool = await init_connection_pool(connector, database_name)\n " ,
576583 " await insert_data(pool)\n " ,
You can’t perform that action at this time.
0 commit comments