Decode statement in a mapping involve Source Text File & Table.
Hi All,
Oracle 9i Warehouse Builder Client: 9.2.0.4.0
Oracle 9i Warehouse Builder Repository: 9.2.0.2.0
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
Does OWB allow to use Decode statement in a mapping involves Source Text File and Oracle Table.
My understanding is it's not possible, since OWB makes use of Sqlloader. For this work arround could be make use of External Table instead of Text Flat File.
However I came across an old posting (June-2003) which says that this feature is available OWB 9.2.
Following is the url:
IF THEN LOGIC from Flat File to Table
Can someone please confirm this?
Thanks in Advance.
Regards,
Vidyanand
Hi all,
If you want to validate correctly this mapping you must to :
1. Right click on the mapping, then Configure
2. Right click on Sql Loader Data Files, then Create
3. Verify that the location name is correct and complete the Data File Name
4. OK
The validation is now OK.
I hope it will be help you
Best Regards
Samy
Similar Messages
-
How to create empty text file on target system for empty source text file
Hi All,
I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.
Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system. I have setup empty file handling options correctly on both CCs.
But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.
Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?
Thanks in Advance....
Regards
Sreeni>
Sreenivasulu Reddy jonnavarapu wrote:
> Hi All,
>
> I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.
> Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system. I have setup empty file handling options correctly on both CCs.
>
> But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.
>
> Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?
>
> Thanks in Advance....
>
> Regards
> Sreeni
the problem is that when there is an empty file there is no XML for parsing available. Hence in case you are using a mapping it will fail.
What ideally you should do is to have a module that will check if the file is empty and if so write out an XML as you want with no values in the content/fields.
Or the next choice would be to have a java mapping to handle this requirement. I guess that on an empty file the java mapping will go to an exception which you can handle to write out your logic/processing -
Unable to map into target text file (VDL-2357)
Hi,
I mapped a target text file (CSV), where I want to write data in. Do I have to say, that it is target and not source? (Where?)
The mapping says at VALIDATE:
VDL-2357: Taget data file name is not specified for "TFILE"
Specify target data file name in the mapping configuration under flat file operator.
There are bond name, physical name and location set in the property editor....!
Regards
Alexander
PS: Is there a list of error messages and explanations somewhere?Hi Alexander
The blog below has an example of where in the map config editor this info is defined;
http://blogs.oracle.com/warehousebuilder/newsItems/viewFullItem$154
There is another one here worth looking for some info;
http://blogs.oracle.com/warehousebuilder/newsItems/viewFullItem$113
Cheers
David -
Create a new dimension in business layer from Data source: text file on the web
Hi,
I have a text data source which is published every few hours that is accessible from a certain URL. I follow the instruction given in this http://scn.sap.com/docs/DOC-43144 - where it shows in great detail how to create the connection, data foundation as well as business layer to create a universe for this type of data.
All is well - I can use this universe in my WEBI doc and display the data.
However, in order for me to merge the data from this universe with another universe, I need to create new dimension based on the data from the text file. The new dimension value is simply the first 4 characters of the Subject found in the text file. The "Subject" dimension is of variant type: varchar.
Following the guide mentioned earlier, the connection is using SAP BO OpenConnectivity driver. And this driver limits severely the SQL statement that I can use to extract a substring of another string. Here's the screenshot of the SQl expression that I can use with this driver
After hours of searching, I cannot find any other connection driver for a text file that's published on a certain URL. The BO OpenConnection driver is the best that I could find.
So here are my problems
1. one of my data source is a text file published on a web
2. the only connection I can create does not allow me to create new dimension in the universe to create an important column "subject ID"
3. I can create the column in webi as a variable. But when I do so, I cannot merge it with existing dimension (webi not allowing to merge these 2 types). And without the merge, the flat file universe with my database universe can't be combined.
I'm using WEBI Rich client version 4.1 SP3 Patch 1. Build 14.1.3.1300
Is there any other idea that you can suggest without requiring to change the extracted data?
Thanks.
With warm regardsHi Bala,
Were you able to find out a solution for the problem with uploading values for a variable from a text file on the web? I am confronted with the same request from users.
Thanks,
BQ -
Message Mapping Error in Text File to XML file Scenario
Hi Gurus,
This is Sudheer...I am New to SAP-PI......
Below link is File to File Scenario(Text File to XML File)...
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/basicFileAdapterContentConversion
I am facing Message Mapping Error....I am not able to map the fileds...
Please help me.
-SudheerThanks Shabarish & Manisha for your reply....
Ya I am getting error while I am testing in IR....
I dont know how to map the fields that shown given below...
Message Type --- Message Type
Record Employee
Header EmployeeID
Key Name
EmpID Company
Name Phone
Company Prior_Employer
Phone Company
Detail Location
Key
Company
Location -
How to extract the Html content of a UI Map into a text file or html file?
Hi,
Is there any possibility in OUAF or Java or from the Database, to retrieve the Html Content of a given a UI Map ?
If UI Map name is the input, then it should fetch the entire html portion of it into a text file. How to acheive this?
This needs to be done programatically either by writing some Java code or some SQL at the DB level?
Edited by: OATS Explorer on Dec 29, 2012 9:10 AMF1_MAP.HTML_DEFN would give the html contents and F1_SCHEMA.SCHEMA_DEFN would give you the UI Map's Schema.
SELECT map.map_cd
, map.html_defn
, sch.schema_defn
FROM f1_map map
, f1_schema sch
WHERE map.map_cd = sch.schema_name
AND sch.schema_type_flg = 'F1MP' -
How can I add a header to a text file without mapping? [Using only ID]
Hi Experts,
I am doing a scenario in which I want to add a dynamic header to a text file, due to the complications related to the structure, I dont want to create a message type, data type etc so I cant use mapping.
I want to do all the manipuations in Integration Directory itself.
Can you all please help me out in this?
Thanks in advance
ThomasHi Experts,
I am new to XI, so only elaborate answers would help me
This is the specific requirement i want;
There is a 'source text file' which is a collection of 1000+ records, I want to make a 'target file' which is a combination of 2 fields, one field will be the dynamically generated name [for the target file] and the other field will be the whole 'source file' content.
From the last response for my question, I understand the dynamic file generation part can be done using java mapping.
Is there anyway by which I can get in the whole content of the source file into a field in the target file?
Thanks in Advance
Thomas -
How to create a mapping with text file as my target
I need to create a mapping with source as a table and target as a text file.
I am using OWB 10g R2. with database Oracle10g.
Any one can help me to create a mapping with a text file as target.Hi,
just create a File-Location and File-definition and use this file-operator as target object inside your mapping.
Regards jwehner -
How to replace huge decode statements with lookups to some simple code/key
I have a legacy PL/SQL application, composed of many very huge decode statements. And the most terribe one is that the guys who develops the application left the company now, leaves no documentation.
We are trying to read and understand those PL/SQL programs, and I'm asked to replace those huge decode statements with lookups to some simple code/key tables? But I have no idea about how to design such code/key tables. Is there any one who has similar experience may help me? Besides code/key tables, any idea will be welcome.
Thank you very much!Not sure what your data looks like but sometimes decode can be replaced with more appropriate functions, ie;
SQL> with t as (
select 'DAY' a, 30 b, null c, null d from dual union all
select null a, null b, 'MONTH' c, 12 from dual)
select coalesce(b,d)
from t
COALESCE(B,D)
30
12
2 rows selected.
SQL> with t as (
select 'DAY' a, 30 b, null c, 0 d from dual union all
select null a, 0 b, 'MONTH' c, 12 from dual)
select greatest(b,d)
from t
GREATEST(B,D)
30
12
2 rows selected. -
'FROM keyword not found where expected'error while Inserting into Text file
Hi,
I have created a simple interface for testing purpose. All it has to do is to Read the data from a Source Text file and put it into another text file (exactly the same headers as that of source) ...
I am using Oracle as my staging area.
But at 'Insert column Header' Stage, it gives me a warning 'FROM keyword not found where expected' and when it goes to the next step 'Insert Rows' it gives me the same error 'FROM keyword not found where expected' and aborts its execution.
I checked the query for insertion and found nothing wrong in it (FROM Statement is just where it is expected, that is) but somehow its not working.
Can somebody help me out as i have done it before on other Installations and dont know why it is occuring that too for the simplest thing in ODI ...
Regards,
Nitesh.Probably you missed the concat operator.
select rpad(nvl(lu_parid,' '),1,19)|| v_comma ||
rpad(nvl(lu_class,' '),1,3)
from temp_te07 -
Reading String (Name-Value) from text file into XML
Hi,
I have a requirement for reading a text file and converting each entry of that text file into XML format. I have not came across such thing yet so looking for some ideas. I am using SQL Server 2005 and here is a sample entry from my source text file,
Jun 4 14:31:00 zzzz64x02 fff:
INPUT(ty=XYZ,Prefix=15063,dn=78787878787878,sgk=100.139.201.48,xxn=87878,ani=656565656565,ogrp=F7ZX05,ogtxt=NNNNN,ogx=NNNNN,oci=0xe00ac,ogi={NOA=INT,BC=1,SIG-TYPE=ZIP});
PROCESS(ty=0x100000,cu=32880,Name=XOXOXOX,pc=88017,pd=24,dd=880175,pk=880175,rd=115472,ca=BGD,reg=RW,cdp=1,ai=245359,grp=2648,sl=9);
OUTPUT(ty=XXXX,ret=0,rl=
{i=1,su=99999,rizID=61084,skid=06,truckgp=1084,dd=8801,dn=78787878787878}
I will get multiple entries like this in my source text file which I have to convert into XML (using TSQL).
Any help will be useful.
Regards.
'In Persuit of Happiness' and ..... learning SQL.And I'm telling you that this is a bad option. You would use the vaccum cleaner to wash the dishes, would you?
If you for some reason would do this task in SQL Server, you would implement it as a CLR stored procedure, but from what you have said I don't understand why you would do this server-side at all.
What's wrong with the current C# solution?
Erland Sommarskog, SQL Server MVP, [email protected]
Got it. I was just looking for the available options, nothing wrong with my C# solution. And yes, I don't use vacuum cleaner to wash dishes.
'In Persuit of Happiness' and ..... learning SQL. -
Importing multiple amount columns from a single text file
I'm sure this question has been addressed many times. I have tried to search for an answer here and other areas, but I have not been able to find a clear answer yet. I am relatively new to HFM and FDM and thus do not have a lot of experience to fall back on. I am primarily a Planning/Essbase person. That being said, here is my question:
I have a data source (text file) containing two amount columns that I need to load to HFM via FDM. One amount column consists of Average Exchange Rates and the other amount column consists of Ending Exchange Rates. I have been asked to develop a process to load both columns of data to HFM using a single process (one Import Format). I've been told this is possible by writing an Import DataPump script. It seems that I would need to create a temporary record set based on the original source file and modify it so that it contained a duplicate set of records where the first set would be used for the Average Rate and the second set would be used for the Ending Rate. This would be a piece of cake using SQL against a relational source, but that's obviously not the case here. I do have some experience with writing FDM scripts but from an IF... Then... Else... standpoint based on metadata values.
If there is anyone out there that has time to help me with this, it would be most appreciated.
Thanks,This is relatively easy to achieve with a single import script associated with the Account source field (assuming AverageRate and EndRate are accounts in your application) in your import format.
Essentially your first amount say AverageRate would be set as the default field for Amount and these values would be loaded as if it were a single value file. For the second value, EndRate you would have to insert the second value directly into the FDM work table which is the temporary table populated when data is imported from a file during the import process. The example code snippet below suld gve you guidance on how this is done
'Get name of temp import work table
strWorkTableName = RES.PstrWorkTable
'Create temp table trial balance recordset
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
If IsNumeric(EndRateFieldValue Ref Goes Here) Then
If EndRateFieldValue Ref Goes Here <> 0 Then
' Create a new record, and supply it with its field values
rsAppend.AddNew
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Account") = "EndRate"
rsAppend.Fields("Amount") = EndRateFieldValue Ref
rsAppend.Fields("Entity")=DW.Utilities.fParseString(strRecord, 16, 1, ",")
rsAppend.Fields("UD1") = DW.Utilities.fParseString(strRecord, 16, 2, ",")
rsAppend.Fields("UD2") = DW.Utilities.fParseString(strRecord, 16, 3, ",")
rsAppend.Fields("UD3") = DW.Utilities.fParseString(strRecord, 16, 16, ",")
'Append the record to the collection
rsAppend.Update
End If
End If
'Close recordset
rsAppend.close
In addition the return value of this Import Script should be "AverageRate" i.e. name of ht eaccount associated with the first value field. The NZP expression also needs to be put on the Amount field in the import format to ensure that the EndRate Field value is always processed even if the value of AverageRate is zero. -
Create text file in Database Trigger
Hello,
How to create text file in the database trigger. I am working on Row level trigger which has select statement if statement fails I have to create text file and insert record in text file. I tried to use file1 TEXT_IO.FILE_TYPE package it does not works.
Thanks,
AtifTEXT_IO is not available on the database. It is only available if you are doing client-side PL/SQL development in Oracle Forms. On the database side, you can use the UTL_FILE package.
Since writing to a file is not transactional, however, and because Oracle may have to call a trigger multiple times to ensure write consistency:
http://tkyte.blogspot.com/2005/09/part-iii-why-is-restart-important-to.html
http://tkyte.blogspot.com/2005/08/part-ii-seeing-restart.html
http://tkyte.blogspot.com/2005/08/something-different-part-i-of-iii.html
you aregenerally better off not writing to a file in a trigger. The better answer is generally to use Oracle Asynchronous Queues to send a message to another process that actually writes the file. That way, if the transaction rolls back, nothing gets written to the file.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Error in codepage mapping for source system. Error text:
guyz,
im facing the below issue in prod.
Error in codepage mapping for source system. Error text:
Message no. RSDS_ACCESS013
Collection in source system ended
Error message during processing in BI
Diagnosis
An error occurred in BI while processing the data. The error is documented in an error message.
System Response
A caller 01, 02 or equal to or greater than 20 contains an error meesage.
Further analysis:
The error message(s) was (were) sent by:
Inbound Processing
Procedure
Check the error message (pushbutton below the text).
Select the message in the message dialog box, and look at the long text for further information.
Follow the instructions in the message.
need your guidance,
cheerz,
raps.
Edited by: raps on Mar 1, 2012 9:39 AMHi ,
Kindly go throught the following threads for your issue resolution::
Error in code page mapping for Source System
Erroe in source system
Regards,
Arpit -
Message Mapping- Source text view not working
HI friends,
in my idoc to file ,
in message mapping testing (static testing),
i given values for sourse message and i executed test and the values are populating in target message.in target meesge if want to view of xml using source text view then..
i am getting follwing ..
<?xml version="1.0" encoding="UTF-8"?>
i am not getting full data in xml format..
please guide me...
regards
MunnaHi Munna,
The solution was the use of Pretty Print.
Double Click on the "Source Text View". You will get an icon of Pretty Print on the side. Click on it. The whole XML will be displayed.
Regards,
Venkatesh
Message was edited by:
Venkatesh Ramachandran
Maybe you are looking for
-
Problem in calling method with object in another class
Hi All, Please tell me the solution, I have problem in calling a method I am posting the code also First Program:- import java.io.*; public class One public One() System.out.println("One:Object created"); public void display() System.out.println("One
-
Open QT In New Browser Window - Followup Q For Quicktime Kirk
Quicktime Kirk: I found a thread a few months ago (now archived) where you explained how to open a QT movie in a new browser window at specified dimensions. The example you gave was your page: http://homepage.mac.com/kkirkster/bushbashquiz/ So I've g
-
Lion iMac won't boot and can't re-install OS as disk locked.
Hi, my iMac was purchased in 2011 and is running Lion, Mac OS X 10.7.5. On Monday it stopped booting and gets stuck at the apple logo and spinning thingy. I have tried to Verify and Repair the Macintosh HD disk but both fail. Next step I wanted to tr
-
Cover flow is completely bugged out and won't display correctly
Awhile back, one of my displays which held a maximized iTunes window was accidentally unplugged, which somehow caused the iTunes window to shrink beyond its allowed limits. Ever since, I've had this problem when I try to use cover flow on the Music o
-
Hi all I have a problem with the display settings of the phone. Actually, i don't have in this menu anything related to screensaver although it's written in the guide book that there are screensaver (the phone shows a changing motif/photo when the ph