fcojj / selecao-ilegra

Data Analysis System in Bach

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Observações de uso:

  • utilizar JDK 8 para compilar e inicializar a aplicação.
  • foi utilizado a IDE IntelliJ
  • Projeto estruturado através do Maven
  • Devido ao tempo de somente 24 horas não documentei o quanto gostaria, mas as nomeclaturas dos métodos e variáveis estão bem intuitivas.
  • Para o bom funcionamento da aplicação, por favor criar os seguintes diretórios, conforme especificação técnica:
    • %HOMEPATH%/data/in
    • %HOMEPATH%/data/out

selecao-ilegra

Data Analysis System in Bach

Candidate Evaluation Criteria

Before you start, please check out the items below, they are the evaluation criteria that we will be using to evaluate your test.

  • Clean Code
  • Simplicity
  • Logic
  • SOC (Separation of Concerns)
  • Flexibility/Extensibility
  • Scalability/Performance

You can code the solution in any of the following languages: Java, scala, ruby, python, c#, javascript, clojure. The CODE needs be written into one of those languages:
if you submit the code in DELPHI for instance you will FAIL the test.

No question will be answered so you are free to solve the problem the way you think is best.

Statement of Work

You must build a data analysis system 100% coded in any of the languages above. The system must be able to import lots of flat files, read and analyse the data, and output a report.

Please read the following for more information about the input files, data analysis and the needed output.

Flat file layout

There are 3 kinds of data inside those files. For each kind of data there is a different layout.

Salesman data Salesman data has the format id 001 and the line will have the following format.

0 0 1 ç C P F ç N a m e ç S a l a r y Customer data Customer data has the format id 002 and the line will have the following format.

0 0 2 ç C N P J ç N a m e ç B u s i n e s s A r e a
Sales data Sales data has the format id 003. Inside the sales row, there is the list of items, which is wrapped by square brackets []. The line will have the following format.

0 0 3 ç S a l e I D ç [ I t e m I D - I t e m Q u a n t i t y - I t e m P r i c e ] ç S a l e s m a n n a m e

Sample file data

The following is a sample of the data that the application should be able to read. Note that this is a sample, real data could be 100% different.

0 0 1 ç 1 2 3 4 5 6 7 8 9 1 2 3 4 ç D i e g o ç 5 0 0 0 0 0 0 1 ç 3 2 4 5 6 7 8 8 6 5 4 3 4 ç R e n a t o ç 4 0 0 0 0 . 9 9 0 0 2 ç 2 3 4 5 6 7 5 4 3 4 5 4 4 3 4 5 ç J o s e d a S i l v a ç R u r a l 0 0 2 ç 2 3 4 5 6 7 5 4 3 3 4 4 4 3 4 5 ç E d u a r d o P e r e i r a ç R u r a l 0 0 3 ç 1 0 ç [ 1 - 1 0 - 1 0 0 , 2 - 3 0 - 2 . 5 0 , 3 - 4 0 - 3 . 1 0 ] ç D i e g o 0 0 3 ç 0 8 ç [ 1 - 3 4 - 1 0 , 2 - 3 3 - 1 . 5 0 , 3 - 4 0 - 0 . 1 0 ] ç R e n a t o

Data analysis

Your system must read data from the default directory, located at %HOMEPATH%/data/in. The system must only read .dat files.

After processing all files inside the input default directory, the system must create a flat file inside the default output directory, located at %HOMEPATH%/data/out. The filename must follow this pattern, {flat_file_name}.done.dat.

The output file contents should summarize the following data:

● Amount of clients in the input file ● Amount of salesman in the input file ● ID of the most expensive sale ● Worst salesman ever

This application should be running all the time, without any breaks. Everytime new files become available, everything should be executed.

Application Construction

As long as your code is written in one of the languages above, you are free to build whatever
kind of application you feel is suitable for the job.

You have total freedom to google everything you need. Feel free to pick any external library if you need so.

Just keep in mind the criterias above. Good luck :)

About

Data Analysis System in Bach


Languages

Language:Java 100.0%