This week has been pretty quiet.
As I had already told you, I have been learning about databases, specifically how to create them, create tables, add data to them and consult only the records that interest us. The above has made me realize that it is true what they say that all languages, whether programming or otherwise, are just tools to achieve a particular goal.
What happened to me this week is that I tried to enter a lot of data in a table from a CSV file, I tried to do it with SQLAlchemy, a Python library that helps to handle SQL queries with the help of the goodness of python and in my case that was important because I wanted to combine this library with another of my favorites, “pandas” which allows us to manipulate data frames that are basically tables with records that you can modify at your convenience.
The above has not gone as expected, I have had a lot of problems derived from my little experience with this type of work, in the end, a colleague helped me load the data, using only python and pandas, his strategy was to split the huge file into 10 smaller files and upload them one by one to the table manually. It was not the most elegant solution, nor the fastest, but it was the right one given my current skills, so at last, the objective was achieved, the information was loaded into the table to be able to manipulate it and query it with PostgreSQL and PG Admin.

In addition to this, I realized the inherent problems of wanting to work with a single technology for fear of experimenting with another alternative. For some reason the mac I received refused to properly install PG Admin, I read and ran a bunch of ideas and none of them worked, whenever I got to 95% of the installation an error message would pop up telling me there was an error when establishing the connection of PG Admin with PostgreSQL, to my luck I’m working in a virtual machine with windows where I carry out all my work, but I’m curious to know how to solve the problem of PG Admin with Postgres in my environment MacOS so I decided to install another database manager and connect it with PostgreSQL, which was my surprise to see that it was extremely easy, in less than 10 minutes I had everything ready, this made me wonder if my problem was only the connection between PostgreSQL and PG Admin, so I decided to make the connection manually, indeed that was it. The installer had an error when creating the aforementioned connection, but when doing it manually, everything flowed perfectly.

The above made me realize the many problems that come from not exploring possible solutions to a problem and instead of wanting to fix the problem only with the first option we think of; being able to fix a problem with our first approach feels good, even better when after a certain time you achieve it, but it’s also important to let things go and explore as many alternatives as you have time. Letting go also feels liberating and doesn’t make us better or worse professionals.

At last, I’ve not only had the satisfaction to fix my blocker but also I discovered another tool that would help me in case my main tool doesn’t work, a complete victory if you ask me.

Photo by Bunsim San on Unsplash

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store