====== Data Resource - SQL File ====== ===== About ===== ''sql file'' are [[text|text file data resource]] that contains ''sql statement'' as [[docs:resource:record|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 | | [[text#arguments|columnName]] | - | ''sql'' | The name of the column that stores the SQL statement | | You can also set the other [[text#arguments|text arguments]] ||| ==== Parsing ==== The ''parsing'' argument as two values: * [[#sql]] * [[#text]] === 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 [[#arguments|columnName argument]] and a [[docs:common:data_type|clob data type]]. === Text === The ''text'' mode will extract the SQL statement with the [[#EndOfRecords|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 [[#arguments|columnName argument]] and a [[docs:common:data_type|clob data type]]. ==== EndOfRecords ==== When the [[#parsing|parsing mode]] is set to text, the following default [[text#arguments|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'' |