Data Resource - SQL File

Data Resource - SQL File

About

sql file are text file data resource that contains sql statement as record.

Arguments

Argument Values Default Description
parsing sql
text
sql The parsing mode
EndOfRecords See endOfRecords See endOfRecords The end of records for a sql statement
columnName - sql The name of the column that stores the SQL statement
You can also set the other text arguments

Parsing

The parsing argument as two values:

SQL

The sql value will extract the SQL statement with a SQL parser that is aware of the SQL language such as:

  • block of code (ie procedural code)
  • comment

In this mode, the returned data path has two columns:

  • type that return the type of the statement (“sql”,“plsql”,“comment”,…)
  • and a column for the SQL statement with the name specified by the columnName argument and a clob data type.

Text

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 columnName argument and a clob data type.

EndOfRecords

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
Powered by ComboStrap