2022-04-12 23:29:05 -04:00
|
|
|
pre-requisites
|
2022-04-03 00:48:29 -04:00
|
|
|
* setup postgres db with a username and password and database
|
2022-04-12 23:29:05 -04:00
|
|
|
|
2020-10-23 00:19:39 -04:00
|
|
|
setup
|
2022-04-12 23:31:31 -04:00
|
|
|
* `setup_sql/schema.sql` setup the application tables
|
2022-04-03 00:48:29 -04:00
|
|
|
* create a table of data to forecast
|
2022-04-12 23:31:31 -04:00
|
|
|
* `setup_sql/target_info.sql` to populate the meta table (edit table name)
|
2022-04-12 23:29:05 -04:00
|
|
|
* fill out the `target_meta` table
|
2022-04-12 23:31:31 -04:00
|
|
|
* `setup_sql/build_maste_tables.sql` to create master data tables from forecast data
|
2022-04-03 00:48:29 -04:00
|
|
|
* `./routes/baseline/generate_route_sql.sh` to create the baseline sql used by the /baseline route
|
2020-10-23 00:19:39 -04:00
|
|
|
|
2022-04-12 22:58:31 -04:00
|
|
|
| schema | tname | cname | opos | func | fkey | fcol | dtype | appcol | pretty |
|
|
|
|
| ------- | ------- | -------------- | ---- | ------------ | ------------ | -------------- | ------- | ------------ | ------ |
|
|
|
|
| fc | live | fb_cst_loc | 91 | cost | | fb_cst_loc | numeric | | |
|
|
|
|
| fc | live | ship_cust | 36 | scust | scust | ship_cust | text | | |
|
|
|
|
| fc | live | rdate | 98 | rdate | rdate | drange | date | | |
|
|
|
|
| fc | live | geo | 42 | scust | | geo | text | customer | |
|
|
|
|
| fc | live | part | 54 | item | item | part | text | item | |
|
|
|
|
| fc | live | odate | 96 | odate | odate | drange | date | order_date | |
|
|
|
|
| fc | live | sdate | 100 | sdate | sdate | sdate | date | ship_date | |
|
|
|
|
| fc | live | oseas | 97 | odate | | ssyr | integer | | |
|
|
|
|
| fc | live | calc_status | 94 | order_status | order_status | calc_status | text | order_status | |
|
|
|
|
| fc | live | rseas | 99 | rdate | | ssyr | integer | | |
|
|
|
|
| fc | live | sseas | 101 | sdate | | ssyr | integer | | |
|
|
|
|
| | | | | | | | | version | |
|
|
|
|
| | | | | | | | | iter | |
|
|
|
|
| | | | | | | | | logid | |
|
|
|
|
|
|
|
|
* func: table name of associated data
|
|
|
|
* fkey: primary key of assoicated dat
|
|
|
|
* fcol: associated field from the master data table if it is different (oseas would refer to ssyr in fc.perd)
|
|
|
|
* pretty: display column name (user friendly)
|
|
|
|
* appcol: parameters that will have to be supplied but the application
|
|
|
|
* order_date
|
|
|
|
* ship_date
|
|
|
|
* customer
|
|
|
|
* item
|
|
|
|
* order_stats
|
|
|
|
* units
|
|
|
|
* cost
|
|
|
|
* value
|
|
|
|
* version (added if missing)
|
|
|
|
* iter (added if missing)
|
|
|
|
* logid (added if missing)
|
|
|
|
|
2022-04-12 23:29:05 -04:00
|
|
|
issues
|
|
|
|
- [x] validate the ability to join to associated date tables, for example order season that needs incremented
|
|
|
|
- [ ] there is not currently any initial grouping to limit excess data from all the document# scenarios
|
|
|
|
- [ ] how to handle a target value adjustment, which currency is it in?
|