Configuring a time zone

Cloudera Data Warehouse by default is configured for the UTC time zone. If you want time-related queries in your Virtual Warehouse to return results in your local time zone instead of UTC, you need learn how to change the configuration.

The way you configure the time zone in the Hive Virtual Warehouse versus the Impala Virtual Warehouse differs. In this task, you configure both.
  • First you configure a Hive Virtual Warehouse to return Dubai time when you enter a time-related query, such as SELECT CURRENT_TIMESTAMP.
  • Next, you configure an Impala Virtual Warehouse to return Budapest time when you enter a query such as SELECT NOW().
  1. Log in to the Data Warehouse service as DWAdmin.
  2. Go to the Virtual Warehouses tab and click > Edit against your Virtual Warehouse.
    The Virtual Warehouse Details page is displayed.
    1. (Hive) Go to Configurations > HiveServer2.
    2. Select hive-site from the Configuration files drop-down list, and search for hive.local.time.zone.
    3. If the hive.local.time.zone key does not appear, click Add Custom Configuration to add it.
    4. In Configuration Value, enter your local time zone.
      Refer to Timezonedb to find the name of your time zone. For example, in Configuration Value, specify Asia/Dubai.
    1. (Impala) Go to Configurations > Impala Coordinator.
    2. Select flagfile from the Configuration files drop-down list, and to the default_query_options key, add your local time zone.
      For example, in VALUE, add timezone="Europe/Budapest",.
  3. Click Apply Changes.