TransWikia.com

Generating prediction when adding new rows into a relational dataset

Data Science Asked by Carl PCH on May 5, 2021

There is a PostgreSQL table that I regularly update with new book reviews. Meanwhile, I also have trained a Tensorflow model that takes book review text and return a predicted book review category (an integer).

What is the best practice to automate category prediction whenever a new row is inserted into a relational table?

What works for me right now is a Postgres trigger function with plpythonu that uses Python’s subprocess: after row insertion into the target table, the trigger runs a .py file to update the same table with psycopg2. But this processes takes a lot of redundant steps, time and computation so I was hoping to improve it.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP