sql files are text file data resource that:
They can be:
A sql file accepts the following attributes parameter
| Argument | Values | Default | Description |
|---|---|---|---|
| PARSING | sql or text | sql | The parsing mode |
| END_OF_RECORDS | See endofrecords | See endofrecords | The end of records for a sql statement |
| COLUMN_NAME | - | sql | The name of the column that stores the SQL statement |
Because a SQL file is a text file, you can also set text attributes
When the parsing mode is set to text, the following default end of records values are used:
| Description | Values |
|---|---|
| ; followed by an end of line character | ;\n, ;\r\n, ;\r |
| / followed by an end of line character | /\n, /\r\n, /\r |
| the word GO or go on one line | \ngo\n, \r\ngo\r\n, \rgo\r \nGO\n, \r\nGO\r\n, \rGO\r |
The parsing attribute has two values:
The sql value will extract the SQL statement with a SQL parser that is aware of the SQL language such as:
In this mode, the returned data path has the following columns:
In this mode, the end of statement characters are:
The text mode will extract the SQL statement with the end Of Records values on text level.
In this mode, the returned data path has only one column that stores the SQL statement with the name specified by the column-name attribute and a clob data type.
Structure Source / Target
In a transfer:
A SQL File is executed only if you use it in a SQL Request format
We support all SQL scripts that follows the ANSI SQL standard.
Unfortunately, every database derives from it for historical or feature purpose and there is almost one SQL language flavor by database.
We recognize:
We support comment at the beginning of a line and in-line comment
# A supported comment
-- A supported comment
SELECT 1 /* an in-line supported comment */ + 1;
We DON'T support comment at the end of the line (because our parser is line based, not word based)
SELECT 1+1; # This comment is not supported
SELECT 1+1; -- This comment is not supported