Skip to content

Continuous aggregate policy example in readme doesn't work #118

@Tomcat-Engineering

Description

@Tomcat-Engineering

The readme file has this example for adding a continuous aggregate policy:

    add_continuous_aggregate_policy('events_per_minute',
      start_offset: '3 minute',
      end_offset: '1 minute',
      schedule_interval: '1 minute') 

But I think that this is actually the raw SQL that is needed, not the ruby code?

In ruby:

  1. The method is called create_continuous_aggregate_policy
  2. You need to add extra quotes to the durations. "'1 minute'" and "INTERVAL '1 minute'" seem to work.

On the second point, it looks like it might be a good idea to have the library apply parse_interval to the durations (noting that the offsets can also be nil)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions