Data Pipelines with Python and PostgreSQL

Channel:
Subscribers:
25,200
Published on ● Video Link: https://www.youtube.com/watch?v=QF-qHWekhxw



Duration: 13:23
24,828 views
629


Code : https://github.com/Sean-Bradley/Stream-Data-From-Flask-To-Postgres
I show how to use streaming techniques to build a data pipeline which pulls data from an external API that returns massive amounts of data, and insert it straight into a PostgreSQL data base ASAP.
The Python process that reads the huge amount of data, before inserting into Postgres is able to process the incoming chunks by use of the stream=True option on the Requests module, and the iter_content method of the Request response. The mock 3rd party API, which hosts the potentially petabytes of data, makes use of the Flask stream_with_context method.







Tags:
python
flask
postgres
postgresql
streaming
stream_with_context
iter_content
data pipelines