Lyftron stored procedures
Apart from emulating SQL Server's stored procedures, Lyftron introduces some of its own. All of them start with lyft_ prefix to be easily distinguished from regular SQL Server stored procedures.
Administrative
Administrative stored procedures should be used by power users and administrators. Note that most of the tasks can also be achieved conveniently using Lyftron Admin Portal user interface.
Stored procedure name | Description |
---|---|
lyft_flush_plan_cache | Flushes the whole execution plan cache. |
lyft_run_garbage_collection | Attempts garbage collection to reclaim unused memory. |
lyft_set_default_federator | Configures federator for an agent. Given connection will be the new default federator for the designated agent. |
Cache management
Stored procedure name | Description |
---|---|
lyft_create_view_copy | Creates a primary/secondary view copy for the materialized view. |
lyft_evict_spark_inmem_cached_table | Removes data from Spark in-memory cache for given table. |
lyft_full_load_cached_view_copy | Loads cache for a given view. |
lyft_full_load_view_copy | Fills a primary/secondary view copy. |
lyft_incremental_insert | Inserts new rows into an incremantally cached view. |
lyft_incremental_load_cached_view_copy | Conducts the whole process of an incremental load of new rows. |
lyft_invalidate_spark_cached_table | Invalidates and then loads Spark in-memory cache for given table. |
lyft_populate_cached_table | Materializes a cached view. |
lyft_refresh_view | |
lyft_set_reload_mode | Sets reload mode for given view. |
lyft_set_view_cache_mode | Sets the cache mode for given view. |
lyft_set_view_copy_status | |
lyft_set_incremental_marker | Sets new incremental marker value for given table or view. |
lyft_set_incremental_marker_column | Sets incremental marker column for given table or view. The column will be later used for incremental load process. |
lyft_switch_view_copy | Switches view copy between the primary and secondary table for cached views with two rotated tables. |
lyft_trim_view_copy | Drops persistent cache and recreates it. |
Connection management
Stored procedure name | Description |
---|---|
sp_addlinkedserver | Creates a connection to a data source. A connection allows for access to a single data source (endpoint). |
sp_addlinkedsrvlogin | Creates or updates a mapping between a connection on the local instance of Lyftron and a security account on a remote data source. |
sp_dropserver | Removes a connection from the list of known connections on the instance of Lyftron. |
sp_testlinkedserver | Tests the connection to a data source. |
sp_updatelinkedserver | Updates a connection to a data source. |
Diagnostics
Stored procedure name | Description |
---|---|
lyft_set_logging_level | Dynamically changes Lyftron logging level. |
lyft_help_jobs | Fetches a data set with details of all jobs that the schedule is aware of. |
Job management
Stored procedure name | Description |
---|---|
sp_add_job | Adds a job executed by the job scheduler. |
sp_add_jobstep | Adds a step (operation) to a job. |
sp_add_schedule | Creates a schedule that can be used by any number of jobs. |
sp_attach_schedule | Sets a schedule for a job. |
sp_detach_schedule | Removes an association between a schedule and a job. |
sp_delete_job | Deletes a job. |
sp_start_job | Instructs the scheduler to execute a job immediately. |
sp_update_job | Changes the attributes of a job. |
sp_update_jobstep | Changes the setting for a step in a job that is used to perform automated activities. |
sp_update_schedule | Changes the settings for a schedule. |
sp_delete_jobstep | Deleted a step from the job. |
sp_delete_schedule | Deletes a schedule. |
Utility
Stored procedure name | Description |
---|---|
lyft_execute_provider_sql_on_connection | Executes provider-specific SQL query or command on a given connection. |
lyft_update_object_statistics | Updates statistics (rowcount and distinct count) for a given table. |
lyft_update_row_count_object_statistics | Updates rowcount statistics for a given table. |
Metadata management
Stored procedure name | Description |
---|---|
lyft_get_partitioning_schema | Retrieves partitioning schema for a given view. |
lyft_set_partitioning_schema | Sets partitioning mode and schema for a given view. |
sp_generate_views | Generates views on target database based on objects (tables or views) from a source database. |
sp_import_metadata | Generates views on target database based on objects (tables or views) from a source database. |
Spark management
Stored procedure name | Description |
---|---|
lyft_spark_force_become_active | Transitions the node to Active, regardless of Zookeeper state. |
lyft_spark_force_become_standby | Transitions the node to StandBy, regardless of Zookeeper state. |
lyft_spark_instance_kill | Forces an OS-level kill on the given Spark process. |
lyft_spark_instance_start | Tries to find a running Spark process in the OS. If not found, a new process is started. |
lyft_spark_instance_stop | Sends a stop-server signal to the remote driver. |
lyft_spark_release | Releases Spark context and transitions driver to non-initialized state. |
lyft_spark_stop_driver | Sends a stop-server signal to the remote driver. |