跨mysql和mongodb查询工具_presto使用hive与mysql(mongodb,oracle)等跨库查询
首先presto是通过hive metastore来访问hive的,所以需要在hive/conf目录下配置hive-site.xml的hive.metastore.uris属性hive.metastore.uristhrift://ip:9083Thrift URI for the remote metastore. Used by metastore client to connect to r
首先presto是通过hive metastore来访问hive的,所以需要在hive/conf目录下配置hive-site.xml的
hive.metastore.uris属性
hive.metastore.uris
thrift://ip:9083
Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.
然后在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:
connection-user=username
connection-password=password
mongodb.properties文件
connector.name=mongodb
mongodb.seeds=ip:27017
配置完后启动presto服务器,通过smartbi新建关系数据源presto连接
右键presto数据源的数据库管理查看各个类型数据库表,并添加至右侧
利用smartbi原生SQL进行查询

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)