页面树结构
转至元数据结尾
转至元数据起始

首先presto是通过hive metastore来访问hive的,所以需要在hive/conf目录下配置hive-site.xml的

hive.metastore.uris属性

<property>
<name>hive.metastore.uris</name>
<value>thrift://ip:9083</value>
<description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description>
</property>

然后在presto-server\etc\catalog\smartbix里面配置hive.properties,mysql.properties等文件内容

 

hive.properties文件

connector.name=hive-hadoop2
hive.metastore.uri=thrift:/ip:9083(具体hive.metastore.uris可在hive-site.xml里面配置)

 

mysql.properties文件

connector.name=mysql
connection-url=jdbc:mysql://ip:port?useCursorFetch=true&defaultFetchSize=10000
connection-user=username
connection-password=password

 

oracle.properties文件

connector.name=oracle
connection-driver=oracle.jdbc.OracleDriver
connection-identifier-quote="
connection-url=jdbc:oracle:thin:@ip:port:<database>
connection-user=username
connection-password=password

 

mongodb.properties文件

connector.name=mongodb
mongodb.seeds=ip:27017

配置完后启动presto服务器,通过smartbi新建关系数据源presto连接

右键presto数据源的数据库管理查看各个类型数据库表,并添加至右侧

利用smartbi原生SQL进行查询

  • 无标签