process_multi_in.sql 608 B

12345678910111213141516171819202122
  1. /* syntax version 1 */
  2. /* postgres can not */
  3. /* dq file can not */
  4. $udfScript = @@
  5. def MyFunc(stream):
  6. return stream
  7. @@;
  8. $record = (SELECT TableRow() FROM plato.Input);
  9. $recordType = TypeOf(Unwrap($record));
  10. $streamType = StreamType(VariantType(TupleType($recordType, $recordType, $recordType)));
  11. $udf = Python3::MyFunc(CallableType(0, $streamType, $streamType), $udfScript);
  12. $src = (select * from plato.Input where key > "200");
  13. $i, $j, $k = (PROCESS plato.Input, (select * from plato.Input where key > "100"), $src USING $udf(TableRows()));
  14. select * from $i;
  15. select * from $j;
  16. select * from $k;