moviego-cli

command module
v0.0.0-...-a06bf40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 7 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL