Logging

To turn on debug logging, set the following in conf/server/log4j.properties

log4j.logger.com.compositesw.server.qe.physical.ddl=DEBUG

Create Script

When a script "/shared/examples/ctasScript" is created with attribute "script", a DEBUG message is logged like below in the cs_server.log file:

 

DEBUG 2019-04-09 11:54:51.992 -0700 DDLNode - About to execute: CREATE SCRIPT /shared/examples/ctasScript
 DEFINE AS PROCEDURE ctasScript()
BEGIN
    CREATE TABLE /shared/examples/ds_inventory/tutorial/OrdersTable AS
SELECT OrderId, ProductID, Discount, OrderDate, CompanyName, CustomerContactFirstName, CustomerContactLastName, CustomerContactPhone
FROM      /shared/examples/ViewOrder;

"IF NOT EXISTS" can be specified in the CREATE SCRIPT command optionally. When script being created does not exist, its created. If resource already exists, no error is thrown when IF NOT EXISTS keywords are specified. Note that the procedure name mentioned in the script and the name of the script must be the same, else the script creation will fail and will throw an error.

Alter Script

The script is marked impacted when errors are found during compilation. During an alter, the following DEBUG message is logged in the cs_server.log file, if debugging is enabled

 

DEBUG 2019-04-09 12:17:57.978 -0700 DDLNode - About to execute: ALTER SCRIPT /shared/examples/ctasScript
 DEFINE AS PROCEDURE ctasScript()
BEGIN
    CREATE TABLE /shared/examples/ds_inventory/tutorial/OrdersTable AS
SELECT OrderId, ProductID, OrderDate, CustomerContactFirstName, CustomerContactLastName
FROM      /shared/examples/ViewOrder
;
END
    SET ANNOTATION 'this SCRIPT is altered using DSL'

Delete Script

During a delete operation, the following DEBUG message is logged.

DEBUG 2019-04-09 13:14:38.300 -0700 DDLNode - About to execute: DROP SCRIPT /shared/examples/ctasScript

"IF EXISTS" can be specified optionally with the DROP SCRIPT command. When script being dropped exists, it is dropped. When script being dropped does not exist, and "IF EXISTS" keywords are used, no error is thrown.