process_with_udf_rows.sql 294 B

1234567891011121314151617
  1. /* postgres can not */
  2. $udf = Python::process(
  3. Callable<
  4. ()->Stream<Struct<result:Int64>>
  5. >, @@
  6. def process():
  7. for row in range(10):
  8. result = row
  9. yield locals()
  10. @@);
  11. $users = (
  12. SELECT `key` AS age, `value` AS name FROM plato.Input0
  13. );
  14. PROCESS $users
  15. USING $udf();