Can't remove all measurements in tag

#1

Hi,
I’m having problem trying to get rid of all measurements in tag, knowing that I have several transform types which map to RegisterMeasurement with different non required fields (except required inherited ones).

So basically, trying to run RegisterMeasurement.removeAll() returns the following error:

Fetching results in a similar problem, I assure there are polymorphic RegisterMeasurements, the client side can’t show.

… }

c3Grid(RegisterMeasurement.fetch({limit:10}))
I can’t figure out how to proceed,

Please help.

Many thanks.

#2

also, I forgot to mention, that I blindly removed series. So I can’t remove by parent field. :cold_face:

Also my thread here I think shares the same root of problem.
https://community.c3.ai/t/remix-on-registermeasurement-made-issues-on-client-side-when-fetching-data/

#3

Seems like something is wrong & might need more investigation, but you could try doing RegisterMeasurement.clearCollection() IF AND ONLY IF this is not a multi tenant system

#4

@rohit.sureka thanks for the hint, what do you mean by IF AND ONLY IF this is not a multi tenant system? Can we just run this on the target tenant/tag?

#5

Actually, you should be fine. The engine should take care of deleting data only for the given tenant/tag.

  /**
   * Removes all data from a type.  It is equivalent to calling {@link removeAll} without specifying a filter.
   *
   * @param disableAsyncProcessing
   *        If true, then no invalidation for async processing will be done.
   */
  @action(group='delete')
  clearCollection: function(disableAsyncProcessing: boolean)
1 Like
#6

If this is an equivalent to removeAll, and removeAll doesn’t work for him - this is likely to fail as well?