清洁猪工作区中的Hello World [英] Hello world in clean pig workspace

查看:109
本文介绍了清洁猪工作区中的Hello World的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能做经典的"Hello world!"在Apache Pig中.

I wonder wheter it is possible to do the classic 'Hello world!' in Apache Pig.

Pig与SQL和蜂巢在某种程度上可以简单地实现:

Pig is somewhat related to SQL and hive where one could simply do:

SELECT 'Hello Wold';

但是,我一直找不到在Pig中从无到有创建某些东西"的方法.

However, I have been unable to find a way to 'create something from nothing' in Pig.

请注意,如果您能够加载1行或更多数据,则当然可以执行以下操作:

Note that if you are able to load in 1 line of data or more, you could of course do the following:

  1. 加载
  2. 限制1
  3. 生成Hello World

但是,这不是我想要的.我希望找到一种在没有任何可用数据的情况下创建hello world示例的方法.

However, this is not what I am looking for. I hope to find a way to create a hello world example without having any kind of data available.

万一您想知道:我主要是出于好奇而问这个问题,但通过仅在代码中执行某些操作(而无需接触文件系统)来加快代码的测试也很方便.

In case you wonder: I am mostly asking this out of curiosity, but it could also be convenient to speed up the testing of code by just doing something in code (without having to touch the file system).

推荐答案

这些年来,我现在非常有信心,不可能用Apache Pig从无到有创建某些东西.

After all these years, I am now fairly confident that it is NOT possible to create something from nothing with Apache Pig.

这篇关于清洁猪工作区中的Hello World的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆