Quantcast
Channel: Pentaho Community Forums
Viewing all 16689 articles
Browse latest View live

Kettle - Query on date field in MongoDB input query tab

$
0
0
I have found multiple posts with this issue but found no real solution. So asking the question again

so i am getting a date output field from a input table - LMD.

i am converting the Date to string format using modified JS

var dt = date2str(LMD, "yyyy'-'MM'-'dd HH':'mm':'ss'Z'");.

and then using this variable in the query parameter of MongoDB input step

{ LMD : { $gte : { $date : "$dt" } } }

does not work. But it works if i hardcode the value.

{ LMD : { $gte : { $date : "2014-12-31T00:00:00.000Z" } } }
Am i missing something here?

Overcoming the sub query limitation to support filtering

$
0
0
We are using Mondrian 3.11.0 in our project and we know that sub queries are currently not supported by the Mondrian.
http://jira.pentaho.com/browse/MONDRIAN-980
Since we are using Teleric Pivot grip to visualize the cube and it creates sub query based MDX queries for filtering, we have taken the approach of intercepting the query and change it as below.

Here are few examples of what we are doing. As you can see with complex queries this modification may have potential side effects.
Sharing this to help someone out there having the same issue, and also to get the opinion from the Mondrian experts on the forum on our approach.

-- Original MDX


SELECT NON EMPTY {[Product].[Category].[All Products],[Product].[Category].[All Products].Children} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS
FROM (SELECT ({[Product].[Category].&[4],[Product].[Category].&[1]}) ON 0 FROM [Adventure Works])
WHERE ([Measures].[Reseller Freight Cost])


-- Modified MDX


SELECT NON EMPTY
VisualTotals
({[Product].[Category].[All Products]
,[Product].[Category].&[4],[Product].[Category].&[1]}
, '*'
) DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS
FROM [Adventure Works]
WHERE ([Measures].[Reseller Freight Cost])


-- Original MDX


SELECT NON EMPTY {CROSSJOIN({[Product].[Category].[All Products]},{[Geography].[City].[All Geographies]}),
CROSSJOIN({[Product].[Category].[All Products].Children},{[Geography].[City].[All Geographies]}),
CROSSJOIN({[Product].[Category].[All Products]},{[Geography].[City].[All Geographies].Children})}
DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS FROM (SELECT ({[Product].[Category].&[4],[Product].[Category].&[1]}) ON 0
FROM ( SELECT ({[Geography].[City].&[Abingdon]&[ENG],[Geography].[City].&[Albany]&[OR],[Geography].[City].&[Alexandria]&[NSW],[Geography].[City].&[Alhambra]&[CA],[Geography].[City].&[Alpine]&[CA]}) ON 0
FROM [Adventure Works] ))
WHERE ([Measures].[Reseller Freight Cost])


-- Modified MDX


SELECT NON EMPTY {


CROSSJOIN( VisualTotals
({[Product].[Category].[All Products]
,[Product].[Category].&[4],[Product].[Category].&[1]}
, '*' ), VisualTotals
({[Geography].[City].[All Geographies]
,[Geography].[City].&[Abingdon]&[ENG],[Geography].[City].&[Albany]&[OR],[Geography].[City].&[Alexandria]&[NSW],[Geography].[City].&[Alhambra]&[CA],[Geography].[City].&[Alpine]&[CA]}
, '*' ))


,
CROSSJOIN({[Product].[Category].&[4],[Product].[Category].&[1]},{[Geography].[City].[All Geographies]}),
CROSSJOIN({[Product].[Category].[All Products]}, {[Geography].[City].&[Abingdon]&[ENG],[Geography].[City].&[Albany]&[OR],[Geography].[City].&[Alexandria]&[NSW],[Geography].[City].&[Alhambra]&[CA],[Geography].[City].&[Alpine]&[CA]})

} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS
FROM [Adventure Works]
WHERE ([Measures].[Reseller Freight Cost])

Thanks in advance.

Reading row data together with Aggregation tables

$
0
0
Hi,
We are using Mondrian 3.11.0 in our project with the aggregation tables.


My question is, can we hit the both aggregation table and the raw fact data table for a MDX query, when partially aggregated data available in the aggregation table.




agg_Month


month_name sum_value fact_count
Jan 100 2
Feb. 50 1
March 10 1


fact_data


month value
Jan 50
Jan 50
Feb. 50
March 10
April 20


you can see that April is not in the aggregation table, if the MDX asked for all the months or specific set of months (Jan, Feb., April), would the Mondrian hit both the aggregation table and fact table to retrieve correct result ?


Thanks in advance.

Set variable from Parameter

$
0
0
Hello All,

I am trying to initialize a variable at the start of a job using the parameter passed from Command Line. However, using the Set Variable step, I am unable to do it. Please suggest be a way to achieve this.

Looking for Solution, I found a link (http://wiki.pentaho.com/display/EAI/...rameter+values) that will substitute variable references, however, I want to exercise control and hence, looking for an alternate solution.


Regards,
Purvesh.

How to Export Users and Roles?

$
0
0
Hallo,

How can Users and Roles be exported/ imported?

Thanks,

HTTP Client - Change browser signature/user agent?

$
0
0
Hi everyone,

I am trying to read data from a website using the HTTP Client, but it's using Cloufdflare and the request gets rejected due to the Browser signature.
Code:

Access denied | xxx used CloudFlare to restrict access
The owner of this website (xxx) has banned your access based on your browser's signature (24d604136d2c266c-ua19)

I think I should be able to use the "Custom HTTP Header" setting on the HTTP Client step to set a different user agent, am I right? Something like ('User-agent','Mozilla/5.0')
Alas, I don't know the exact syntax to use and the Documentation is not very helpful either...:(
Couldn't get it to work.

Attached is an example ktr. Does anyone have an idea?

Many thanks.

How to customize Pentaho BI-Server ce 6.0.0 using eclipse

$
0
0
Hi All,

I want to customize BI-Server code using eclipse
So is it possible or not?
if possible Can any one guide me for customizing Pentaho BI-Server CE 6.0.0


Thanks in Advance
Anand

Upgrade from PDI 5.0.1 To PDI 6?

$
0
0
Hi all.

Does anyone have a link to an upgrade plan to get us from 5.0.1 to 6? I've had a search and cannot find anything - because 6 is so new???

Cheers
Dave

Saiku Reporting on Kickstarter - One week more to contribute

$
0
0


Sometimes we hear opensource and imagine some magical realm where things just happen out of the blue. Guess what - it doesn't work like that. It really requires time, dedication and consequently money. Some projects are lucky enough to get sponsored by some organizations, others have to find a way to survive on their own.

A good example of the latter is the Saiku project. Undoubtably one of the most widely recognized projects on the Pentaho ecosystem, the Saiku team just recently created a Kickstarter project to fund the porting of one of the highly desired projects to the lastest reincarnations of Pentaho - the Saiku Reporting project, a frontend to the Pentaho metadata layer

Now it's time to make it happen. There's still a week to go and, as I write this, 9K£ left for a successful project.

I've done my pledge, as I strongly believe that Saiku plays a fundamental role in the Pentaho ecosystem. I'm sure you'll agree with me and try to get your company to help as well.

Here's the kickstarter project page

-pedro

More...

how to give phone number format in mapping?

$
0
0
hello every one.... i am new to mappings..

here...i have two database..in first database..i have a table "Ex1".. here i am saving my phone number like normal way...i.e(023456789)..here i am creating a mapping that transfer data from database 1 to 2..in my second database i want to store the phone number with country code also i.e(+1 0234567890)..so how can i create a mapping for above problem..


thanks in advance..

--ranjith

Connect to MSSQL from Linux

$
0
0
I am a newbie to Pentaho.
Would you please help or point me to some post that related to the issue below.

I use Pentaho to connect to sqlsserver db.
From Windows I can connect to MS Sqlserver and it works just fine however there is connection issue when I connect it from Linux (see error below).

Request: Any help to resolve the issue is appreciated.

Error Msg:
2015/10/21 15:26:23 - Check Db connections - Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver)
2015/10/21 15:26:23 - Check Db connections - The TCP/IP connection to the host entdb-sj1-rpd.cisco.com, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".

REST Client can't get HTTPS (AppAnnie API KEY)

$
0
0
Hi

I'm trying to get connected using REST Client step, but AppAnnie only accepts HTTPS with a generated API KEY. None of the Tabs seems to offer such an option.

I get result = {"code": 401, "error": "Unauthorized access"} as expected due to the lack of it.

how can I configure REST Client Step to issue HTTPS or sending my generated API KEY using REST Step?

Using following CURL on terminal shell worked ok. ("Bearer" is the Generated API key)

curl -H "Authorization: Bearer ##########" "https://api.appannie.com/v1.2/accounts/{account_id}/sales?break_down=product&start_date=yyyy-mm-dd&end_date=yyyy-mm-dd"


Thanks in advance

Get XML Data - Unknown number of Nodes

$
0
0
I have an XML file that looks like:

<part>
<name>test</name>
<number>01010</number>
<color>Blue</color>
<weight>3</weight>
<length>2</length>
</part>

I don't know how many attributes or what attributes might exist inside <part> tag. I want to grab all node names and values, like so:

name,test
number,01010
color,Blue
weight,3
length,2

How can I dynamically grab all attributes under <part>, without knowing what they are? Any suggestions for how I can get the result I need?

Task Scheduler Causing FTP to Fail

$
0
0
Hey, first time post. I can't find information about this problem anywhere, so I'm bringing it here.

I created a Job which basically just pulls files off SFTP/FTP/FTPS servers and puts files onto other ones. It does each of the Puts and Gets one at a time, most of the time it doesn't find anything and returns success, and if it fails to connect it will follow the fail path and send an email for each one that does. I created it on my desktop: Win7 with Kettle ver 6.0.0.0-353. But we want it to run off a remote Windows Server 2008 R2. I installed the 5.0.1-Stable build on the server, loaded up my Job in Spoon, ran it with no errors. I created a .BAT to run the job through Kitchen, and that worked fine when I ran the batch file.

However, this is where it stopped working great. I created a task in Windows Task Scheduler, every hour it would run the .BAT that runs the job. I've done this on a Job that did not deal with FTP and it works fine. However, whenever I run this FTP job from Task Scheduler, all the FTP steps return failed and I get all of the error emails. I have tested this on the Win 7/Kettle 6.0 desktop, and the 2008 R2/Kettle 5.0.1 remote server.

I have been through all the Task Scheduler options and I cannot figure out why this works in every from but when run as a task. Any ideas on whats wrong or how to fix it? Thanks.

Where is CDE in Pentaho 6?

$
0
0
Where can I find CDE on Pentaho 6 installed on Windows? There is no option to install from the Marketplace.

Thanks

Learning CDE Concepts...

$
0
0
I am new in Pentaho, trying to understand the concept of CDE...

For example, I would like to make a Pie Chart with a SQL like this:

Code:

select label, count(*) value
from mytable
group by label
order by count(*) desc;

Instead of reporting all labels, I would like to report Top (say) 3 and group the remaining in an "Others" label.

I went through the Docs in http://www.webdetails.pt/ctools/ccc/....PieChart.html . There seems no such option. Is this the situation? If so, should I structure the SQL so that it output the exact data (not preferable because it's different to customize the number of Top labels), or is it possible to run some code (Java or Javascript) to preprocess the data?

Also, I see many demo involve heavy usage of Javascript (e.g., http://www.webdetails.pt/ctools/ccc/ ). Where is the "hook" to input such code?

Sorry if these are too newbie question. I tried to search but can't find free recent CDE documentation / tutorial. Am I expected to pay for such?

Thanks.

Pentaho SDK, how to define a text file input

$
0
0
I'm trying to define a Pentaho Kettle (ktr) transformation via code. I would like to add to the transformation a Text File Input Step: http://wiki.pentaho.com/display/EAI/Text+File+Input.
I don't know how to do this (note that I want to achieve the result in a custom Java application, not using the standard Spoon GUI). I think I should use the TextFileInputMeta class, but when I try to define the filename the trasformation doesn't work anymore (it seems empty in Spoon).

This is the code I'm using. I think the third line has something wrong:

PluginRegistry registry = PluginRegistry.getInstance();
TextFileInputMeta fileInMeta = new TextFileInputMeta();
fileInMeta.setFileName(new String[] {myFileName});
String fileInPluginId = registry.getPluginId(StepPluginType.class, fileInMeta);
StepMeta fileInStepMeta = new StepMeta(fileInPluginId, myStepName, fileInMeta);
fileInStepMeta.setDraw(true);
fileInStepMeta.setLocation(100, 200);
transAWMMeta.addStep(fileInStepMeta);

Not Able to Insert into Table having Identity Column IN SQL SERVER

$
0
0
Hi,

I am using sqljdbc42.jar right now and table with identity column is creating problem while insertion.

Read some thing on http://forums.pentaho.com/showthread...-on-SQL-Server saying about some "sql" tab
. I've checked setting of DatabaseConnections (Left side of panel) and Table Output but nothing such have been found.

Need to know the desired jar to be used for this and if there's any other alternative please do share same.

How to Make Connection Configurable in KTR file

$
0
0
Hi,

SSIS (MSBI ETL Tool) supports configuration of connections at run time by provding config file for my package.

Is there's a way that PDI support same?:confused:


NULL Handling in Transformation

$
0
0
Hi All,

I am new to Pentaho. Please help me on below activity.

Read data from source file and insert into table with some quality check like NULL handling.

I am using Formula stage for this. But it creates a new fields for every existing field.

Like -
ACCT_NBR_1
CUST_NAME_1

Thanks.
Viewing all 16689 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>