Documentation
¶
Overview ¶
Package scheduled provides the scheduled transformation type handler
Index ¶
- Variables
- func Register()
- func ValidateScheduleFormat(schedule string) error
- type Config
- type Handler
- func (h *Handler) ApplyOverrides(override interface{})
- func (h *Handler) Config() any
- func (h *Handler) GetAdminTable() transformation.AdminTable
- func (h *Handler) GetID() string
- func (h *Handler) GetSchedule() string
- func (h *Handler) GetTags() []string
- func (h *Handler) GetTemplateVariables(_ context.Context, taskInfo transformation.TaskInfo) map[string]any
- func (h *Handler) RecordCompletion(ctx context.Context, adminService any, modelID string, ...) error
- func (h *Handler) ShouldTrackPosition() bool
- func (h *Handler) Type() transformation.Type
- func (h *Handler) Validate() error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrScheduleRequired is returned when schedule is not specified ErrScheduleRequired = errors.New("schedule is required for scheduled transformations") // ErrIntervalNotAllowed is returned when interval is specified for scheduled transformations ErrIntervalNotAllowed = errors.New("interval cannot be specified for scheduled transformations") // ErrSchedulesNotAllowed is returned when schedules are specified for scheduled transformations ErrSchedulesNotAllowed = errors.New("schedules (forwardfill/backfill) cannot be specified for scheduled transformations, use schedule field instead") // ErrDependenciesNotAllowed is returned when dependencies are specified for scheduled transformations ErrDependenciesNotAllowed = errors.New("dependencies cannot be specified for scheduled transformations") // ErrAdminServiceInvalid is returned when admin service doesn't implement required interface ErrAdminServiceInvalid = errors.New("admin service does not implement RecordScheduledCompletion") )
Functions ¶
func ValidateScheduleFormat ¶
ValidateScheduleFormat validates a cron schedule expression
Types ¶
type Config ¶
type Config struct {
Type string `yaml:"type"`
Database string `yaml:"database"`
Table string `yaml:"table"`
Schedule string `yaml:"schedule"` // Cron expression for scheduling
Tags []string `yaml:"tags,omitempty"`
Exec string `yaml:"exec,omitempty"`
SQL string `yaml:"-"` // SQL content from separate file
}
Config defines the configuration for scheduled transformation models
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles scheduled transformation type operations
func NewHandler ¶
func NewHandler(data []byte, adminTable transformation.AdminTable) (*Handler, error)
NewHandler creates a new handler for scheduled transformations
func (*Handler) ApplyOverrides ¶ added in v0.0.27
func (h *Handler) ApplyOverrides(override interface{})
ApplyOverrides applies configuration overrides to this scheduled transformation handler Uses reflection to avoid circular dependency with models package
func (*Handler) GetAdminTable ¶
func (h *Handler) GetAdminTable() transformation.AdminTable
GetAdminTable returns the admin table configuration
func (*Handler) GetSchedule ¶
GetSchedule returns the cron schedule expression
func (*Handler) GetTemplateVariables ¶
func (h *Handler) GetTemplateVariables(_ context.Context, taskInfo transformation.TaskInfo) map[string]any
GetTemplateVariables returns template variables for scheduled transformations
func (*Handler) RecordCompletion ¶
func (h *Handler) RecordCompletion(ctx context.Context, adminService any, modelID string, taskInfo transformation.TaskInfo) error
RecordCompletion records the completion of a scheduled transformation
func (*Handler) ShouldTrackPosition ¶
ShouldTrackPosition returns false for scheduled transformations
func (*Handler) Type ¶
func (h *Handler) Type() transformation.Type
Type returns the transformation type (scheduled)