要解決的問題

image.png

image.png
解決方法:
1、首先你的hive肯定要能用,我們就是將spark的元數(shù)據(jù)查詢請求轉(zhuǎn)換為hive的元數(shù)據(jù)請求
2、操作步驟:
cd hue/build/static/desktop/js
vi apiHelper.js
ApiHelper.prototype.fetchSourceMetadata = function (options) {
var self = this;
var deferred = $.Deferred();
var isQuery = options.sourceType.indexOf('-query') !== -1;
var sourceType = isQuery ? options.sourceType.replace('-query', '') : options.sourceType;
//增加下面的條件判斷
if(sourceType=='sparksql'){
sourceType='hive';
}
3、不需要重啟hue,頁面清一下緩存即可

image.png