1. Adobe Campaign Classic v7 Documentation
JSAPI Reference
queryDef class: This document details the create(queryDef) static method for creating a query definition instance. It is the standard starting point for building and executing queries in server-side JavaScript. The examples show its use for data selection. (See section: queryDef class description and create(queryDef) method).
2. Adobe Campaign Classic v7 Documentation
JSAPI Reference
xtk.session static class: This documentation outlines the write(entity) method. It explicitly states the method "Writes an entity in the database (INSERT or UPDATE)." This is the correct function for persisting the data retrieved by the queryDef into the temporary table. (See section: xtk.session class
write(entity) method).
3. Adobe Campaign Classic v7 Documentation
JSAPI Reference
xtk.workflow static class: This source describes the execute(workflowId) method
confirming its purpose is to execute a workflow identified by its ID
which is irrelevant to the data manipulation task described in the question. (See section: xtk.workflow class
execute(workflowId) method).