Skip to content

[Feature] Add Dynamic Table status query and refresh control commands #3

@yunqiqiliang

Description

@yunqiqiliang

Problem

Dynamic Table refresh behavior is opaque via CLI. Users cannot easily check:

  • Next scheduled refresh time
  • Current refresh status (IDLE, RUNNING, FAILED)
  • Last refresh duration and mode (FULL/INCREMENTAL)
  • Why a table didn't refresh at expected time (e.g., scheduleStartTime confusion)

Currently, users must run complex SHOW DYNAMIC TABLE REFRESH HISTORY queries and parse output manually.

Proposed Solution

  1. Add cz-cli dt status <table> command:
    • Returns: interval, next_trigger_time, last_refresh_state, last_refresh_mode, error_message
  2. Add cz-cli dt refresh <table> [--mode full|incremental] command:
    • Wraps REFRESH DYNAMIC TABLE SQL with validation and progress tracking.
  3. Clarify documentation: REFRESH INTERVAL calculates from creation/last refresh time, not wall-clock alignment.

Expected Benefit

  • Make Dynamic Table scheduling observable and intervenable.
  • Reduce troubleshooting time for "why didn't it refresh?" scenarios.
  • Provide intuitive CLI interface for common DT operations.

Priority

🔴 P0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions