Segment Generator
From OpenI Wiki
| Table of contents |
[edit]
Definition
Tool to help create segments based on rdbms data. Renaming feature to Segment Designer.
[edit]
Features
- User selects project, table, column, number of buckets
- System displays histogram chart
- System displays cut points for each segment
- User can easily modify number of buckets, tweak the number of segments (need to cache resultset)
- To combat outliers, User can enter max/min values
[edit]
second iteration features
- user specifies name of each bucket
- user specifies name of segment
- user specifies view/table
- system generates sql
- system runs sql to create segment definitions
- or if no sql generation make it easy to define segments, so you can cut/paste the segment definition in an email
[edit]
Use case
- User selects a jdbc datasource
- system displays set of tables
- user selects table
- system displays list of columns for that table
- user selects column
- user chooses number of buckets
- system displays histogram, cut points for each bucket
[edit]
Configuration
[edit]
Spring
- spring mapping: segment.htm
- id: segmentFormController
- controller class: org.openi.web.controller.admin.SegmentFormController
[edit]
ajax
- request to get a list of tables (activated when you select a datasource
- requeust to get a list of columns (activated when user selects a datasource then table)
- ProjectContextAjaxServlet - servlet used to return list of tables, and columns
| action | servlet request format (note different from ajax tags param format) |
| get tables | ProjectContextAjaxServlet?action=discoverTables&targetDatasource={targetDatasource} |
| get columns | ProjectContextAjaxServlet?action=discoverColumns&targetTable={targetTable}&targetDatasource={targetDatasource} |
[edit]
Feedback/ToDo
- allow max/min
- need to allow user tunability
- breakpoints
- labels
- autogenerate sort keys
- save/freeze segment definition
- generate hierarchy
- multiple levels
- either topdown or bottom up
- choose levels of hierarchy?
- allow user to define herarchy levels
- auto generate sort keys for hierarchy
- Save segment metadata
- gracefully handle non-double sql types
- allow sample in case of large datasets
