Application Programming Interface Guide > DSL API > SQL Script Procedures > Considerations
 
Considerations
Listed below are some points to consider while working with SQL Script Procedures:
Properties and annotation are optional when creating a sql script procedure.
“script” is an attribute of type String. The script mentioned while creating or altering a sql script procedure is saved into the attribute "script" in the script metadata.
Annotation, if any specified on the script is saved into the script metadata as well.
The created script can be viewed from the Studio as well. Multiple statements can be included in the script (for example, DROP TABLE can be used before a CREATE TABLE.)
When a script is altered, the definition script may or may not be provided. When a definition script is provided, which is not the same as the existing definition script, the new script is set on the script metadata. Properties and annotation are optional as well, with the alter syntax.
Script may be renamed or relocated, using the "RELOCATE AS" syntax.
When a script is created or altered, the model.ALL_RESOURCE_PROPERTIES table is updated with the properties of the script. These are the attributes that are set on a script that is created using the DSL api.
Assuming a table exists, an INSERT script can be used in the create sql script syntax. If the table in which records are inserted does not exist, then the script is created , however it will remain impacted till the table is created.
To read the value of "script" property from model.ALL_RESOURCE_PROPERTIES table, "rest/execute/v1/actions/query/ invoke" can be used.