Ingestion scheduler reference¶
Database objects and procedures¶
The following procedures are created by the file scheduler/scheduler.sql.
PUBLIC.CREATE_ SCHEDULER()¶
This procedure acts as the entry point between SQL and Java. It will create a task running according to the schedule available in APP_STATE table.
This task will execute below PUBLIC.RUN_SCHEDULER_ITERATION() procedure when executed.
PUBLIC.RUN_ SCHEDULER_ ITERATION()¶
This procedure is an entry point to the Java implementation of the actual scheduling task. It will be invoked whenever the scheduler task is executed.
It needs com.snowflake:telemetry package in order to emit metrics to event table.
PUBLIC.ON_ INGESTION_ SCHEDULED (process_ id VARCHAR)¶
This procedure defines the ingestion flow for a single process that was taken by the scheduler for execution. The default implementation does nothing.
We recommend implementing this in Java using the OnIngestionScheduledCallback interface.
Related features¶
Other related features:
Task ReactorIngestion
Related Java objects¶
Java implementations and related classes:
CreateSchedulerHandlerRunSchedulerIterationHandlerRunSchedulerIterationHandlerBuilderOnIngestionScheduledCallbackOnIngestionFinishedCallback
Custom handler¶
Ingestion scheduler feature consists of two different handlers acting as entry point from SQL to Java:
CreateSchedulerHandlerRunSchedulerIterationHandler
We recommend customizing only the latter one.
Builder approach¶
RunSchedulerIterationHandler can be customized using RunSchedulerIterationHandlerBuilder.
This helper objects allows for custom implementations of the underlying interfaces:
ConnectorErrorHelperOnIngestionScheduledCallback
In case they are not provided the default implementations will be used.