I am running this workflow which is supposed to load a file, but i am having the following error messages.
Internal error. Failed to initialize transformation [LKP_FILE_LOAD_ID{{BLD}}]. Contact Informatica Global Customer Support". There is a field 'TOT_CLM' which is a string that i've used LTRIM/RTRIM, but I used 'TO_INTEGER(v_TOT_CLM)' because the field is defined as integer in the target table.
The second error message reads ‘can’t create file in the directory /utils/infa_cache/USS/vnd_HPS/.
The last error message is that ‘check file system permission and free space for possible failure’.
Answers -
When you define a DB lookup in informatica and use SQL override, please use alias to columns. Alias name should be same as lookup port name.
So, if a lookup port is 'TOT_CLM', then select clause should be -
SELECT LTRIM(RTRIM((TOT_CLM)) as TOT_CLM,... FROM claim_table ORDER BY KEY --
If you dont put alias, you get this kind of error. If you still have error pls let me know.
It looks obvious you haven't set cache directory. You can define it in session properties as well as globally. Pls refer to below pic, you can set it for your session.
This seems related to number 2 and should go away if you set correct directory. Please note if your table size is huge, you may run out of spaces. Please connect to informatica admin for this.
HTH
Related
We have run a PowerBI subscription to generate visualisations report in PDF format we have get many errors like this
There is no data for the field at position x
The problem is we searched many times about it we found that it may occurred due to missing data in dataset.
But we have about 30 datasets with a query to oracle database we cannot figure out which is the missing data and the log does not mention which report causes the error.
Is there a way to figure out which field is missing?
Or is there a way to enrich the reports error log to give us which report failed?
A sample of exact error is repeated with different positions :
processing!ReportServer_0-8!1e18!02/07/2022-09:56:36:: e
ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 29.;
Dears
I found a solution help me. I will share it.
The error is due to missing data, not missing values, which means the column name defined in the data set field has been changed in the database.
note:
When make the value equals null it will not give the same error; even if it is used in the report it will give a different error.
about how to detect ?
Simply install report builder in machine has connection to this database and open this report with report builder and make verify fields, it will give detailed error with the name of dataset fields not found so we tracked it in database we found it has been changed so fix it in either dataset or column name in database it fix the issue.
New challenge we are going to handle it either column name exist or changed to e, never get error and give empty report better as there is some database the report will connect may not have the same column names so it should give empty part of report instead of error.
thanks BR,
I'm trying create a transformation that can change field value in DB (postgreSQL what i use).
Case :
In postgre db I have table called Monitoring and it has several field like id, date, starttime, endtime, duration, transformation name, status, desc. All those value I get from Transformation Logging.
So, when I run the transformation it will insert into Monitoring table and set value for field status with Running. And when it done it will update the status into Finish. What I'm trying is to define value in table field by myself not take it from Transformation Logging so I can customize the value like I want to.
Goal is Update transformation status value from 'running' to 'finish/error/abort etc' in my db using pentaho and display that status in web app
I have thinking to used Modified Java Script step to do it but if there any other way maybe? A better one. (Just need opinion about this)
Apart from my remark, did you try the Value Mapper?
modified javascript is not a good idea to use. Ideally, it shouldn't be used due to the performance issue. You can use "add constant" step or "User defined Java Class" for an alternative.
You cannot change the values of the built-in Logging tables, for the simple reason that they are reserved for PDI usage. This causes a known issue in case of hard error: for example the status is not set to finish when the data base server crashes, or when a NullException is not catch by the DPI code.
You have some work around.
The simplest, the one used in the ETL-Pilot is to test (Status=Finish OR LogDate< 15 minutes ago) is the web app.
You can update the table when the transformation is not running. For example, put an hourly (or less) crontab that changes to Finish the status of any transformation whose LogDate is older than 15 mn. This crontab may be a simple SQL or included in a transformation that also check the tables size and/or send an email in case of potential error.
You can copy the table (if it is a non locking operation in your DB system), modify the Status column and use this table for your web app.
I'm trying to use a Lookup transformation to extract ACCT_ID from ACCT table based on the port CUST_DDA which is an output port from an expression.
I'm using an sqloverride as below. The initial lookup condition :
SUBSTR_ACCT_ID = IN_CUST_DDA
Override:
SELECT
ACCT.ACCT_ID as ACCT_ID,
ACCT.ALT_ACCT_ID as ALT_ACCT_ID,
substr(acct.acct_id,-1*(length(IN_CUST_DDA))) as SUBSTR_ACCT_ID
FROM ACCT
WHERE ACCT.ALT_ACCT_ID LIKE '%'||TO_CHAR(IN_CUST_DDA)
AND ACCT.ACCT_ID LIKE '%'||TO_CHAR(IN_CUST_DDA)
The above sql override is failing due to the error : ORA-00904: "IN_CUST_DDA": invalid identifier
Is there a way to use the value from CUST_DDA port as an input port for the lookup. CUST_DDA is not a field that belongs to the ACCT table. Is there a way to do this.
Thanks.
From the override I can see that you are trying to convert IN_CUST_DDA into CHAR, also at the same time your using IN_CUST_DDA in the length.
Might be the length function causing the issue, because length function can be used along with a string.
In order to use CUST_DDA(from source) in your lookup override. You need to join the lookup table with source with a common field in the override.
You cant use the port in the way you mentioned. When you run the workflow informatica integration service will run the lookup override query in the database and get the data into the cache file (that is the reason you are receiving the error "IN_CUST_DDA": invalid identifier.) . Once the cache file is ready it will apply the conditions and then get the output for you.
Let me know if you are not clear on this
Regards
Raj
To achieve this you need to configure your lookup as non-cached, so the query will be executed for each input row. Note, that this degrades performance a lot.
Next, you need to use a bit different syntax, enclosing the input port in question marks. Here's an example. In your case it should be something like (this might need a little adjustment):
SELECT
ACCT.ACCT_ID as ACCT_ID,
ACCT.ALT_ACCT_ID as ALT_ACCT_ID,
substr(acct.acct_id,-1*(length(?IN_CUST_DDA?))) as SUBSTR_ACCT_ID
FROM ACCT
WHERE ACCT.ALT_ACCT_ID LIKE '%'||TO_CHAR(?IN_CUST_DDA?)
AND ACCT.ACCT_ID LIKE '%'||TO_CHAR(?IN_CUST_DDA?)
How do you use Informatica to load data into a target table whose name is a SQL reserved keyword?
I have a situation where I am trying to use Informatica to populate a table called Union which is failing with the following error:
SQL Server Message: Incorrect syntax near the keywork 'Union'
Database driver error...
Function Name : Execute Multiple
SQL Stmt : INSERT INTO UNION (UnionCode, UnionName, etc )
I have been told that changing the database properties to use quoted identifier would solve this problem; however, I have tried that and it only appears to work for sources, not targets.
And before anyone states the obvious - I cannot change the name of the target table.
Can you please try overriding the table name in session properties as "Union" with the quotes.
Load your data in a table with valid name ,having same structure as union .
And in Post Sql of that target, you can rename the table with whatever name required .
Ex .
Click on the target (XUnion) ,
go to Post Sql and put statement below --
RENAME XUnion to 'UNION' ;
If any table name or column name contains a database reserved word, such as MONTH or YEAR, the session fails with database errors when the Integration Service executes SQL against the database. You can create and maintain a reserved words file, reswords.txt, in the server/bin directory. When the Integration Service initializes a session, it searches for reswords.txt. If the file exists, the Integration Service places quotes around matching reserved words when it executes SQL against the database.
Use the following rules and guidelines when working with reserved words.
The Integration Service searches the reserved words file when it generates SQL to connect to source, target, and lookup databases.
If you override the SQL for a source, target, or lookup, you must enclose any reserved word in quotes.
You may need to enable some databases, such as Microsoft SQL Server and Sybase, to use SQL-92 standards regarding quoted identifiers. Use connection environment SQL to issue the command. For example, use the following command with Microsoft SQL Server:
SET QUOTED_IDENTIFIER ON
Sample reswords.txt File
To use a reserved words file, create a file named reswords.txt and place it in the server/bin directory. Create a section for each database that you need to store reserved words for. Add reserved words used in any table or column name. You do not need to store all reserved words for a database in this file. Database names and reserved words in reswords.txt are not case sensitive.
Following is a sample reswords.txt file:
[Teradata] MONTH DATE INTERVAL [Oracle] OPTION START [DB2] [SQL Server] CURRENT [Informix] [ODBC] MONTH [Sybase]
i want to know how to drop a constraint only if it exists. is there any single line statement present in mysql server which will allow me to do this.
i have tried the following command but unable to get the desire output
alter table airlines
drop foreign key if exits FK_airlines;
any help to this really help me to go forward in mysql
I do not believe this is possible in a single line, unless you are willing to detect the error and move on (not a bad thing).
The INFORMATION_SCHEMA database contains the info you need to tell if the foreign key exists, so you could implement it in a 2 step process.
http://dev.mysql.com/doc/refman/5.1/en/table-constraints-table.html
yep not possible the if exist is available only for database table and view :
http://dev.mysql.com/doc/refman/5.0/en/replication-features-drop-if-exists.html
yep 2 step process is a good way like gahooa said