It's a ReactJS based application to help determine the resultant data type (especially precision and scale for numeric/decimal data types) based on the input data types for Amazon Redshift (cloud data warehouse) database service.
It's difficult to predict the resultant precision and scale of a division operation on numeric/decimal datatype columns in Amazon Redshift.
I have personally found that it is important to know the precision and scale of the result of an operation, since it may lead to data inaccuracies downstream. I have witnessed rounding/calculating variance issues, when using MicroStrategy (a Business Intelligence tool) based on Amazon Redshift as the source.
Amazon Redshift documentation shares the formulas to calculate the resultant data types of various numeric computations but it's a hassle to manually apply those formulas in some cases (like division operation on numeric/decimal data types).
Redshift Calculator should help you get the resultant data types easily when you input the correct data types and order of your operands.
Site [Current - Mobile Responsive]: https://adarshgupta.github.io/Redshift-calc/
Old version [Outdated - not mobile responsive]: https://redshift-calculator.netlify.app/
This project was bootstrapped with Create React App.
- Clone the repository
git clone https://github.com/AdarshGupta/Redshift-calc.git
- Change your cmd directory to the cloned project.
cd Redshift-calc
- Install all the node dependencies of the project using npm
npm install
- Run the applicatioon in your localhost:3000
npm run start
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
You can run this command from your branch and it'll run the "predeploy" and "deploy" scripts/commands in the package.json
, to build the application and deploy it to the gh-pages
branch of my GitHub repository.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Deployment to gh-pages: Create React App documentation