Announcement

Collapse
No announcement yet.

Is it possible to EXPORT using Capped Collection?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to EXPORT using Capped Collection?

    The following schema is taken from http://docs.voltdb.com/UsingVoltDB/d...reatetable.php.


    CREATE TABLE events (
    event_time TIMESTAMP NOT NULL,
    event_code INTEGER NOT NULL.
    event_message VARCHAR(128),
    LIMIT PARTITION ROWS 1000 EXECUTE (
    DELETE FROM events WHERE
    SINCE_EPOCH(second,NOW) - SINCE_EPOCH(second,event_time) > 24*3600
    )
    );

    The above schema works perfectly. However, is it possible to do something like

    CREATE TABLE events (
    event_time TIMESTAMP NOT NULL,
    event_code INTEGER NOT NULL.
    event_message VARCHAR(128),
    LIMIT PARTITION ROWS 1000 EXECUTE (

    delete some deterministic data from events table
    insert the deleted data into an EXPORT table.

    )
    );

  • #2
    Hi interntest,

    What you propose is not currently supported, only DELETE statements on the same table may be used with LIMIT PARTITION ROWS ... EXECUTE.

    In most cases, it is preferable to insert data into an EXPORT table upon ingestion, often within a stored procedure. This way the downstream system is current within seconds or less. To delay inserting into an EXPORT table until a partition row limit is reached, it could be very unpredictable how current the downstream system would be.

    Do you agree?

    Best regards,
    Ben

    Comment

    Working...
    X