Informatica Database driver error with SQL stmt Select - informatica

Facing below error while executing the job in informatica TDM.
SQL error Table or view does not exist
Database driver error
Function name : Execute
SQL stmt : select t0.col name1 as "col name1", t0.col name2 as "col name2" from tablename t0
Oracle fatal error
Prepare failed
Rolling back all the targets due to fatal session error

There is an option in session > mapping > target. Edit session, go to 'Mapping' tab. Then select the target, go to properties section on right pane. scroll down and find 'table name prefix'. Mention your schema name there.

Related

Failed to parse SQL query - column invalid identifier

I am on Application Express 21.1.0.
I added a column to a db table, and tried to add that column to the Form region based on that table.
I got error...
ORA-20999: Failed to parse SQL query! ORA-06550: line 4, column 15: ORA-00904: "NEEDED_EXAMS": invalid identifier
And I can not find the column in any "source> column" attribute of any page item of that form.
I can query the new column in "SQL COMMANDS".
The new column's name is "NEEDED_EXAMS". It's a varachar2(500).
Don't do it manually; use built-in feature by right-clicking the region and then select "Synchronize columns" from the menu as it'll do everything for you. It works for reports and forms.
Solved.
I have many parsing schemas. And I was creating tables through object browser in different schema than my app's parsing schema.

Django with Oracle database 11g

I am new to the python language and django. I need to connect the django to the oracle database 11g, I have imported the cx_oracle library and using the instant client for connecting oracle with django, but when i run the command manage inspectdb > models.py. I get error as Invalid column identifier in the models.py. How could i solve it. I have only 2 tables in that schema i am connecting?
"Invalid column" suggests that you specified column name that doesn't exist in any of those tables, or you misspelled its name.
For example:
SQL> desc dept
Name
-----------------------------------------
DEPTNO
DNAME
LOC
SQL> select ndame from dept; --> misspelled column name
select ndame from dept
*
ERROR at line 1:
ORA-00904: "NDAME": invalid identifier
SQL> select imaginary_column from dept; --> non-existent column name
select imaginary_column from dept
*
ERROR at line 1:
ORA-00904: "IMAGINARY_COLUMN": invalid identifier
SQL>
Also, pay attention to letter case, especially if you created tables/columns using mixed case and enclosed those names into double quotes (if so, I'd suggest you to drop tables and recreate them, without double quotes. If you can't do that, you'll have to reference them using double quotes and exactly the same letter case).
So - check column names and compare them to your query. If you still can't make it work, post some more information - table description and your code.
I've faced the same problem. The problem is that Django expects your table have primary key (ID), so when your table is without key, it returns Invalid columns identifier.
https://docs.djangoproject.com/en/2.1/topics/db/models/#automatic-primary-key-fields

Is it possible to create download link for Left Joined classic report?

I have classic report in the page, which has the following SQL query:
SELECT CELLS.ID, CELLS.NAME, CELLS.NUM, CELLS.AC_ID, AC.SERIAL,AC.FILE_NAME, AC.FILE_DATA
FROM CELLS
LEFT JOIN AC
ON CELLS.AC_ID = AC.ID
WHERE CELLS.AC_ID IS NOT NULL
ORDER BY CELLS.NUM
I would like to have download link for AC.FILE_DATA, which is BLOB. So in Attributes FILE_DATA column I set the following:
Type: Download BLOB
Table Name: AC
BLOB Column: FILE_DATA
Primary Key Column 1: ID
The page then is generating error in the place of classic report region:
Error: ORA-06502: PL/SQL: numeric or value error: character to number
conversion error
Looking in Debug log shows some more:
Exception in "AC Region": Sqlerrm: ORA-06502: PL/SQL: numeric or value
error: character to number conversion error Backtrace: ORA-06512: at
"APEX_050100.WWV_RENDER_REPORT3", line 7965
Without AC.FILE_DATA in left join there is no exception. So can I actually have blob download column when using joins in report query?
As far as I can tell, it has nothing to do with (left) join but the way you create the download link. It should NOT be the BLOB column name, but this:
dbms_lob.getlength(ac.file_data) download
Or, applied to your query,
SELECT CELLS.ID,
CELLS.NAME,
CELLS.NUM,
CELLS.AC_ID,
AC.SERIAL,
AC.FILE_NAME,
--
dbms_lob.getlength(AC.FILE_DATA) download --> this
FROM CELLS
LEFT JOIN AC
ON CELLS.AC_ID = AC.ID
WHERE CELLS.AC_ID IS NOT NULL
ORDER BY CELLS.NUM
"Download" column settings:
Type: Download BLOB
Table name: AC
BLOB Column: FILE_DATA
Primary Key Column 1: ID
Save, Run - should be just fine.

Informatica cannot call siebel.s_sequence_pkg.get_next_rowid function

I am using informatica to extract data using a simple query:
SELECT ' ' as ACTIVE_CTI_CFG_ID, siebel.s_sequence_pkg.get_next_rowid AS ACTIVE_TELESET_ID from dual.
I am able to run this query using Toad.
siebel.s_sequence_pkg.get_next_rowid is a siebel ROW_ID function which I am calling in my SQL query. There is no syntax issue in the query because I can run this SQL on Toad. I am using same user credentials in Toad and informatica.
Unfortunately, informatica is throwing an error during run:
[‎5/‎5/‎2015 3:46 PM] Reddy, Kishore:
Severity Timestamp Node Thread Message Code Message
ERROR 5/5/2015 3:41:35 PM node01_MOCODEVINF01 READER_1_1_1 RR_4035 SQL Error [
ORA-00904: : invalid identifier
Database driver error...
Function Name : Execute
SQL Stmt : SELECT ' ' as ACTIVE_CTI_CFG_ID, siebel.s_sequence_pkg.get_next_rowid AS ACTIVE_TELESET_ID from dual
Oracle Fatal Error
Database driver error...
Function Name : Execute
SQL Stmt : SELECT ' ' as ACTIVE_CTI_CFG_ID, siebel.s_sequence_pkg.get_next_rowid AS ACTIVE_TELESET_ID from dual
Oracle Fatal Error].
I understand this is an oracle SQL error but why I can run this query in Toad but not in informatica?
I would first check that you are connecting to the same database as the same user in both cases.

Why won't SQLite let me query a specific ATTACHED database?

SQLite version 3.7.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> ATTACH DATABASE 'test.db' AS 12;
sqlite> SELECT * FROM ids;
1|hi
2|hilo
3|hiloa
4|hiloas
sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main
2 12 C:\test.db
sqlite> SELECT * FROM 12.ids;
Error: unrecognized token: "12.ids"
Why is it erroring? The data is clearly there.
SELECT * FROM `12`.ids;
If you're going to use odd names (such as all-numeric ones), you'd better escape them properly.