2016-01-20 83 views
0

我正在做一些POC使用presto加入來加入Oracle和MongoDB數據。Presto - Oracle和Mongodb加入查詢

只需按照以下文檔進行安裝和運行即可。

https://prestodb.io/docs/current/installation/deployment.html

是不是最新版本?我在某些論壇上看到了其他版本。

例如,在看到一個不同的版本,

http://future-arena.blogspot.com/2013/11/presto-single-node-installation.html

不知道這是正確的。

對於oracle連接器,請遵循以下鏈接。

https://github.com/marcelopaesrech/presto-oracle

看起來有一些問題。的問題。

當我運行查詢時,它掛在下面一行作爲getSchemas()返回150k記錄。

try (Connection connection = driver.connect(connectionUrl, 
       connectionProperties); 
       ResultSet resultSet = connection.getMetaData().getSchemas()) { 
      ImmutableSet.Builder<String> schemaNames = ImmutableSet.builder(); 
      while (resultSet.next()) { 
       String schemaName = resultSet.getString(1).toLowerCase(); 
       log.info("Listing schemas: " + schemaName); 
       schemaNames.add(schemaName); 
      } 
      return schemaNames.build(); 
     } catch (SQLException e) { 
      throw Throwables.propagate(e); 
} 

不確定,如果我做錯了什麼。

甚至,硬編碼到一個架構會引起一些其他錯誤一樣,重複列..

這是正確的急Oracle驅動程序。

此外,試圖從以下鏈接獲得presto mongo驅動程序,並建立失敗。

https://github.com/miniway/presto/tree/mongodb

幫助,將不勝感激。

謝謝

回答

0

presto-oracle插件是正確的。我一直在使用它一個星期。

不幸的是,獲得MongoDB的連接器,你就必須與git克隆PrestoDB的這個分支: https://github.com/miniway/presto

git clone https://github.com/miniway/presto.git 
git fetch origin 
git checkout mongodb 
mvn clean install -Dskip-tests 

然後在目標複製急,MongoDB的-0.136-快照文件夾在急您的插件文件夾。 (我也把它改名爲'mongodb',但不知道是否需要)

好消息是上面的分支有一個PR,所以它應該在將來合併。