Hello, Please help! I am trying to create the function below as a UDF in Redshift using SAS Pass-Through. This is the same setup I have used in the past to create other functions as well as pass-through some SQL queries. I believe SAS is not liking the whitespace that is required for the Python function. My log with the error is below: 1 %studio_hide_wrapper; 82 %studio_show_wrapper; 84 %studio_restore_wrapper; 85 86 proc sql; 87 connect using schema1 as dbcon; 88 89 EXECUTE( 90 create or replace function schema1.f_py_greater (a float, b float) 91 returns float 92 stable 93 as $$ 94 if a > b: 95 return a 96 return b 97 $$ language plpythonu) by dbcon; ERROR: CLI execute error: [SAS][ODBC Redshift Wire Protocol driver][Redshift]ERROR: Failed to compile udf(Detail ----------------------------------------------- error: Failed to compile udf code: 10000 context: File "/rds/bin/padb.1.0.00000/data/udf/45/7410258963/fb9915f88af178c5b64300a52e5010c3d26bb3b1/0.py", line 2 if a > b: return a return b ^ SyntaxError: invalid syntax query: 0 location: cg_addins.cpp:257 process: padbmaster [pid=78392] ------------------------ NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. 98 99 quit; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SQL used (Total process time): real time 0.10 seconds cpu time 0.03 seconds Any help is appreciated. Thank you!
... View more