PROBLEM DESCRIPTION


Pipeline Targets export to BigQuery fails during the external table creation in Hive, with the below error in the export log.


[DEBUG] 2018-12-18 14:35:01,506 [pool-3-thread-1] infoworks.tools.hive.HiveUtils:486 :: Running SQL: CREATE EXTERNAL TABLE `SAMPLE_CUSTOMER_DETAILS`.`sample_info_5c1816e98a078d6b3f0af45b_bq` (`sample_society_numbers` decimal(10,0),`sample_client_nbr_val` decimal(12,0),`sample_status_codes` string,`sample_value_denomination` string,`sample_ac_number` string,`ziw_source_start_date_utc` timestamp,`ziw_target_start_date_utc` timestamp,`ziw_row_id_sa` string,`ziw_scn` decimal(38,18),`ziw_source_start_date` timestamp,`ziw_source_start_timestamp` timestamp,`ziw_status_flag_sa` string,`ziw_source_end_date_utc` timestamp,`ziw_target_end_date_utc` timestamp,`ziw_source_start_timestamp_utc` timestamp,`ziw_target_start_timestamp_utc` timestamp,`ziw_source_end_timestamp_utc` timestamp,`ziw_target_end_timestamp_utc` timestamp PARTITIONED BY (`ziw_sample_partiton_column` string) ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe' LOCATION 'gs://sample_gcp_cloud_path/infoworks/sample_load/sample_value/'
[ERROR] 2018-12-18 14:35:02,315 [pool-3-thread-1] infoworks.tools.hive.HiveUtils:491 :: Error while executing hive queryjava.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.io.IOException: Error accessing: bucket: sample_gcp_cloud_path/infoworks/sample_load/, object: sample_load/sample_value)


CAUSE


This issue occurs if the Service Account Type is configured to use Custom Service Account in the export configurations and if the Hive Server is not restarted after providing the below HDFS configuration.


google.cloud.auth.service.account.json.keyfile=/path/to/hadoop/conf/gcs-svc-key.json


The above HDFS configuration is required for Apache Hadoop to access data on GCS. 


SOLUTION/ WORKAROUND


Restart the Hive Server once the above HDFS configuration is set through Ambari and then run the export job again.


IWX version: 2.6.1