Wholesale inserts with Python, Psycopg2 and PostgreSQL.

Triple P threat to all data files!!! Hahahaha… Now that I have myself collected and together, in this blog post I will utilize Python, Psycopg2, and PostgreSQL for a bulk upload, importing data from a CSV file to a database table.Read More »

Advertisements

Data prepping with Sed for bulk uploads using the PostgreSQL COPY command.

This post will highlight usage of the PostgreSQL COPY command. Along the way, I will use Sed, a Unix command-line utility, to ‘massage’ sample data into a more uniformed structure. Once the data has been formatted to our requirement, we will then load it into a PostgreSQL table.

Read More »

Fabulous fabrication asset tracking using JOINS in PostgreSQL

This post will demonstrate mock asset tracking with PostgreSQL for a pipe fabrication setting. The typical data one would track and record in this setting are bends, weld id’s, and joints of pipe. We will see powerful queries from multiple tables, return informative and useful data with the JOIN command.

Read More »

Discover PostgreSQL table data with SELECT statement.

Proceeding from Part 1 and Part 2 of this series, today’s post will involve reading stored data in a PostgreSQL table using the SELECT statement along with filtering criteria in the WHERE clause for specific record searches. Modifying table data with the UPDATE command will also be visited to round out this discussion.

Read More »

Discovering the ALTER TABLE command and INSERT statement with examples in PostgreSQL.

This blog post will demonstrate basic concepts of the ALTER TABLE command for changing an existing PostgreSQL table. INSERT statements will be introduced as well to populate an empty table with mock data. Visit Part 1 of this series for a refresher of the material covered up to this point.

Read More »

Quick searches using the LIKE operator in PostgreSQL.

Searching numerous columns of data for particular records is time-consuming and less than productive. In this post, I will demonstrate pattern matching examples using the powerful LIKE operator available in both traditional SQL and PostgreSQL. Along with briefly visiting the PostgreSQL keyword ILIKE as well. This post will be Part 1 in a planned 3 part series on pattern matching.

Read More »