Package dev.frostlake.metastore.model
Class Task
java.lang.Object
dev.frostlake.metastore.model.Task
Represents a Snowflake Task - Scheduled SQL execution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPredecessor(String taskName) The user who ran the CREATE TASK, which live reports ascreated_by_user.The parameter names set on this task, for the snapshot writer.intgetId()The opaque task identifier live reports as SHOW TASKS'id.getName()getOwner()getState()intintintintlongbooleanisActive()booleanbooleanisParameterSetOnTask(String parameterName) Whether the task set this parameter itself — the difference between a TASK level and a blank one.voidmarkParameterSet(String parameterName) Record thatparameterNamewas given on the task itself rather than left at its default.voidrecordExecution(TaskExecution execution) voidsetAllowOverlappingExecution(boolean allowOverlappingExecution) voidsetComment(String comment) voidsetCondition(String condition) voidsetCreatedByUser(String createdByUser) voidvoidRestore the identity a snapshot recorded, so it survives a reload as live's does.voidsetLastReturnValue(String lastReturnValue) voidsetLastRunTime(LocalDateTime lastRunTime) voidsetNextRunTime(LocalDateTime nextRunTime) voidvoidsetSchedule(String schedule) voidsetScheduleType(ScheduleType scheduleType) voidvoidsetSqlStatement(String sqlStatement) voidvoidvoidvoidsetTaskAutoRetryAttempts(int v) voidvoidvoidsetUserTaskTimeoutMs(long userTaskTimeoutMs) voidsetWarehouse(String warehouse)
-
Constructor Details
-
Task
public Task(String name, String schedule, ScheduleType scheduleType, String sqlStatement, String warehouse)
-
-
Method Details
-
addPredecessor
-
recordExecution
-
getLastReturnValue
-
setLastReturnValue
-
getId
The opaque task identifier live reports as SHOW TASKS'id. -
setId
Restore the identity a snapshot recorded, so it survives a reload as live's does. -
getExplicitParameters
The parameter names set on this task, for the snapshot writer. -
getCreatedByUser
The user who ran the CREATE TASK, which live reports ascreated_by_user. -
setCreatedByUser
-
markParameterSet
Record thatparameterNamewas given on the task itself rather than left at its default. -
isParameterSetOnTask
Whether the task set this parameter itself — the difference between a TASK level and a blank one. -
getName
-
getOwner
-
setOwner
-
getSchedule
-
getScheduleType
-
getSqlStatement
-
getWarehouse
-
getPredecessors
-
getCreatedAt
-
getState
-
setState
-
getLastRunTime
-
setLastRunTime
-
getNextRunTime
-
setNextRunTime
-
getExecutionHistory
-
getSuccessCount
public int getSuccessCount() -
getFailureCount
public int getFailureCount() -
isActive
public boolean isActive() -
getComment
-
setComment
-
getCondition
-
setCondition
-
setSchedule
-
setScheduleType
-
setSqlStatement
-
setWarehouse
-
getSuspendTaskAfterNumFailures
public int getSuspendTaskAfterNumFailures() -
setSuspendTaskAfterNumFailures
public void setSuspendTaskAfterNumFailures(int v) -
getTaskAutoRetryAttempts
public int getTaskAutoRetryAttempts() -
setTaskAutoRetryAttempts
public void setTaskAutoRetryAttempts(int v) -
getUserTaskManagedInitialWarehouseSize
-
setUserTaskManagedInitialWarehouseSize
-
getServerlessTaskMaxStatementSize
-
setServerlessTaskMaxStatementSize
-
getTargetCompletionInterval
-
setTargetCompletionInterval
-
getErrorIntegration
-
setErrorIntegration
-
getUserTaskMinimumTriggerIntervalInSeconds
public int getUserTaskMinimumTriggerIntervalInSeconds() -
setUserTaskMinimumTriggerIntervalInSeconds
public void setUserTaskMinimumTriggerIntervalInSeconds(int v) -
isAllowOverlappingExecution
public boolean isAllowOverlappingExecution() -
setAllowOverlappingExecution
public void setAllowOverlappingExecution(boolean allowOverlappingExecution) -
getUserTaskTimeoutMs
public long getUserTaskTimeoutMs() -
setUserTaskTimeoutMs
public void setUserTaskTimeoutMs(long userTaskTimeoutMs)
-