Add support for remapping user provided enum-like values
This commit adds storage of dimension data that the user provides for an existing field. This is to translate enum-like fields (i.e. integers) to a textual description of that data. This remapped value will be included in the response with the original value. The UI will then take that and show the more user friendly remapped value. The new "remapped_from" and "remapped_to" attributes in the cols field of the response will indicate that a field replaces another field.
Showing
- resources/migrations/000_migrations.yaml 51 additions, 0 deletionsresources/migrations/000_migrations.yaml
- src/metabase/cmd/load_from_h2.clj 2 additions, 0 deletionssrc/metabase/cmd/load_from_h2.clj
- src/metabase/models/dimensions.clj 9 additions, 0 deletionssrc/metabase/models/dimensions.clj
- src/metabase/models/field.clj 12 additions, 0 deletionssrc/metabase/models/field.clj
- src/metabase/query_processor.clj 2 additions, 0 deletionssrc/metabase/query_processor.clj
- src/metabase/query_processor/middleware/add_dimension_projections.clj 59 additions, 0 deletions.../query_processor/middleware/add_dimension_projections.clj
- src/metabase/query_processor/middleware/add_implicit_clauses.clj 13 additions, 9 deletions...abase/query_processor/middleware/add_implicit_clauses.clj
- test/metabase/api/dataset_test.clj 1 addition, 1 deletiontest/metabase/api/dataset_test.clj
- test/metabase/api/embed_test.clj 2 additions, 1 deletiontest/metabase/api/embed_test.clj
- test/metabase/driver/generic_sql/native_test.clj 9 additions, 4 deletionstest/metabase/driver/generic_sql/native_test.clj
- test/metabase/query_processor/middleware/add_dimension_projections_test.clj 116 additions, 0 deletions...y_processor/middleware/add_dimension_projections_test.clj
- test/metabase/query_processor_test.clj 43 additions, 15 deletionstest/metabase/query_processor_test.clj
- test/metabase/query_processor_test/expressions_test.clj 2 additions, 1 deletiontest/metabase/query_processor_test/expressions_test.clj
Loading
Please register or sign in to comment