You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Vaibhav Aggarwal (JIRA)" <ji...@apache.org> on 2010/08/27 21:51:54 UTC
[jira] Commented: (HIVE-1604) Patch to allow variables in Hive
[ https://issues.apache.org/jira/browse/HIVE-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903570#action_12903570 ]
Vaibhav Aggarwal commented on HIVE-1604:
----------------------------------------
Hi
I have submitted a patch which allows users to specify command line variables in Hive.
This patch performs variable substitution in commands issued using HIVE CLI.
Sample use:
hive \
-d SAMPLE=s3://elasticmapreduce/samples/hive-ads \
-d DATE=2009-04-13-08-05
hive> add jar ${SAMPLE}/libs/jsonserde.jar ;
hive> create external table impressions (
hive> requestBeginTime string, requestEndTime string, hostname string
hive> )
hive> partitioned by (
hive> dt string
hive> )
hive> row format
hive> serde 'com.amazon.elasticmapreduce.JsonSerde'
hive> with serdeproperties (
hive> 'paths'='requestBeginTime, requestEndTime, hostname'
hive> )
hive> location '${SAMPLE}/tables/impressions' ;
> Patch to allow variables in Hive
> --------------------------------
>
> Key: HIVE-1604
> URL: https://issues.apache.org/jira/browse/HIVE-1604
> Project: Hadoop Hive
> Issue Type: Improvement
> Components: CLI
> Reporter: Vaibhav Aggarwal
> Attachments: HIVE-1604.patch
>
>
> Patch to Hive which allows command line substitution.
> The patch modifies the Hive command line driver and options processor to support the following arguments:
> hive [-d key=value] [-define key=value]
> -d Subsitution to apply to script
> -define Subsitution to apply to script
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.