I have the following function in postgres:
create function my_function(my_table mt, OUT e_p_l numeric, OUT e_p numeric) returns record
language plpgsql
as
$$
BEGIN
e_p_l := e_p_procedure(mt.p, mt.q_l, mt.m_c, mt.d_f);
e_p := e_p_procedure(mt.p, mt.q, mt.m_c, mt.d_f);
END;
$$;
I have e_p_procedure successfully working in BigQuery. But the current error I have is
Type not found: mt
my_table is just as it seems, a table (aliased as mt) with various fields I'd like to input into a BigQuery Procedure replica of this Postgres function.
How can I accomplish this in BigQuery?
CREATE PROCEDURE my_schema.my_function(my_table mt, OUT e_p_l numeric, OUT e_p numeric)
BEGIN
SET e_p_l = e_p_procedure(mt.p, mt.q_l, mt.m_c, mt.d_f);
SET e_p = e_p_procedure(mt.p, mt.q, mt.m_c, mt.d_f);
END;