如何将文件上传到Pentaho用户控制台服务器? [英] How upload file to Pentaho User Console server?

查看:338
本文介绍了如何将文件上传到Pentaho用户控制台服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要:

  • 1)让用户从本地PC中选择文件
  • 2)将文件上传到pentaho服务器
  • 3)使用水壶转换处理文件

我尝试使用Pentaho用户控制台(PUC)5.0中的csv数据源,但找不到从上传到PUC信息库的.ktr文件访问它的方法.我也尝试将csv文件上传到文件夹,但仍然无法从.ktr文件访问它.

I tried with a csv data source in Pentaho User Console (PUC) 5.0 but found no way to access it from a .ktr file uploaded to PUC repository. I also try to upload the csv file to a folder and still not able to access it from a .ktr file.

推荐答案

我认为此要求有效:

将csv数据文件和.ktr文件上传到PUC文件夹.从PUC执行后,.ktr文件应该能够读取上载的csv文件

Upload a csv data file and .ktr file to PUC folder. The .ktr should be able to read the uploaded csv file when it is executed from PUC

想象一个简单的用户,使用csv.他将能够使用wincsp,filezilla或其他ftp工具将csv文件上传到linux主机吗?

Imagine a simple user, with a csv. Will he be able to upload csv file to linux host using wincsp, filezilla or another ftp tool??

我们需要为用户提供简单的上传功能,因此,经过数小时的研究(pentaho源代码),没有一行Pentaho文档,我找到了该测试:

We need to give an easy upload functionality to our user, so after several researching hours (pentaho source code) without one line of Pentaho documentation, I found this test:

https://github.com/pentaho/pentaho-platform/blob/master/extensions/src/test/java/org/pentaho/platform/plugin/services/importer/PlatformImporterTest.java 表明我应该在某个地方存在一个模仿类型列表.

https://github.com/pentaho/pentaho-platform/blob/master/extensions/src/test/java/org/pentaho/platform/plugin/services/importer/PlatformImporterTest.java that showed me that a mimetype list should be exist somewhere.

因此,在使用 grep 命令在所有pentaho文件夹中搜索了一些单词之后,我找到了该文件:

So after search some words in all pentaho folder wiht grep command, I found this file:

/my_apps/pentaho-server-ce-7.1.0.0-12/pentaho-server/pentaho-solutions/system/ImportHandlerMimeTypeDefinitions.xml

凭直觉,我添加了这个xml

With some intuition, I added this xml

<ImportHandler class="org.pentaho.platform.plugin.services.importer.RepositoryFileImportFileHandler">
  <MimeTypeDefinitions>
    <MimeTypeDefinition mimeType="text/plain" >
      <extension>csv</extension>
    </MimeTypeDefinition>
  </MimeTypeDefinitions>
</ImportHandler>

在文件底部:

<tns:ImportHandlerMimeTypeDefinitions xmlns:tns="http://www.pentaho.com/schema/" .....
   <ImportHandler ../>
   <ImportHandler ../>
   <!-- PUT CSV CONFIG HERE -->    
</tns:ImportHandlerMimeTypeDefinitions>

最后,我重新启动了 pentaho-server-ce-7.1.0.0-12 服务器,并可以通过以下步骤上传csv文件:

Finally, I restarted my pentaho-server-ce-7.1.0.0-12 server and I was able to upload my csv file with this steps :

  • go to http://localhost:8080/pentaho
  • click en browse files
  • select some folder
  • click in upload (right side)
  • select csv and ok

正在从ktr读取此csv文件正在等待...

Read this csv file from ktr is pending...

我希望这对您有帮助

这篇关于如何将文件上传到Pentaho用户控制台服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆