时间:2021-07-01 10:21:17 帮助过:22人阅读
*HOST 地址是impala Daemon所在的机器ip,端口可以在cm中设置
vi /usr/local/Cellar/unixodbc/2.3.2_1/etc/odbc.ini
[ODBC Data Sources]Sample_Cloudera_Impala_DSN_64=Cloudera Impala ODBC Driver 64-bit[Sample_Cloudera_Impala_DSN_64]Driver=/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylibHOST=192.168.2.103PORT=21050
vi /usr/local/Cellar/unixodbc/2.3.2_1/etc/odbcinst.ini
[ODBCDrivers]
ClouderaImpalaODBCDriver64-bit=Installed[ClouderaImpalaODBCDriver64-bit]
Description=ClouderaImpalaODBCDriver (64-bit)
Driver=/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib
测试:
isql -v Sample_Cloudera_Impala_DSN_64
PHP连接:
$connection=odbc_connect('Sample_Cloudera_Impala_DSN_64','','');
$SQL_Exec_String="show tables";
$result=odbc_exec($connection, $SQL_Exec_String);
while(odbc_fetch_row($result))
{
$Tables=odbc_result($result, 1);
echo$Tables.'
';
}
?>
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i <= lines; i++) {
$numbering.append($('').text(i));
};
$numbering.fadeIn(1700);
});
});
以上就介绍了mac配置impala odbc,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。