A demo application showcasing real-time financial data submission and analytics using Streamlit and Databricks.
This application demonstrates a multi-user financial data submission system where different business units can submit revenue and expense data, which is stored in Databricks Delta tables and visualized in real-time.
- Multi-User Data Entry: Business units can submit financial metrics through an intuitive form
- Real-Time Analytics: Instant visualization updates after data submission
- Delta Lake Storage: Reliable, ACID-compliant data storage in Databricks
- Interactive Dashboards: Plotly-powered charts for revenue, expenses, and profit margins
- KPI Metrics: At-a-glance key performance indicators
- Recent Submissions: Track the latest data entries
Streamlit UI → Databricks SQL Connector → Delta Table → Real-time Visualizations
- Frontend: Streamlit (Python web framework)
- Backend: Databricks SQL Warehouse
- Storage: Delta Lake tables
- Visualization: Plotly charts
- Deployment: Streamlit Cloud
- Databricks account (Free tier or above)
- GitHub account
- Streamlit Cloud account (free)
Create a Delta table in your Databricks workspace:
CREATE TABLE IF NOT EXISTS financial_submissions (
submission_id STRING,
business_unit STRING,
submission_date TIMESTAMP,
revenue DECIMAL(15,2),
expenses DECIMAL(15,2),
profit_margin DECIMAL(5,2),
submitted_by STRING,
created_at TIMESTAMP
) USING DELTA;You'll need:
- Workspace URL:
your-workspace.cloud.databricks.com - HTTP Path: Found in SQL Warehouses → Connection Details
- Access Token: User Settings → Developer → Access Tokens
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-namepip install -r requirements.txtCreate .streamlit/secrets.toml:
[databricks]
host = "your-workspace.cloud.databricks.com"
http_path = "/sql/1.0/warehouses/xxxxx"
token = "your-access-token".gitignore.
streamlit run streamlit_app.py- Push your code to GitHub (without secrets)
- Go to share.streamlit.io
- Create new app from your repository
- Add secrets in Advanced Settings → Secrets
- Deploy!
├── streamlit_app.py # Main application
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
├── README.md # This file
└── .streamlit/
└── secrets.toml # Local secrets (not committed)
- Secrets are managed through Streamlit Cloud's encrypted secrets management
- Never commit credentials to Git
- Use Databricks access tokens with appropriate permissions
- Consider setting token expiration for production use
| Column | Type | Description |
|---|---|---|
| submission_id | STRING | Unique identifier for each submission |
| business_unit | STRING | Business unit name (Sales, Marketing, etc.) |
| submission_date | TIMESTAMP | When the data was submitted |
| revenue | DECIMAL(15,2) | Revenue amount in dollars |
| expenses | DECIMAL(15,2) | Expenses amount in dollars |
| profit_margin | DECIMAL(5,2) | Calculated profit margin percentage |
| submitted_by | STRING | Name of the person submitting |
| created_at | TIMESTAMP | Record creation timestamp |
The app includes:
- Revenue Analysis: Bar charts showing total revenue by business unit
- Expense Correlation: Scatter plot comparing expenses vs revenue
- Profit Margins: Horizontal bar chart of average margins
- Distribution Analysis: Box plots showing profit margin spread
- Submission Overview: Pie chart of submissions by unit
A Colab notebook is available for testing Databricks connectivity before deployment:
- Open Google Colab
- Add Databricks credentials to Colab Secrets
- Run the prototype notebook to verify connection
- Test data submission and retrieval functions
- Verify SQL Warehouse is running in Databricks
- Check HTTP path format:
/sql/1.0/warehouses/xxxxx - Ensure access token hasn't expired
- Remove
https://from hostname
- Click the "Refresh Data" button in the sidebar
- Verify table name matches exactly
- Check Databricks query history for errors
- Databricks free tier may have cold starts
- Keep SQL Warehouse running during demo
- Cache settings are optimized (30-second TTL)
- Prototype in Google Colab to test Databricks operations
- Develop features in the Streamlit app locally
- Test thoroughly with sample data
- Deploy to Streamlit Cloud
- Iterate based on feedback
- User authentication and authorization
- Data export functionality (CSV/Excel)
- Date range filtering for historical analysis
- Email notifications for submissions
- Comparison views (MoM, YoY)
- Data validation and business rules
- Audit logging
- Multi-currency support
This is a demo project for client presentation. For modifications:
- Create a feature branch
- Test thoroughly locally
- Update documentation
- Submit for review
This is a proprietary demo/proof-of-concept project. All rights reserved.
For licensing inquiries or to discuss implementation for your organization, please contact the project owner.
For questions or issues:
- Check Troubleshooting section above
- Review Databricks documentation
- Check Streamlit documentation
- Built with Streamlit
- Powered by Databricks
- Visualizations using Plotly
Demo Version | Built for Client Presentation | Copyright © 2025 The Select Group. All Rights Reserved. | Last Updated: December 2025