Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-1096

Hive Variables

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.7.0
    • Query Processor
    • None
    • Reviewed

    Description

      From mailing list:
      -Amazon Elastic MapReduce version of Hive seems to have a nice feature called "Variables." Basically you can define a variable via command-line while invoking hive with -d DT=2009-12-09 and then refer to the variable via ${DT} within the hive queries. This could be extremely useful. I can't seem to find this feature even on trunk. Is this feature currently anywhere in the roadmap?-

      This could be implemented in many places.
      A simple place to put this is
      in Driver.compile or Driver.run we can do string substitutions at that level, and further downstream need not be effected.

      There could be some benefits to doing this further downstream, parser,plan. but based on the simple needs we may not need to overthink this.

      I will get started on implementing in compile unless someone wants to discuss this more.

      Attachments

        1. 1096-9.diff
          10 kB
          Edward Capriolo
        2. hive-1096.diff
          4 kB
          Edward Capriolo
        3. hive-1096-10-patch.txt
          12 kB
          Edward Capriolo
        4. hive-1096-11-patch.txt
          12 kB
          Edward Capriolo
        5. hive-1096-12.patch.txt
          15 kB
          Edward Capriolo
        6. hive-1096-15.patch.txt
          22 kB
          Edward Capriolo
        7. hive-1096-15.patch.txt
          17 kB
          Edward Capriolo
        8. hive-1096-2.diff
          5 kB
          Edward Capriolo
        9. hive-1096-20.patch.txt
          22 kB
          Edward Capriolo
        10. hive-1096-7.diff
          6 kB
          Edward Capriolo
        11. hive-1096-8.diff
          10 kB
          Edward Capriolo

        Issue Links

          Activity

            People

              appodictic Edward Capriolo
              appodictic Edward Capriolo
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: