How upload file to Pentaho User Console server? - pentaho

I need :
1) Let the user select a file from his local pc
2) Upload that file to the pentaho server
3) Process the file using a kettle transformation
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.

I think this requirement is valid :
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
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??
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 that showed me that a mimetype list should be exist somewhere.
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
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>
At the bottom of file:
<tns:ImportHandlerMimeTypeDefinitions xmlns:tns="http://www.pentaho.com/schema/" .....
<ImportHandler ../>
<ImportHandler ../>
<!-- PUT CSV CONFIG HERE -->
</tns:ImportHandlerMimeTypeDefinitions>
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
Read this csv file from ktr is pending...
I hope this helps

Related

I have recorded a test plan for Files Upload processs from Blazemeter, still when I try to run it for the second time, get "Bad Request-->400" error

I did as follows:
recorded a test script regarding file upload using Blazemeter.
tried to upload another file, so I replaced a new file with the previous one inside the "Jmeter --> Bin" directory.
Before running the script just changed the filename "Parameter -->vale" like the screenshot:
When I run the scripts, it shows error:
This request doesn't look like a proper one to me, my expectation is that the file should go to "Files Upload" folder of the HTTP Request sampler and Use multipart/form-data box should be checked.
I would rather recommend re-recording it using HTTP(S) Test Script Recorder, just make sure to copy the file you're uploading to JMeter's "bin" folder before executing the file upload request in browser. More information: Recording File Uploads with JMeter

Blazemeter (JMeter test) zip file upload fail

I get Non HTTP response message: /home/jmeter/my_file-to-upload.zip (No such file or directory) when uploading zip file in BlazeMeter.
But logs state that file is stored as expected INFO o.a.j.s.FileServer: Stored: /home/jmeter/my_file-to-upload.zip
I added test file along with jmx file when creating test as instructed here. Also, have gone through BlazeMeter blogs and tutorials, nothing helped.
This test works perfectly fine executed locally or in Team Service, but I need it in BlazeMeter.
Blazemeter platform automatically extracts any zip file that is being uploaded, and thats the reason your test is unable to find the required file.
As a workaround, you can upload the file in a different format, and change the upload path to match the new file format.
For example: Change the zip format to gzip, and change the upload path in your script to be /home/jmeter/my_file-to-upload.gz instead of /home/jmeter/my_file-to-upload.zip.
If there are other questions we can help with, feel free to contact us at support#blazemeter.com
Blazemeter Support Team

Essbase dataload error

I'm on a Windows 10 box using Oracle Essbase Admin Services console 11.1.2.4. When I load data I get an error. My problem is that the dataload.err file will not write to my c:\ drive or any network drive to which I have access. If I manually create the dataload.err file in Windows Explorer and run the load data process, I can watch the dataload.err file disappear. I've tried a different file name and different directories, but it won't save.
Why won't the dataload.err file save? Any help would be greatly appreciated.

Import Text data to Greenplum database

I have a text file with some data and wants to import data to Greenplum database.After online research , I found that its better to use COPY command if your data size is small. So i decided to use this.
Here is the scenario:
I have placed my Text file at location /bin/bash /data , I can access this file using terminal, but once I run the following COPY sql script at Greenplum database it's says :
could not open file "/bin/bash /data/data.txt" for reading: No such file or directory
Below is the my sql script:
COPY userdata(customerid,time,trans,quantity) from '/bin/bash /data/data.txt' WITH DELIMITER ',';
From Greenplum database documentation I found the following line :
The COPY source file must be accessible to the master host. Specify the COPY source file name relative to the master host location.
But I do not know how to make it accessible to master host and relative to master host location.
The path to your file doesn't make any sense.
/bin/bash /data/data.txt is certainly not a valid name for a path.
If you data.txt file is located in the /data folder with content
in the following format :
12345,5:32AM,air,2
67890,6:42PM,rail,4
You could use the below command :
COPY userdata(customerid,time,trans,quantity) FROM '/data/data.txt' WITH DELIMITER AS ',';
Also sql user you should have the permission to access the the data.txt from the location /data folder.
Perhaps do a ls -l and check if the sql user can read files from data.txt

any method to export dashboards on pentaho and reused on another pentaho BI server?

I have made some dashboards on pentaho BI server. I want to export them and import on another pentaho BI server. Is there any method to realize this? we have the same datasource.
In Pentaho 5 version, you can use User Console to Download the Dashboard files. It will get download in zip format. Once it is done, take these codes to the New BI Server, use the user console and UPLOAD it.
For e.g : If you have a project folder named "PROJECT_XYZ" then open the user console, select the project folder >> on the right hand screen you will find "DOWNLOAD" option. Just click on it and the project folder will get downloaded in .zip format. Take this .zip file and UPLOAD it in the new Server using the user console (of the new server).
Hope it helps :)
For Exporting:
import-export.bat --export --url=http://localhost:8080/pentaho --username=admin --password=admin --charset=UTF-8 --path=/public --file-path=E:/pentaho/shaz.zip --overwrite=true --permission=true -retainOwnership=true
For Importing:
import-export.bat --import --url=http://localhost:8080/pentaho --username=admin --password=admin --charset=UTF-8 --path=/public --file-path=E:/pentaho/anyfile.zip --overwrite=true --permission=true -retainOwnership=true