在 PIG 中声明变量和模式

发布于 2024-12-29 20:08:11 字数 56 浏览 1 评论 0原文

如何在PIG中声明变量?假设我想要一个值为 10 的整数,我如何在脚本中声明它?以及如何重用模式?

how to declare a variable in PIG? suppose i want to have a integer to have values as 10 how can i declare it in script? and how schema can be reused ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥抱没勇气 2025-01-05 20:08:11

我认为您可以使用“声明”命令。它用于描述一个参数并在 PIG 脚本中使用。

    %declare DESC 'Database'
    A = load 'data' as (name, desc);
    B = FILTER A by desc eq '$DESC';
    .....

您可以在这里了解更多相关信息。 Pig 参数

I think you can use the 'Declare' command. It is used to describe one parameter and is used within the PIG script.

    %declare DESC 'Database'
    A = load 'data' as (name, desc);
    B = FILTER A by desc eq '$DESC';
    .....

You can get more about it here. Pig Parameter

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文