Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3866

Data cleanup after contract to subscription migration

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • swatch-contracts
    • None
    • Low

      We have bunch of metric_ids that are invalid in subscription_measurements table. It doesn't cause any issue but, we should delete them to make things cleaner. This will be the last task for contracts to subscription migration

      We can discuss more on this if needed?

      select count(*) as total_count, max(end_date) as max_end_date, metric_id
      from subscription s
      join subscription_measurements sm
        on s.subscription_id = sm.subscription_id
       and s.start_date = sm.start_date
      group by metric_id; 

      Invalid metric_ids in subscription_measurements table like: 

      select *
      from subscription s
      join subscription_measurements sm
        on s.subscription_id = sm.subscription_id
       and s.start_date = sm.start_date
      where sm.metric_id in ('Crisps','MCT4545','MW00584MO','RH00004','RH00270'); 

              Unassigned Unassigned
              karshah@redhat.com Kartik Shah
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: