Snapshot execution in Lua scripting
Details
| Detail name | Value |
|---|---|
| Changelog Number | 9311 |
| Type | New Feature |
| Status | Resolved |
| Fix Versions | Exasol 7.0.0 |
| Resolution Date | 2020-09-11 |
Background
Snapshot execution was introduced in version 6.2.5. You can find more details in this ticket: https://www.exasol.com/support/browse/EXASOL-2646
One limitation of this feature is that snapshot execution was not available for Lua Scripts
Improvement
We have added the ability to execute statements in Snapshot mode in Lua Scripts. Snapshot execution in Lua scripting is supported with the "/*snapshot execution*/" phrase at the beginning of the statement inside of the [p]query function call.
[p]query([[/*snapshot execution*/ <sql statement>]])
Another possibility to enable snapshot execution is via the database parameter:
-enableSystemTablesSnapshotMode=1
When this parameter is enabled, you do not need to use the "/*snapshot execution*/" phrase at the beginning of the statement because metadata queries are executed in snapshot mode automatically, when possible.
Restriction
Using snapshot mode for script execution is not allowed and will raise an exception.
/*snapshot execution*/ execute script a_script()