

Setting up postgresql-common (190ubuntu0.1). Setting up postgresql-client-common (190ubuntu0.1). Update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto modeĬreated symlink /etc/systemd/system//rvice → /lib/systemd/system/rvice. Ĭreating config file /etc/default/sysstat with new version Selecting previously unselected package sysstat. Selecting previously unselected package postgresql. Selecting previously unselected package postgresql-10. Unpacking postgresql-common (190ubuntu0.1). Īdding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common' Selecting previously unselected package postgresql-common. Selecting previously unselected package ssl-cert. Selecting previously unselected package postgresql-client-10. Unpacking postgresql-client-common (190ubuntu0.1). 1-postgresql-client-common_190ubuntu0.1_all.deb. Selecting previously unselected package postgresql-client-common. 254633 files and directories currently installed.) Selecting previously unselected package libpq5:amd64.
POSTGRESQL DATABASE INSTALL
# Install postgresql server sudo apt-get -y -qq update sudo apt-get -y -qq install postgresql sudo service postgresql start # Setup a password `postgres` for username `postgres` sudo -u postgres psql -U postgres -c "ALTER USER postgres PASSWORD 'postgres' " # Setup a database with name `tfio_demo` to be used sudo -u postgres psql -U postgres -c 'DROP DATABASE IF EXISTS tfio_demo ' sudo -u postgres psql -U postgres -c 'CREATE DATABASE tfio_demo ' If you are not running this notebook on Google Colab, or you prefer to use an existing database, please skip the following setup and proceed to the next section. The password and an empty database is also needed. In order to demo the usage on Google Colab you will install PostgreSQL server. If you want to run it in a local Jupyter notebook, please proceed with caution. It installs packages on the system and requires sudo access. Install and setup PostgreSQL (optional) Warning: This notebook is designed to be run in a Google Colab only**. Setup and usage Install required tensorflow-io packages, and restart runtime try: Creating Dataset from a PostgreSQL database server directly and pass the Dataset to tf.keras for training or inference, could greatly simplify the data pipeline and help data scientist to focus on building machine learning models. As one of the most popular open source SQL database, PostgreSQL is widely used in enterprises for storing critial and transactional data across the board.
POSTGRESQL DATABASE HOW TO
This tutorial shows how to create tf.data.Dataset from a PostgreSQL database server, so that the created Dataset could be passed to tf.keras for training or inference purposes.Ī SQL database is an important source of data for data scientist.
