TPT - $INSERT generation

Tools & Utilities

TPT - $INSERT generation

Hi, when using code such as the following:


SELECT * FROM OPERATOR($FILE_READER( DELIMITED  @TargetDatabase || '.' || @TargetTable ));

I understand that TPT will go off to the target table, and infer the schema from it .  

In my case, I am using a DDL_OPERATOR to create the target table, so it won't existe for TPT to inspect until after the DDL_OPERATOR has completed.  

Does that mean I need to have two TPT scripts, one to create the table, and a subsequent one to perform the fastload?  Or is there a better way to do all this in one script?