Impala SQL:计算获取的行数

时间:2015-12-09 15:33:10

标签: impala

function setSourceUrl(url, query) { var source = $('#inputSource').val(); var newurl = url + '?searchStr=' + query + '&type=' + source; return newurl; }; var remoteOpts = setBHRemoteOpts(false, '%QUERY', '/recipe/recipe/getSources', null); var remoteOpts['replace'] = function(url, query) {return setSourceUrl(url, query);}; var bhOpts = setBHOptions(50, null, null, null, remoteOpts); var sourceBH = new Bloodhound(bhOpts); function initSourceTA() { var options = initTypeaheadOptions(true,true,1); var dataset = initTypeaheadDataset('source', null, 20, sourceBH); $('.srcTA').typeahead(options,dataset); };

这将返回匹配表或空结果。 (取1或0行)

如何发出SHOW TABLE LIKE 'my_table'; 查询以获取" 0"或" 1" ?

1 个答案:

答案 0 :(得分:0)

您今天无法使用SQL查询执行此操作。您需要支持以表格形式查询Impala架构元数据,请参阅IMPALA-1761