New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

saiku adhoc db2 error Parent exception: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null #175

Open
avillagra opened this Issue Dec 19, 2012 · 5 comments

Comments

Projects
None yet
2 participants
@avillagra

avillagra commented Dec 19, 2012

Hi,

to create a report select the clumns and Saiku adhoc returns data correctly.

The problem is when I apply a filter on a char column. In this case the column is char (30) and select 2 or 3 values from filter list ​​and clic en "Save" button, then saiku adhoc return:

ReportGenerator.ERROR_0001 - The CDA Datafactory Could not process the query

In the pentaho.log in "biserver-ce\tomcat\logs" say:
db2 error Parent exception: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null

Using db2 9.7 in windows 7.

any ideas where to look and try to fix the problem?

Thank,
Aldo

@avillagra

This comment has been minimized.

avillagra commented Dec 20, 2012

Hi,

There is an error in the SQL statement that is generated when you apply a filter by selecting values ​​from the list of values.

This is the SQL statement sent to DB2 Saiku adhoc:

SELECT DISTINCT BT_MGC002_MGC002.GRPDSC AS COL0
FROM BHVSGI.MGC002 BT_MGC002_MGC002
WHERE ( ( BT_MGC002_MGC002.GRPDSC IN ( ?, ?, ?, ? ) OR '' IN ( ?, ?, ?, ? ) ) )

There is an error in the WHERE, the next thing is wrong => OR '' IN ( ?, ?, ?, ? )

@Mgiepz

This comment has been minimized.

Owner

Mgiepz commented Dec 21, 2012

I am not a DB2 expert but I heard of numerious problems like that. The
SQL is generated by the Pentaho Metadata Module.
You should check if the same query runs from the metadata editor

Am 20.12.2012 05:06, schrieb avillagra:

Hi,

There is an error in the SQL statement that is generated when you
apply a filter by selecting values ​​from the list of values.

This is the SQL statement sent to DB2 Saiku adhoc:

SELECT DISTINCT BT_MGC002_MGC002.GRPDSC AS COL0
FROM BHVSGI.MGC002 BT_MGC002_MGC002
WHERE ( ( BT_MGC002_MGC002.GRPDSC IN ( ?, ?, ?, ? ) OR '' IN ( ?, ?,
?, ? ) ) )

There is an error in the WHERE, the next thing is wrong => OR '' IN (
?, ?, ?, ? )


Reply to this email directly or view it on GitHub
#175 (comment).

@avillagra

This comment has been minimized.

avillagra commented Dec 21, 2012

Hi,

This SQL statement that is wrong, is incorrect.

Saiku adhoc not generate the SQL statement? pentaho does?

I can view a log of what generates Saiku adhoc?

This error only happens when you apply a filter on a char.

thaks.

@avillagra

This comment has been minimized.

avillagra commented Dec 21, 2012

from pentaho using adhoc Saiku when the report is generated catalog file called prueba.adhoc.

Looking at the file in the "parameters" specifies the filters you've selected and look right:

  "parameters": [
   {
    "name": "SCNDSC"
    "id": "BC_MGC001_SCNDSC"
    "type": "String",
    "parameterValues​​": [
     "ALARM"
     "Office Supplies"
     "AUDIO"
    ]
    "category": "BC_MGC001"
    "uid": "uid-2"
   }

Is it possible to see who sends you to pentaho Saiku adhoc?
Does what sends that file is exactly pentaho prueba.adhoc?

thanks

@Mgiepz

This comment has been minimized.

Owner

Mgiepz commented Dec 21, 2012

there must be a temporary cda file in pentaho-solutions\system\tmp\ .
you can search for the corresponding file and
look at the mql statement in the query. you could then examine that
query in pentaho-metadata-editor.

Am 21.12.2012 14:45, schrieb avillagra:

from pentaho using adhoc Saiku when the report is generated catalog
file called prueba.adhoc.

Looking at the file in the "parameters" specifies the filters you've
selected and look right:

"parameters": [
{
"name": "SCNDSC"
"id": "BC_MGC001_SCNDSC"
"type": "String",
"parameterValues​​": [
"ALARM"
"Office Supplies"
"AUDIO"
]
"category": "BC_MGC001"
"uid": "uid-2"
}

Is it possible to see who sends you to pentaho Saiku adhoc?
Does what sends that file is exactly pentaho prueba.adhoc?

thanks


Reply to this email directly or view it on GitHub
#175 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment