Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: How to add caption expression in schema workbench?

  1. #1

    Default How to add caption expression in schema workbench?

    Hi everyone. I'm using schema workbench to create a test cube and I saw the option to add the sql 'caption expression' in dimensions. So I tried to use a simple expression like
    Code:
    CONCAT(Customer.Name,' ',Customer.`Name 2`)
    and it works ok, however if try to write a simple select statement like
    Code:
    SELECT Name from Customer WHERE No='1'
    it doesn't, I get an error "Error Occurred While getting Resultset" in pentaho user console. Any suggestions what I am doing wrong here. Thanks in advance.

  2. #2

    Default

    I solved it. In the SWB I tried to do a new mdx query to test the generated shema. When running it, I noticed I get "You have an error in your SQL syntax..." and the solution is always easy if you know it ... I took a look at the complex sql statement which was meant to be executed and noted that I need to put my
    Code:
    SELECT Name from Customer WHERE No='1'
    into braces since it is actually a subquery. So making
    Code:
    (SELECT Name from Customer WHERE No='1')
    solved the problem. I guess putting "caption expresssions" into braces would alway be a safe approach regardless of the coplexity of the statement. I hope this helps someone else. Thanks again.
    Last edited by arcull; 01-16-2013 at 03:03 AM.

  3. #3

    Default

    Thanks a ton, you saved my

  4. #4
    Join Date
    Sep 2017
    Posts
    1

    Default

    Hi! is possible add a parameter in that query? and how can i do it?
    thank everybody!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.