Skip to content

rafaelmgr12/moviesgo-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

MoviesGo

A CLI to insert data into Postgres from a csv file

Technology   |    Project   |    How to Run   |    License

License

Introduction

This project is based on the following challenge, where we have a CSV file, and we have to insert the data into a database. The challenge has just a few requirements, but it can be implemented in any language.

The following challenge can be found here.

✨ Technology

The Project was develop as using the following techs:

💻 Project

In this challenge, you must create a command line program (CLI) that reads a CSV file of movies and populates a database, thinking about performance and hoping that the file can grow considerably

📓 Requirements

Each line of the csv contains columns that must be saved in separate columns/fields in the database:

  • ID - integer that identifies the movie found in the 1st column of the csv
  • title - movie title found in the 2nd column of the CSS. With the value "Jumanji (1995)" the title is Jumanji
  • "Year - Year of the movie found in the 2nd column of the CSV. With the value "Jumanji (1995)" the year is 1995
  • Genres - multiple values with movie genres separated by |. Found in the 3rd column.

The script must think about performance and take advantage of concurrency/parallelism to populate the database.

Download the csv file here.

🚀 How to Run

To run this project, you first need to set up a database, PostgreSQL and look in the database.go file to see what settings are needed.

Having done this, we have:

  1. go build main.go
  2. ./main.go i

📄 License

The projects is under the MIT license. See the file LICENSE fore more details


Author

Made with ♥ by Rafael 👋🏻

Linkedin Badge Gmail Badge

About

A CLI to read a csv file and insert in database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages