• What is dbt_artifacts?

    dbt_artifacts is a package for modeling a dbt project and its run metadata. It includes the following models to help you understand the current state of a dbt project and its performance over time. It...

  • Data migration from the Salesforce to snowflake Data warehouse by using Matillion

    Purpose of the Article: This blog explains how to load the data from Salesforce to Snowflake Intended Audience: This article will help our Organizational level kind of developers working on data migra...

  • WiMAX-A Study of Mobility

    1. Introduction The wireless market is growing rapidly; being pushed through wireless connectivity demand various wireless connectivity means are emerging (WLAN/802.11, WMAN/802.16a, WWAN/802.16d) [IE...

  • Weblogic Upgrade

    Patch Name wls1036_upgrade_generic.jar Reference https://www.youtube.com/watch?v=Be6hrYTANQE Just Click Next and Next MAKE SURE ALL OBIEE SERVICES ARE DOWN AND CLOSED IN PROCESS Open CMD prompt C:Mid...

Tags

bics installation OBIEE obiee 11g installation guide Oracle

Categories

Evaluate() Function in OBIEE

a

Evaluate() Function in OBIEE

Evaluate() Function in OBIEE to Embedded DB Functions

This Evaluate functions (since version 10.1.3.3) enables users and administrators to create more powerful reports by directly calling Database functions in OBIEE from:

  1. Either By Oracle BI Answers.
  2. OR by using a Logical column (in the Logical Table source) within the Metadata (repository).

The following new BI Server database functions are supported

Functions For

1. EVALUATE( ) –> It is a scalar function that are computed post-aggregation and analytic calculations

2. EVALUATE_AGGR ( ) –> It is a aggregate function with group by clause

EVALUATE( ) Function :

Syntax:
EVALUATE(‘db_function(%1…%N)’ [AS datatype] [, column1, columnN])

Example:

1. Evaluate(‘TO_DATE(%1,%2)’ AS CHAR ,’20130326′,’YYYYMMDD’)

2. Evaluate(‘substr(%1,%2,%3)’ as Char,’AllamNarasingaRao’,’1′,’5′)

Passes the specified database function with (optional) referenced columns as parameters to the back-end data source for evaluation. This function is intended for scalar and analytic calculations, and is useful when you want to use a specialized database function that is not supported by the Oracle BI Server, but that is understood by the underlying datasource.

The embedded database function may require one or more columns. These columns are referenced by %1 … %N within the function. The actual columns must be listed after the function.

EVALUATE_AGGR( ) Function:
Syntax:

EVALUATE_AGGR(‘db_agg_function(%1…%N)’ [AS datatype] [, column1, columnN])
Example:

EVALUATE_AGGR(‘sum(%1)’, “sales”.”quantity”)
Passes the specified database function with (optional) referenced columns as parameters to the back-end data source for evaluation. This function is intended for aggregate functions with a GROUP BY clause.
The embedded database function may require one or more columns. These columns are referenced by %1 … %N within the function. The actual columns must be listed after the function.Let see How can use the Evaluate Function properly.
Need Click on the Edit column Formula>f(…) to select the Evaluate( ) Function.
In Insert Option Dialog prompt need to select the DB Functions to specify the Evaluate Function.

After select the Evaluate Function in the Prompt dialogbox, the syntax of the Evaluate function will see like the above in screen shot.

There we need to replace the inner things with our valid syntax formate. As specified Below

Here

Evaluate(‘substr(%1,%2,%3)’ AS Char,‘AllamNarasingaRao’,’1′,’5′)

  • Evauate ( ) is the function we know about it.
  • Substr ( ) is the DB Function. It needs to enclosed in the single quotes, like this ‘substr( )’
  • AS Char is the Datatype, We need to specify this also after enclosed your DB function. Then after we need to place the , .
  • ‘AllamNarasingaRao’,’1′,’5′

In our example the above 3 strings are the perameters, those we need to pass into the Evaluate Function by specifying the %1 for first string (‘AllamNarasingaRao’), %2 for Second String (‘1’) and %3 is for Third String (‘5’).

Lets run this by clicking on the Results Tab. And See what will happen.

In this case we will get one common error in Evaluate Function that is

[nQSError: 42015] Cannot function ship the following expression:Evaluate( substr(%1,%2,%3),’AllamNarasingaRao’, ‘1’, ‘5’) . (HY000)


This Error is came beacouse of taking the only one column that too it has Evaluate function. In this case we can resolve this error by taking at least one more column from exisiting subject area.

Like the following above steps we can resolve that type of errors comming while using the Evaluate function.   Note: We need to add at least one more column to the exsisting Evaluate function column.

  • Here I am specifying some examples with Evaluate function used in the OBIEE 11g.

1. Evaluate(‘TO_CHAR(%1 ,%2)’ AS CHAR ,”Itemwarehouse”.”Last Update Date”,’DD-MON-YYYY’) 

2. Evaluate(‘NEXT_DAY(%1,%2)’ ,”Itemwarehouse”.”Last Update Date”,’SUNDAY’) 

3. Evaluate(‘TO_DATE(%1,%2)’ AS CHAR ,’20130326′,’YYYYMMDD’) 

4. Evaluate(‘TO_CHAR(TO_DATE(%1,%2),%3)’AS CHAR ,’20130326′,’YYYYMMDD’,’DD-MON-YYYY’) 

5. Evaluate(‘TO_CHAR(TO_DATE(%1,%2),%3)’AS CHAR ,”Itemwarehouse”.”Last Update Date”,’DD/MM/YY HH:MI:SS AM’,’DD-MON-YYYY HH:MI:SS AM’)

Warning: Array to string conversion in /volume1/web/wordpress/wp-includes/link-template.php on line 2361 Call Stack: 0.2481 6235472 1. {main}() /volume1/web/wordpress/index.php:0 0.2482 6235784 2. require('/volume1/web/wordpress/wp-blog-header.php') /volume1/web/wordpress/index.php:17 11.4752 22546808 3. require_once('/volume1/web/wordpress/wp-includes/template-loader.php') /volume1/web/wordpress/wp-blog-header.php:19 11.4880 22675256 4. include('/volume1/web/wordpress/wp-content/themes/ayro/single.php') /volume1/web/wordpress/wp-includes/template-loader.php:106 12.0518 24648864 5. ayro_qodef_get_blog_single() /volume1/web/wordpress/wp-content/themes/ayro/single.php:9 12.0521 24649240 6. ayro_qodef_get_module_template_part($template = 'templates/single/holder', $module = 'blog', $slug = '', $params = ['sidebar' => 'default']) /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/blog-functions.php:459 12.0521 24649368 7. ayro_qodef_get_template_part($template = 'framework/modules/blog/templates/single/holder', $slug = '', $params = ['sidebar' => 'default']) /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:907 12.0715 24650400 8. include('/volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/holder.php') /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:888 12.0715 24650400 9. ayro_qodef_get_single_html() /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/holder.php:3 12.2165 24876184 10. ayro_qodef_get_module_template_part($template = 'templates/single/parts/single-navigation', $module = 'blog', $slug = ???, $params = ???) /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/blog-functions.php:523 12.2165 24876328 11. ayro_qodef_get_template_part($template = 'framework/modules/blog/templates/single/parts/single-navigation', $slug = '', $params = []) /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:907 12.2175 24877824 12. include('/volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/parts/single-navigation.php') /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:888 12.2310 24923952 13. previous_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $taxonomy = 'category') /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/parts/single-navigation.php:27 12.2310 24923952 14. get_previous_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $taxonomy = 'category') /volume1/web/wordpress/wp-includes/link-template.php:2278 12.2310 24923952 15. get_adjacent_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $previous = TRUE, $taxonomy = 'category') /volume1/web/wordpress/wp-includes/link-template.php:2259
Warning: Array to string conversion in /volume1/web/wordpress/wp-includes/link-template.php on line 2361 Call Stack: 0.2481 6235472 1. {main}() /volume1/web/wordpress/index.php:0 0.2482 6235784 2. require('/volume1/web/wordpress/wp-blog-header.php') /volume1/web/wordpress/index.php:17 11.4752 22546808 3. require_once('/volume1/web/wordpress/wp-includes/template-loader.php') /volume1/web/wordpress/wp-blog-header.php:19 11.4880 22675256 4. include('/volume1/web/wordpress/wp-content/themes/ayro/single.php') /volume1/web/wordpress/wp-includes/template-loader.php:106 12.0518 24648864 5. ayro_qodef_get_blog_single() /volume1/web/wordpress/wp-content/themes/ayro/single.php:9 12.0521 24649240 6. ayro_qodef_get_module_template_part($template = 'templates/single/holder', $module = 'blog', $slug = '', $params = ['sidebar' => 'default']) /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/blog-functions.php:459 12.0521 24649368 7. ayro_qodef_get_template_part($template = 'framework/modules/blog/templates/single/holder', $slug = '', $params = ['sidebar' => 'default']) /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:907 12.0715 24650400 8. include('/volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/holder.php') /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:888 12.0715 24650400 9. ayro_qodef_get_single_html() /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/holder.php:3 12.2165 24876184 10. ayro_qodef_get_module_template_part($template = 'templates/single/parts/single-navigation', $module = 'blog', $slug = ???, $params = ???) /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/blog-functions.php:523 12.2165 24876328 11. ayro_qodef_get_template_part($template = 'framework/modules/blog/templates/single/parts/single-navigation', $slug = '', $params = []) /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:907 12.2175 24877824 12. include('/volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/parts/single-navigation.php') /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:888 12.2381 24929968 13. next_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $taxonomy = 'category') /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/parts/single-navigation.php:82 12.2381 24929968 14. get_next_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $taxonomy = 'category') /volume1/web/wordpress/wp-includes/link-template.php:2315 12.2381 24929968 15. get_adjacent_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $previous = FALSE, $taxonomy = 'category') /volume1/web/wordpress/wp-includes/link-template.php:2296
No Comments
Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.