Skip to main content

RUN SERVICE IN TABLE

Description

Manually triggers a table service for a Onehouse table. This command is used when a service is configured with TRIGGER_MODE = 'ONDEMAND' using the ALTER SERVICE IN TABLE command.

Note that the SQL statement does not end with ;

Syntax

RUN SERVICE IN TABLE <table_name>
LAKE = <string>
DATABASE = <string>
SERVICE = { 'CLUSTER' | 'COMPACT' | 'CLEAN' | 'METASYNC' | 'AUTOSAVEPOINT' | 'RESTORE' }

Important: This command only works for services that are enabled and configured with TRIGGER_MODE = 'ONDEMAND' in the table. Use ALTER SERVICE IN TABLE to configure services.

Examples

Run Clustering

RUN SERVICE IN TABLE my_table
LAKE = 'my_lake'
DATABASE = 'my_database'
SERVICE = 'CLUSTER'

Run MetaSync

RUN SERVICE IN TABLE my_table
LAKE = 'my_lake'
DATABASE = 'my_database'
SERVICE = 'METASYNC'

Sample response.

Required parameters

  • <table_name>: Specify the name of the target Onehouse table to run the service on
  • LAKE: Specify the name of the lake where the target Onehouse table exists
  • DATABASE: Specify the name of the database where the target Onehouse table exists
  • SERVICE: Specify the table service to run

Note: You must create the table service before running the service. Use ALTER SERVICE IN TABLE to create the service.