Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编写一个配置单元 UDF,我必须在其中调用一个 REST API 并返回一个字符串数组。我已经用硬编码的 REST API url 编写了函数。但是现在为了使端点可配置,我想取出主机属性并将其放入配置中。可能吗?如果是的话,那怎么能通过呢?
您是否可以更改 UDF 以将主机作为其输入的一部分,然后在 Hive 中使用变量替换:
SET host=todayshosturl SELECT TRANSFORM ${hiveconf:host}, line USING 'python myudf.py' AS (line) FROM yourtable;