我想知道是否有可能做经典的"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:
但是,这不是我想要的.我希望找到一种在没有任何可用数据的情况下创建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
发布评论