你好世界在干净的猪工作区 [英] Hello world in clean pig workspace

查看:19
本文介绍了你好世界在干净的猪工作区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以执行经典的Hello world!"在 Apache Pig 中.

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

Pig 与 SQL 和 hive 有点相关,可以简单地做:

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.

这篇关于你好世界在干净的猪工作区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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