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

Provide a connection string example in beeline

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.3.0
    • Component/s: Beeline
    • Labels:
      None

      Description

      It would save a bunch of googling if we could provide some examples of connection strings directly to beeline help message

      Eg:

      ./bin/beeline --help
      Usage: java org.apache.hive.cli.beeline.BeeLine 
         -u <database url>               the JDBC URL to connect to
         -r                              reconnect to last saved connect url (in conjunction with !save)
         -n <username>                   the username to connect as
         -p <password>                   the password to connect as
         -d <driver class&gt;               the driver class to use
         -i <init file>                  script file for initialization
         -e <query>                      query that should be executed
         -f <exec file>                  script file that should be executed
         -w (or) --password-file <password file>  the password file to read password from
         --hiveconf property=value       Use value for given property
         --hivevar name=value            hive variable name and value
                                         This is Hive specific settings in which variables
                                         can be set at session level and referenced in Hive
                                         commands or queries.
         --color=[true/false]            control whether color is used for display
         --showHeader=[true/false]       show column names in query results
         --headerInterval=ROWS;          the interval between which heades are displayed
         --fastConnect=[true/false]      skip building table/column list for tab-completion
         --autoCommit=[true/false]       enable/disable automatic transaction commit
         --verbose=[true/false]          show verbose error messages and debug info
         --showWarnings=[true/false]     display connection warnings
         --showNestedErrs=[true/false]   display nested errors
         --numberFormat=[pattern]        format numbers using DecimalFormat pattern
         --force=[true/false]            continue running script even after errors
         --maxWidth=MAXWIDTH             the maximum width of the terminal
         --maxColumnWidth=MAXCOLWIDTH    the maximum width to use when displaying columns
         --silent=[true/false]           be more silent
         --autosave=[true/false]         automatically save preferences
         --outputformat=[table/vertical/csv2/tsv2/dsv/csv/tsv]  format mode for result display
                                         Note that csv, and tsv are deprecated - use csv2, tsv2 instead
         --incremental=[true/false]      Defaults to false. When set to false, the entire result set
                                         is fetched and buffered before being displayed, yielding optimal
                                         display column sizing. When set to true, result rows are displayed
                                         immediately as they are fetched, yielding lower latency and
                                         memory usage at the price of extra display column padding.
                                         Setting --incremental=true is recommended if you encounter an OutOfMemory
                                         on the client side (due to the fetched result set size being large).
         --truncateTable=[true/false]    truncate table column when it exceeds length
         --delimiterForDSV=DELIMITER     specify the delimiter for delimiter-separated values output format (default: |)
         --isolation=LEVEL               set the transaction isolation level
         --nullemptystring=[true/false]  set to true to get historic behavior of printing null as empty string
         --addlocaldriverjar=DRIVERJARNAME Add driver jar file in the beeline client side
         --addlocaldrivername=DRIVERNAME Add drvier name needs to be supported in the beeline client side
         --showConnectedUrl=[true/false] Prompt HiveServer2s URI to which this beeline connected.
                                         Only works for HiveServer2 cluster mode.
         --help                          display this message
       
         Example:
          1. beeline -u jdbc:hive2://localhost:10000 username password
          2. beeline -n username -p password -u jdbc:hive2://hs2.local:10012
      

        Attachments

        1. HIVE-13797.01.patch
          2 kB
          Vihang Karajgaonkar
        2. HIVE-13797.02.patch
          2 kB
          Vihang Karajgaonkar
        3. HIVE-13797.04.patch
          2 kB
          Vihang Karajgaonkar

          Activity

            People

            • Assignee:
              vihangk1 Vihang Karajgaonkar
              Reporter:
              vihangk1 Vihang Karajgaonkar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: