Expression SQL in ODI

I have the following interface in oracle data integrator

http://i44.Tinypic.com/2mrsmxt.PNG

# Run it before you insert the following expression

------------------------------------------------

In the map, I insert the following SQL expression to get the average when the quantity is 0

----------------------------------------------------

AVG)

WHEN TEST BOX. QUN = 0 THEN

(SELECT THE TEST. QUN OF TEST

WHERE TEST1. PRUDU = TEST. PRUDU

AND TEST1. FLOW = TEST. UNIT

AND TEST1. UNIT = TEST. UNIT

AND to_char (TEST.) DATEDDD, "LUN") = to_char (TEST1. DATEDDD, "LUN")

AND TEST1. DATEDDD! = TEST. DATEDDD

TEST GROUP. QUN

)

ANOTHER TEST. QUN

END)

--------------------------------------------------------------

When I check this expression in ODI...

# sql expression is correct for this ROW

--------------------------------------------------------------

When I run the interface I get this error

Caused by: java.sql.SQLSyntaxErrorException: ORA-00937: not a function of simple-group

----------------------------------------------------------------

any idea?

I understand this...

the problem was the mapping in the field of the staging...

I changed the source... and it works!

Tags: Business Intelligence

Similar Questions

  • Is is possible to the PL/SQL call ODI scenario

    Hi all

    Can we call PL/SQL procedures in ODI, I would like to know if you can call the ODI in PL/SQL scenarios.  If so, can someone explain to me how this is possible.

    Thanks in advance

    Your plan will look like - it's the infinite loop as long as certain conditions (CHECK at the END)

    This package you must start manually.

    Then you can start scenarios insertion of records in the table (which controls OdiWaitForData)

    Each insert starts the script in OdiStartScen

    You can pass the name of the scenario by REFRESH VARIABLE (GET the SETTINGS in this example)

  • Using sql in ODI 11 G OLAP queries

    Good day, everyone!

    I have a problem. I did interface in ODI (tecnology - TERADATA) and used the OLAP inside functions. For example

    COALESCE (((tc.data - min (tc. DATA) OVER (PARTITION BY tc.session_id(("ORDER BY years.year_id LINES BETWEEN 1 EARLIER AND EARLIER 1)) / 12), tc.data)

    But ODI generates the SQL query using Group: so I got the error message

    SQLState: HY000

    ErrorCode: 3504

    Query 1 1, lines read: 132, elapsed time (in seconds) - Total: 1 844, SQL query: 1 844, exit building: 0

    Error: [database Teradata] [TeraJDBC 13.10.00.01] Selected [error 3504] [SQLState HY000] nonaggregate values must be part of the associated group.

    SQLState: HY000

    ErrorCode: 3504

    Why it does not include OLAP (ON PARTITION BY) functions? Is it possible to implement the ODI to understand

    Hi CPR1,.

    You can use a little work using the

    (((tc.data-min(tc.DATA) OVER (PARTITION BY tc.session_id ORDER BY  years.year_id   ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING  ))/12),tc.data)
    

    In the first pass, the parser will not see as an aggregate function, so it won't add the group by clause.

    Source: http://sonra.io/odi-and-analytic-functions-again/

    Kind regards

    JeromeFr

  • PostgreSQL sql in odi

    Hello
    I try to use postgresssql in ODI
    but when I try to test the connection its shows error:

    Failed connection
    Detail:

    java.lang.RuntimeException: java.lang.IllegalArgumentException: could not load driver JDBC [org.postgresql.Driver] class
    at oracle.odi.core.datasource.provider.AbstractDataSourceProvider.configure(AbstractDataSourceProvider.java:106)
    to oracle.odi.core.DataSourceManager$ LoginTimeoutDataSourceProviderProxy.configure (DataSourceManager.java:302)
    at oracle.odi.core.DataSourceManager.createAndConfigureDataSourceProvider(DataSourceManager.java:228)
    to oracle.odi.core.DataSourceManager.access$ 0 (DataSourceManager.java:202)
    to oracle.odi.core.DataSourceManager$ 1.create(DataSourceManager.java:76)
    at org.springframework.util.CachingMapDecorator.get(CachingMapDecorator.java:152)

    I know I want to download and put the jar base SQL file I download it, but where I want to keep this jar file

    What is your operating system? If it is xp go down this path

    C:\Documents and Settings\\Application Data\odi\oracledi\userlib

    Chantal
    http://dwteam.in

  • Error using variable presentation of Expression SQL

    Hi all

    I get an error - '... Error to break information... "due to a variable used in a SQL Expression. It probably has something to do with a problem of data type. I have reduced the use of the presentation of the error variable.

    I'll put a variable pres_mth_nme_to, presentation, from a prompt of dashboard. The line contains a month name.
    I use the variable of presentation as part of a SQL Expression in a filter. Most of the SQL Expression is to use the
    presentation in ONE variable and assign a value accordingly. For example:

    Column: kind of month value
    Operator: between
    Value: * 10 *.
    SQL expression: * case @{pres_mth_nme_to} {a few default} WHEN "NOV" THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN... END *.

    The name of the month is in character. If I was in this hard-coding, I don't get the error. For example:
    CASE 'SEP' WHEN 'NOV' THEN '10' WHEN 'DEC '... END

    It is something to do with the data type of the command prompt and to be used in the comparison. If I use a CAST, the problem persists.

    CASE DROPS (@{pres_mth_nme_to} as char (3)) WHEN 'NOV' THEN... END

    If I'm in the responses, the problem does not exist, I guess because of default values. If I'm on the dashboard, there is not, I guess because of the reception of the prompt value.

    I don't know what I'm missing. Any suggestions?

    Thank you.

    DJ,

    If the formula presented by you is exactly true, I mean that it was not made to present as an example in the forum, you must include the variable presentation between apostrophes.
    either your formula should look something like
    Case ' @{pres_mth_nme_to} {a few default}' WHEN 'NOV' THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN... END

    Let me know if it solved the problem...

    -bifacts
    http://www.obinotes.com

    Published by: bifacts on October 25, 2010 13:50

  • Problem with SQL Loader ODI

    Hello

    I have problems using SQL Loader with ODI. I am filling an oracle table with data from a txt file. Initially, I had used 'File to SQL' LKM, but due to the size of the file (700 MB) source, I decided to use 'file to Oracle (SQLLDR)' LKM.
    The error that appears in myFile.txt.log is: "SQL * Loader-101: invalid argument for the name of user and password.

    I think the problem might be in the definition of the database server (physical JavaBeans in topology), because I left empty Host, user and password.

    What is the problem? What host and user should I use? With "File to SQL" works fine living that white, but takes too much time.

    Thanks in advance

    Note the last * @*. He expects a connection string after him.

    So, goto Oracle server topology, specify Instance/Dblink (server) as the SID of the oracle database you want to connect.

  • Error using filter with Expression SQL

    Hey all -

    New to Oracle BI and have a problem with filters that use the SQL Expressions.

    The column I'm filtering is a 4-digit year, expressed as a VARCHAR2(4 byte) in the physical database. My SQL Expression in the filter is:

    Column: CAL 4-DIGIT YEAR
    Operator: is in
    SQL expression: TO_CHAR (ADD_MONTHS (SYSDATE,-24), "YYYY"))

    When I click on the "Results" tab, I get the following error message:
    Error codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    ODBC driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 27002] Near <>(): syntax error [nQSError: 26012]. (HY000)

    I've isolated the problem to the above expression. If I put a literal value and provide a year to four digits as below, it works:

    Column: CAL 4-DIGIT YEAR
    Operator: is in
    SQL expression: * 2008. *

    Any ideas on what is causing my problem?

    Thank you!

    Mac

    Yep, this should work, although sometimes you need an extra cast to CHAR.

    It works fine:
    SELECT "D0 time." "" Saw_0 T05 by name of the year ","recipes of F1. " "" Recipes 1-01 (all in all) ' saw_1 'Sample Sales' WHERE 'Time D0. "" T05 by name year ' = CAST (YEAR (TIMESTAMPADD (SQL_TSI_MONTH-24, CURRENT_DATE)) as CHAR) ORDER BY saw_0

    concerning

    John
    http://www.obiee101.blogspot.com/

  • Difference between the Expression SQL and PL/SQL Expression

    Hello

    I use the value of the Pnn_ACTIVE_SECTION variable type to show and hide regions.

    Based on similar logic, I also filter or put on condition of validations of fire based on same Pnn_ACTIVE_SECTION and a few other conditions as element value is null or not null.

    What is the best way to filter.

    I used [item = value] option earlier and after a few lights, now I use SQL EXPRESSION that according to me is not otherwise effective than PL/SQL EXPRESSION.

    Is this correct? Or who make no difference on the performance of application? I have at least 7 forms and about 100 postings by form (especially the function that returns the error text for the club of multiple postings on the same point in a validation)

    Based on the reviews of the forum, I'll turn in my application.

    Does not say that at all. It says that they are different and use another language (SQL or PL/SQL). It is not about performance.

    My first post is yet - maybe you should reread.

    See you soon

    Ben
    http://www.munkyben.WordPress.com
    Don't forget to mark the answers useful or correct ;)

  • Running the scenario of ODI number of command line only (for the linux files) - file not found

    Hi Experts,

    We load data from .txt files in Linux server into a table.
    Scenario runs perfectly when running Windows ODI GUI (on linux agent.we have two agents who perform one is windows and Linux).

    When we try to run it from the command line using startscen.bat getting following error.

    ODI-1227: SrcSet0 (load) task fails on the source FILES FILE_SERVER connections.

    Caused by: java.sql.SQLException: ODI-40438: file not found: /loadfiles/Test/xyz.txt

    By this mistake if we conclude that this file may not exist... But it works well to GUI.

    Infact we have given 777 permissions to file.

    Ideas please share...

    Concerning

    PrakashV

    Hi all

    It works very well by adding the URL of the AGENT in a syntax such as startsen

    StartScen.bat FILE_TO_ORACLE 001 GLOBAL-NAME = OracleDIAgent3-AGENT_URL =http://10.64.165.73:20912 / oraclediagent

  • Mapping of 12 ODI is a failure loading the table to the table in oracle DB

    Hi Experts,

    I'm starting to ODI, attempts to load data from the Table to the Table in Oracle DB. Source table and target table are in the same PB in different schema

    I created my own work, also agent and master repository.

    Started with the agent, and I could see the status as Planner started for referential work * on Agent OracleDIAgent1.

    Created the agent in topology and successfully tested.

    Created data and connections physical schema of the source and target servers, Test connection is successful.

    Created the context and logical schema defined for the source and the target.

    Mapped to the corresponding physical schema context.

    Diagram logical and physical mapping is accomplished in the context.

    Created for source and target models, able to view the data in the source model.

    Created a simple map and put in source and target component context.

    LKM selected as LKM SQL for SQL

    Select IKM as IKM Oracle Insert.GLOBAL

    After execution, the mapping is a failure with the error below

    Drop table work - LKM SQL for SQL

    ODI-1222: start failure on agent edge internal: logical schema * is not found in the main repository.

    Create the table work - LKM SQL for SQL

    ODI-1222: start failure on agent edge internal: logical schema * is not found in the main repository.

    ODI-1222: start failure on agent edge internal: logical schema * is not found in the main repository.

    at oracle.odi.runtime.agent.execution.AbstractSessionTask.getSrcDataServer(AbstractSessionTask.java:1646)

    at oracle.odi.runtime.agent.execution.interpreter.SessionTaskCodeInterpreter.codeInterpretation(SessionTaskCodeInterpreter.java:132)

    at oracle.odi.runtime.agent.execution.interpreter.SessionTaskCodeInterpreter.codeInterpretation(SessionTaskCodeInterpreter.java:80)

    at oracle.odi.runtime.agent.execution.SessionTask.createTaskLog(SessionTask.java:324)

    at oracle.odi.runtime.agent.execution.AbstractSessionTask.execute(AbstractSessionTask.java:821)

    to oracle.odi.runtime.agent.execution.SessionExecutor$ SerialTrain.runTasks (SessionExecutor.java:2024)

    at oracle.odi.runtime.agent.execution.SessionExecutor.executeSession(SessionExecutor.java:562)

    to oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$ 1.doAction(TaskExecutorAgentRequestProcessor.java:718)

    to oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$ 1.doAction(TaskExecutorAgentRequestProcessor.java:611)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:203)

    at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.doProcessStartAgentTask(TaskExecutorAgentRequestProcessor.java:800)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 1400 (StartSessRequestProcessor.java:74)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:702)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:180)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:108)

    at java.lang.Thread.run(Thread.java:722)

    Please help me with the problem above,

    Thanks in advance.

    Kind regards

    Srikanth

    Hi Srikanth,

    It is usually better to create a separate scheme for the scheme of work, but you can keep the data and schema of work even. Also in your error log, the error should now be to the right of the IKM? No LKM. Try changing the logical schema name and see if it works.

    Thank you

    Ajay

  • ODI 12 c - connection to LDAP server failed

    Hi guys,.

    I have a successful installation connection to the LDAP server problem.

    Here are the attributes:

    Definition tab:
    Name: LDAP_TEST
    (Database server): void

    User: cn = 777, DC = ss, DC = EU, DC = East, DC = gen
    Password: empty

    JDBC tab:
    JDBC driver: com.sunopsis.ldap.jdbc.driver.SnpsLdapDriver
    JDBC URL: jdbc:snps:ldap2? ldap_url = ldap://ss.eu.is.gen:389 / & ldap_password=PP@RRLL1234ldap_basedn=DC=ss, DC = EU, DC = East, DC is gen

    Whenever the error is:

    java.sql.SQLException: ODI-40526: NamingException took place saying: [LDAP: error code 49-80090308: LdapErr: IDDM-0C0903A9, comment: AcceptSecurityContext error, 52nd data, v1db1]
    and this name remaining: null


    I know that the error means invalid credentinals but I don't know how to fix it.

    For sure the user and the password are valid, also they have privileges to read/write on the entire base DN.

    I him have not tested with encrypted password yet but I think it should work this way.


    My ideas, please help!

    Thank you very much.

    Hello

    The error has been corrected in describing the hierarchy of the user (for example, cn = 777, OU = Acc, UO = Priv, DC = ss, DC = EU, DC = East, DC = gen) and application of a patch.

    Kind regards.

  • File not found error when you use agent ODI.

    Hello

    I am trying to load data using the csv file and get the following error.

    ODI-1227: SrcSet0 (load) task fails on the source FILES LOCAL connections.

    Caused by: java.sql.SQLException: ODI-40438: file not found:

    I am going through the oracle blog and discover this ODI agent and the source file must be in the same server. But I can't place t of the file to the server of the odi where the agent is running. Can anyone know how to solve this problem.

    ODI configuration:

    ODI 11.1.1.7

    ODI Linux server

    ODI Client Windows 7.

    Thank you

    P

    Hi Paul.P,

    If you select an agent for execution of your, this agent should have access to all sources of data (DB, files,...) used in your integration project.

    You can map a network drive on the server where the agent is running and move files. Or you can get it from the original location via FTP or sFTP, for example. But your server must be able to manage this file at some point, if you want to use.

    If there is no way you can have the files on this server, you must take the opposite approach and install a new agent, where the files are located.

    More information: http://www.ateam-oracle.com/understanding-where-to-install-the-odi-standalone-agent/

    Kind regards

    JeromeFr

  • ODI - how to export data of "elimination" HFM?

    Hello

    I'm trying to export some data from HFM in SQL, using ODI table. It seems that ODI export data from the 'currency of the entity' as a default. Is it possible to export the value of "elimination" instead?

    If so, how can I do it?

    It is not the case. Only data can be exported with ODI. Elimination is regarded as aggregated data, and for this reason cannot be exported. Only level 0 data can be exported.

  • Connect to open the ldap server using ODI

    Hello

    I need to use openldap as dataserver in ODI. But I'm not sure how to provide the connection string valid. My test ldap server:
    -Host: 172.18.0.106
    -port: 389
    -base dn: dc = example, dc = com

    And (optionally), root (simple authentication) access:
    -Bind dn: cn = jimbob, dc = example, dc = com
    -password: pass

    So I'm trying to start with anonymous access (read-only), it's my connection string:

    JDBC:SNPs:LDAP? ldap_url = ldap://localhost:389 / & ldap_basedn = "dc = example, dc = com"

    Unfortunately, this works now:
    java.sql.SQLException: ODI-40528: a com.sunopsis.ldap.connection.SnpsLdapDriverPropertyException occurred, saying: ODI-40546: a user has failed

    Why he asked me to the user? ODI documentation says, this user/pass are not mandatory.

    What are the access channels for anonymous access and root (or any other user) correct connection in my case? The two methods works with apache directory studio.

    You can define ldap_auth = none for the anonymous user.

    Username/password is required otherwise. Please refer to http://docs.oracle.com/cd/E21764_01/integrate.1111/e12644/appendix_ldap_driver.htm#CHDHCABH

    Thanks,

  • ORA-01790 Expression must have the same data type

    select  'sal' as A, sal as B, sal as C, sal as D
    from
    (Select sum(sal) sal from emp)
    union all
    select
      'comm', comm, comm, comm
    from
    (Select sum(comm) comm from emp)
    union all
    select rpad('-',10,'-') ,rpad('-',10,'-'),rpad('-',10,'-'),rpad('-',10,'-') from emp;
    Get the following error when you run the above query. I know it's because of the rpad('-',10,'-') what is the best way to achieve the expected results

    I would like to have the result with underscore. What is the best way to achieve this.

    Expected results:
    I am developing report.
    I need to have the following oupput.
    How can I put underscore after the recordings.
     A              B        C             D        
    sal         29025       29025     29025
    comm     2200    2200     2200
    --------------------------------------------------
    SQL> select  'sal' as A, sal as B, sal as C, sal as D
      2  from
      3  (Select sum(sal) sal from emp)
      4  union all
      5  select
      6    'comm', comm, comm, comm
      7  from
      8  (Select sum(comm) comm from emp)
      9  union all
     10  select rpad('-',10,'-') ,rpad('-',10,'-'),rpad('-',10,'-'),rpad('-',10,'-') from emp;
      'comm', comm, comm, comm
              *
    ERROR at line 6:
    ORA-01790: expression must have same datatype as corresponding expression
    
    SQL> select  'sal' as A, to_char(sal) as B, to_char(sal) as C, to_char(sal) as D
      2  from
      3  (Select sum(sal) sal from emp)
      4  union all
      5  select
      6    'comm', to_char(comm), to_char(comm), to_char(comm)
      7  from
      8  (Select sum(comm) comm from emp)
      9  union all
     10  select rpad('-',10,'-') ,rpad('-',10,'-'),rpad('-',10,'-'),rpad('-',10,'-') from emp;
    
    A          B                                        C                                        D
    ---------- ---------------------------------------- ---------------------------------------- ------------------
    sal        29025                                    29025                                    29025
    comm       2200                                     2200                                     2200
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    
    A          B                                        C                                        D
    ---------- ---------------------------------------- ---------------------------------------- ------------------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    ---------- ----------                               ----------                               ----------
    
    16 rows selected.
    
    SQL> 
    

    SY.

Maybe you are looking for