Hi All,
With TTU 14, we could create templates for TPT without the need to specify SCHEMA definition. I was able to successfully implement it for EXPORT, SELECTOR and LOAD operator. However, I am unable to do it for STREAM. I get the following erorr when I try it on the same lines of LOAD. Please find the script and the exact error.
Script
USING CHARACTER SET @v_utf
DEFINE JOB load_template
(
APPLY ('INSERT INTO MyTable;') TO OPERATOR ($STREAM() ATTR (TdpId=@v_tdpid, UserName=@v_userid, UserPassword=@v_password, MaxSessions=@v_sessions, DateForm = 'ANSIDATE', INTEGER Pack = @v_pack))
SELECT * FROM OPERATOR($FILE_READER(DELIMITED @v_tablename) ATTR (FileName=@v_file_name, Format=@v_format, TextDelimiter=@v_delimiter_value, OpenMode = 'Read', IndicatorMode = @v_mode));
);
Error
TPT_INFRA: Syntax error at or near line 7 of Job Script File 'stream_template_delimited.out.ctl':
TPT_INFRA: At "INTEGER" missing { REGULAR_IDENTIFIER_ EXTENDED_IDENTIFIER_ EXTENDED_IDENTIFIER_NO_N_ } in Rule: Regular Identifier
TPT_INFRA: Syntax error at or near line 7 of Job Script File 'stream_template_delimited.out.ctl':
TPT_INFRA: TPT03247: Rule: Attribute Value Specification
TPT_INFRA: Semantic error at or near line 9 of Job Script File 'stream_template_delimited.out.ctl':
TPT_INFRA: TPT03111: Rule: Restricted APPLY Statement
Compilation failed due to errors. Execution Plan was not generated.
Job script compilation failed.
Please let me know if you need any additional information.
Thanks,
Naveen K