Ok, so in TPT we do things a little differently in our script language but we accomplish the same thing. The schema object defines what the incoming data record looks like.
The SELECT statement (in the APPLY-SELECT) allows you to define which fields from the input record you would like to send from the producer operator (i.e. the file reader) to the consumer operator (i.e. the Update operator).
Thus, if your schema had these 5 columns, but you only wanted to send a subset of those columns to the DBS, you would do something like this:
DEFINE SCHEMA abc
. . . .
TO OPERATOR ($UPDATE)
SELECT F2, F3, F5 FROM OPERATOR ($FILE_READER);
For #2, the DML statement is enclosed in single-quotes. Thus, if you have text inside those single-quotes that are enclosed in single-quotes, you need to escape them (by doubling each single-quote).
For #3, no you define the operators first. The APPLY-SELECT statement is just an executable statement that references the operators. You do notput an operator definition in the APPLY-SELECT.
Please refer to the documentation for proper script syntax.
Thanks for your updates. They are really helpful.
Just for #3, I saw that kind of syntax somewhere on web. I guess that was only for shorter display purpose and I misinterpreted that. :-)