Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Nov 07, 2024
  2. Nov 06, 2024
    • adam-james's avatar
      Filter out Empty Rows from Pivot Exports (#49512) · 63151f4e
      adam-james authored
      * Pivot Measures Order Used in Pivot Exports
      
      Fixes #48442
      
      A pivot table can have any number of measures, and the user can order these by dragging in the UI. Before this PR,
      that order was ignored and measures would alway be in index order, which is confusing for any user who needs the
      measures to be displayed in a particular order, especially if they've re-ordered them in the pivot viz settings UI.
      
      A test has been added to check that measure order is used.
      
      A few minor changes to the pivot qp and post-processor
       - measure indices are looked up in the pivot qp and added in viz-settings order
       - the pivot measures are only added if the qp has not already added them.
       - pivot-opts Malli spec has been made in the namespace, adjusted to allow `nil` as a valid pivot-opts output, and
       used in relevant functions
      
      * address review points.
      
      * add a rows order test
      
      * Filter out Empty Rows from Pivot Exports
      
      Fixes #49353
      
      The linked issue is not actually related to pivot export size but is instead related to the 'Min of Created At: Month'
      aggregation; the default aggregation function was `+`, so it broke when the date string was encountered.
      
      That was fixed.
      
      As I was trynig to keep the export small if possible, I noticed that in some cases empty rows are appended, so I added
      the filter so that if a pivot row's values are completely empty, it doesn't add it.
      
      Finally, this PR also adds the 'sub section totals' which I noticed were missing from the exports. This comes up when
      you have 3+ pivot-rows configured, so you can see the subtotals for the first pivot row and the subtotals nested
      within those sections for the second pivot row, and so on.
      
      * add test for non-numeric values
      
      * Make sure the new name refs match on aggregations not just breakouts
      
      * cljfmt
      Unverified
      63151f4e
    • Noah Moss's avatar
    • Alexander Polyankin's avatar
      Fix :pivot-measures with column names (#49575) · 240634d3
      Alexander Polyankin authored
      
      * Fix :pivot-measures with column names
      
      * Fix the test
      
      * Update src/metabase/query_processor/pivot.clj
      
      Co-authored-by: default avatarBraden Shepherdson <braden@metabase.com>
      
      * Add a test
      
      * Add a test
      
      ---------
      
      Co-authored-by: default avatarBraden Shepherdson <braden@metabase.com>
      Unverified
      240634d3
    • Braden Shepherdson's avatar
      [testing] Add filters to random query generators (#49448) · 46191072
      Braden Shepherdson authored
      Adds filters to generative testing for queries.
      
      There's a lot of new code here, but don't panic, it's quite straightforward:
      generating filter values, in the right shapes for various filter expressions.
      Unverified
      46191072
    • Ngoc Khuat's avatar
      [Notification] Pulse clean up 2 (#49519) · 3e33ab4c
      Ngoc Khuat authored
      Unverified
      3e33ab4c
    • Ngoc Khuat's avatar
      [Notification] Pulse clean up (#49419) · a0598e46
      Ngoc Khuat authored
      Unverified
      a0598e46
  3. Nov 05, 2024
  4. Nov 04, 2024
    • adam-james's avatar
      Pivot Measures Order Used in Pivot Exports (#49367) · e005f7bb
      adam-james authored
      * Pivot Measures Order Used in Pivot Exports
      
      Fixes #48442
      
      A pivot table can have any number of measures, and the user can order these by dragging in the UI. Before this PR,
      that order was ignored and measures would alway be in index order, which is confusing for any user who needs the
      measures to be displayed in a particular order, especially if they've re-ordered them in the pivot viz settings UI.
      
      A test has been added to check that measure order is used.
      
      A few minor changes to the pivot qp and post-processor
       - measure indices are looked up in the pivot qp and added in viz-settings order
       - the pivot measures are only added if the qp has not already added them.
       - pivot-opts Malli spec has been made in the namespace, adjusted to allow `nil` as a valid pivot-opts output, and
       used in relevant functions
      
      * address review points.
      
      * add a rows order test
      Unverified
      e005f7bb
    • Braden Shepherdson's avatar
      [testing] Add breakouts to random query generators (#49413) · d82015eb
      Braden Shepherdson authored
      Also fix a bug in `lib.breakout/existing-breakouts` that treated
      breakouts on duplicate columns from different joins as existing, even
      though they're not.
      Unverified
      d82015eb
  5. Nov 01, 2024
  6. Oct 31, 2024
  7. Oct 30, 2024
  8. Oct 29, 2024
    • adam-james's avatar
      Mongo objects should download as JSON, not EDN (#49255) · d23d7a3a
      adam-james authored
      * Mongo objects should download as JSON, not EDN
      
      Fixes #48198
      
      Prior to this change, object columns (base or effective type of :type/Dictionary) were just formatted with `(str
      value)` which results in a csv or json download containing EDN formatted objects.
      
      This is a bug because we present object column values as json in the app, so the expected formatting of the download
      should match this.
      
      The formatter function now takes this type into account. As well, since this is a type of formatting that should be
      always applied (even when format_rows is false), the function is modified to unconditionally apply the json/encode
      formatting to dictionary types when encountered.
      
      * add a test
      
      * add proper condition to test
      
      * card-download should be public
      
      * uncomment json encoding formatter
      
      * set-cell! should keep encoded json string for Objects
      
      I think this is the correct change; I don't really understand the reason for wrapping, encoding, decoding, and then
      string-ing that value. Maybe I'm missing something.
      
      * Adjusted xlsx Object set-cell! implementation
      
      * forgot the not... inverted
      Unverified
      d23d7a3a
    • bryan's avatar
      is-hosted and ag-mode are mutex (#49259) · c3f9a20e
      bryan authored
      Unverified
      c3f9a20e
    • Jeff Bruemmer's avatar
      docs - add load-sample-content (#49284) · a223f819
      Jeff Bruemmer authored
      Unverified
      a223f819
    • Noah Moss's avatar
  9. Oct 25, 2024
  10. Oct 24, 2024
    • bryan's avatar
      AG housekeeping (#49047) · cca66d44
      bryan authored
      
      * upgrades is-airgapped? defn to defsetting airgap-enabled
      
      - uses the airgap-enabled settings value to remove Cloud section in
        SettingsEditor
      - "Metabase Enterprise Airgap" -> "Enterprise Airgap"
      
      * hide still need help section in airgap mode
      
      * move flag checking into selectors
      
      * fe lint
      
      * ts type check
      
      * use optional chaining and nullish coalescing
      
      * hide StillNeedHelp in ag mode
      
      * adding airgap-enabled to createMockSettings
      
      ---------
      
      Co-authored-by: default avatarNick Fitzpatrick <nickfitz.582@gmail.com>
      Unverified
      cca66d44
Loading