GithubHelp home page GithubHelp logo

meter-reader's Introduction

Meter Reader (Spring Boot app)

This application will read in an input file in the NEM12 format and returns the SQL insert statement for it. It will also ideally throw some errors if the input file did not comply with the NEM12 format.

Features

  • Reads NEM12 formatted files.
  • Generates SQL insert statements.
  • Validates input file format and throws errors for non-compliant files.
  • Integrated with springdoc for API documentation accessible via Swagger UI.

API Documentation

The application uses the springdoc library to provide interactive API documentation. You can access the Swagger UI at:

http://localhost:8080/swagger-ui.html

Requirements

For building and running the application you need:

Running the application locally

There are several ways to run this Spring Boot application on your local machine. One way is to execute the main method in the com.skyplor.meterreader.MeterReaderApplication class from your IDE.

Alternatively, you can use the Spring Boot Maven plugin like so:

mvn spring-boot:run

Building the Project

To build the project and generate the executable jar, use the following command:

mvn clean install

Testing

You can run the tests using the following command:

mvn test

Usage

  1. Start the application.

  2. Use a tool like curl or Postman to upload your NEM12 formatted file to the following endpoint:

    Endpoint:

    POST /api/v1/meter-readings/upload

    Example using curl:

    curl -F "file=@path/to/your/file.csv" http://localhost:8080/api/v1/meter-readings/upload

Replace path/to/your/file.csv with the actual path to your NEM12 formatted file.

The response will contain the SQL insert statement or an error message if the file did not comply with the NEM12 format.

meter-reader's People

Contributors

skyplor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.