Using remove_attr to remove geom from csv output

I am trying to use remove_attr to remove the geom from my data before saving to csv but I am getting an error

analysis
-> select({remove_attr(*, {exposure.geom: ''}).*})
-> save(name: 'output', format: 'csv')
  - Problems found with 'model' identified model
    - Got 'geom' on line 35 (column 37), wanted one of [QUOTED_IDENTIFIER, IDENTIFIER]

Thanks

Hi John

remove_attr can only remove child elements but it looks like you want to remove a grandchild attribute.

so would want to change to select({*, exposure: remove_attr(exposure, {geom: ''})})

Glenn