s****h 发帖数: 3979 | 1 【 以下文字转载自 DataSciences 讨论区 】
发信人: squash (南瓜之夭夭), 信区: DataSciences
标 题: question about using Hive parameter
发信站: BBS 未名空间站 (Fri Oct 17 15:20:07 2014, 美东)
question about Hive parameter
Support we have some parameters as:
set nyear = '2014';
set nmonth = '10';
set nday = '17';
We generate a new parameter as:
set newdatestring = concat('/foldername/', ${hiveconf:nyear}, '/', ${
hiveconf:nmonth}, '/', ${hiveconf:nday},'/');
Comparing 2 queries
q1:
select ${hiveconf:newdatestring};
q1 output:
/folde... 阅读全帖 |
|
s****h 发帖数: 3979 | 2 question about Hive parameter
Support we have some parameters as:
set nyear = '2014';
set nmonth = '10';
set nday = '17';
We generate a new parameter as:
set newdatestring = concat('/foldername/', ${hiveconf:nyear}, '/', ${
hiveconf:nmonth}, '/', ${hiveconf:nday},'/');
Comparing 2 queries
q1:
select ${hiveconf:newdatestring};
q1 output:
/foldername/2014/10/17/
q2:
select "${hiveconf:newdatestring}";
q2 output:
concat('/foldername/', '2014', '/', '10', '/', '17','/')
The question: is there any se... 阅读全帖 |
|
c******a 发帖数: 159 | 3 要让老板拷我的一堆文件。我是owner。老板是网络group内的。默认文件拷过去权限都
是executable的,但事实上文件只是text file。所以每次双击打开都报错。我想改权
限为non-executable for group。我用chmod -R 766 foldername该后,老板没法访问
。若用chmod -R 755 foldername老板可以访问,但文件又是executable的了。
我该用什么命令解决问题呢?多谢大侠赐教。 |
|
s*********5 发帖数: 514 | 4 大概是这样,没有实际去试,有同学试过了来说说看
grep -r "[(]\?[[:digit:]]\{3\}[)|-|.]\?[[:digit:]]\{3\}}[-|.]\?[[:digit:]]\{
4\}" foldername |
|
s********i 发帖数: 17328 | 5 you don't need ssh to stream on local network.
1. share you folder on windowsxp. go to another computer to check if you can
access the shared folder \hostname\foldername.
2. in xbmc, video, add source, browse your network and find your windowsxp
computer and add the shared folder
http://wiki.xbmc.org/index.php?title=XBMC_for_iOS_specific_FAQ
How do I add a video media source for an SMB (CIFS/Samba/Windows) share?
There are several tutorials on YouTube or via Google. If you want more
detail, ... 阅读全帖 |
|
c*m 发帖数: 1114 | 6 Redirection is not appropriate here.
It should like "exec foldername outputfilename".
And you may use to access files inside the specific folder(opendi
r or whatever). And finally write output to "outputfilename".
Check this thread
http://www.linuxquestions.org/questions/programming-9/c-list-files-in-direct
ory-379323/
BTW, if you have to use "< folder" and ">output", you may read folder name
as a string and do the same thing on above. |
|
c*****t 发帖数: 1879 | 7 1. If you have the original email, just go to that email, type
enter. Now you are viewing the email. Press 'V'. Move
your cursor down to the .ps file and type 'S'. Now you
can save the indiviual file without any garbages around.
2. If you saved the email and removed it from INBOX, normally
pine will save it in a email format. So in the main screen
of pine, type 'L', select the filename/foldername of email.
Then do it like part 1. |
|
h**********1 发帖数: 155 | 8 用Rcmd INSTALL --build foldername that contain your source.
tar.gz is the source file which could be read by people.
.zip is the file that used by R |
|
d*******3 发帖数: 58 | 9 写漏了
LOCATION="/foldername/$nyear/$nmonth/$nday" |
|
s****h 发帖数: 3979 | 10 不行就只能这样了。
关键是有好几个不同的foldername(tables)。这样搞太麻烦。
date也可能有好多,比如连续30天。
本来是打算传个终止日期,和天数就可以了。 |
|
d*******3 发帖数: 58 | 11
1.无论你在hive 里搞还是在脚本呢里搞,逻辑上是一样的。你在hiveconf里搞绝对不
会比在脚本里搞简单,hive 本身只提供类sql 的查询语言,逻辑控制没有脚本灵活方
便。
2.脚本里传个起始/终止时间和天数,构造下foldername 传给hive 执行是恨easy 的一
件事情。 |
|
s****h 发帖数: 3979 | 12 在shellscript里搞,就要传很多foldername进hive。
而且,如果要按date来patition,不可能几百个patition的location一个一个传进去吧。
如果hive里不能解决,那我估计会简单用python写个生成hive query的东西 |
|