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:45:53 UTC

[jira] Created: (HIVE-1604) Patch to allow variables in Hive

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


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.


[jira] Commented: (HIVE-1604) Patch to allow variables in Hive

Posted by "Vaibhav Aggarwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903645#action_12903645 ] 

Vaibhav Aggarwal commented on HIVE-1604:
----------------------------------------

I think that introducing a new option '-d' is simpler as compared to reusing '-hiveconf'.
We have been using this patch at Amazon Elastic Map Reduce for allowing variable substitution in Hive.
We just wanted to contribute it back.

Please feel free to use this patch for introducing variables if it meets expectations.
Else we can wait for the HIVE 1096 to be committed.

Thanks
Vaibhav

> 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.


[jira] Updated: (HIVE-1604) Patch to allow variables in Hive

Posted by "Vaibhav Aggarwal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vaibhav Aggarwal updated HIVE-1604:
-----------------------------------

    Attachment: HIVE-1604.patch

> 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.


[jira] Commented: (HIVE-1604) Patch to allow variables in Hive

Posted by "Vaibhav Aggarwal (JIRA)" <ji...@apache.org>.
    [ 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.