Load from Oracle table to FIle
Hi,
I have a requirement where i need to load the data from a table to a file.
I need to convert all the columns into rows (Pvot and UnPivot) Does ODI support this. I have converted the columns to a single row using a procedure. i want to achive this using an interface. Say 1
2
3
4 is the column i need it to be 1,2,3,4.
What is the best way to achieve this?
Please give me some inputs for this.
Thanks in Advance,
Khaleel
Hi ,
You can refer Metalink Note 423694.1 for Pivoting using ODI.
Thanks,
Sutirtha
Similar Messages
-
Master data Load from Oracle table
Hi,
My master data comes from an Oracle table. The table has both attributes and texts combined. How do I load the Master data into the text and attribute info objects thru Direct Upload of Master Data?
Is it necessary to go in for Flexible Upload in this case?
RegardsHi,
you can create two views on the table. One for the text and the other one for the attributes. Create your datasources on these views and assign them to your infoobject.
regards
Siggi -
Load data from Oracle table,CSV to Hyperion Essbase
Hi All,
when i am executing interface(load data into hyperion essbase from oracle table and csv files),
I am getting below error.
com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Error during task interpretation
Task:1
java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("drop table TEMP_BIAPPS.A3$") ; out.print(thread) ; out.print("_0Combi . . . '' : Undefined argument: thread : at Line: 2 : in file: inline evaluation of: ``out.print("drop table TEMP_BIAPPS.A3$") ; out.print(thread) ; out.print("_0Combi . . . '' : ( thread )
BSF info: Drop work table at line: 0 column: columnNo
at com.sunopsis.dwg.codeinterpretor.a.a(a.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.k(e.java)
at com.sunopsis.dwg.cmd.g.A(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Text:drop table TEMP_BIAPPS.A3$<?=thread?>_0Combination1 A
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.k(e.java)
at com.sunopsis.dwg.cmd.g.A(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Can any one help me out?
Edited by: 791206 on Nov 17, 2010 11:16 PM
Edited by: maulik vadodariya on Nov 17, 2010 11:16 PM
Edited by: maulik vadodariya on Nov 17, 2010 11:17 PM
帖子经 791206编辑过Hi All,
It was staging area problem.
So,I created new schema(User/Password in Oracle Database),and give staging area to that newly created schema(Defination Tab of Interface).
Also,in Flow tab,I selected LKM File to SQL. and problem resolved.
Thanks,
Maulik G. Vadodariya
Edited by: Maulik Vadodariya on 22 Nov, 2010 2:36 PM -
Extracting a flat file from oracle table
I have moved the knowledge module KIM ISO SQL to FileAppend from the Metadata to my project folder.
But when I create an interface mapping the oracle table and a flat file on a different unix server, in the drop down menu , it shows only KIM SQL TO SQL and KIM Control Append.It does not show up the SQL to FileAppend knowledge module option.
What should I do to extract a flat file from oracle table?
Thanks
Hima
Overstock.comAll IKM in the Drop Down Menu are dependent of the target technology.
A question, at this interface, is your target table a file ? -
Using FDM to load data from oracle table (Integration Import Script)
Hi,
I am using Integration Import Script to load data from oracle table to worktables in FDM.
i am getting following error while running the script.
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
Attaching the full error report
ERROR:
Code............................................. -2147217887
Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
At line: 22
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 6260
IDENTIFICATION:
User............................................. ******
Computer Name.................................... *******
App Name......................................... FDMAPP
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... DBNAME
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SCRTEST
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... FDM ACTUAL
Category ID...................................... 13
Period........................................... Jun - 2011
Period ID........................................ 6/30/2011
POV Local........................................ True
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
I am using the following script
Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
'Oracle Hyperion FDM Integration Import Script:
'Created By: Dhananjay
'Date Created: 1/17/2012 10:29:53 AM
'Purpose:A test script to import data from Oracle EBS tables
Dim cnSS 'ADODB.Connection
Dim strSQL 'SQL string
Dim rs 'Recordset
Dim rsAppend 'tTB table append rs object
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
'Connect to SQL Server database
cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
'Create query string
strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
'Get data
rs.Open strSQL, cnSS
'Check for data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location’s DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Amount") = rs.fields("Amount").Value
rsAppend.Fields("Desc1") = rs.fields("Description").Value
rsAppend.Fields("Account") = rs.fields("Account").Value
rsAppend.Fields("Entity") = rs.fields("Entity").Value
rsAppend.Update
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "Import successful!"
'Assign Return value
SQLIntegration = True
End Function
Please help me on this
Thanks,
Dhananjay
Edited by: DBS on Feb 9, 2012 10:21 PMHi,
I found the problem.It was because of the connection string.The format was different for oracle tables.
PFB the format
*cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
And thanks *SH* for quick response.
So closing the thread......
Thanks,
Dhananjay -
Extracting explanations from planning app and loading into Oracle table
Hi All,
I had a requirement where I had to extract data from a planning application through ODI 11g and load it into Oracle RDBMS.
I used essbase as my source in technology (since planning data is stored on essbase side) and oracle as my target.
Now the data is getting extracted from essbase side and is getting loaded into Oracle table through ODI.
Now the client requires that they want to extract the explanations or text values also from planning application and load them into Oracle table.
How this can be achieved?Is there a table on the sql side(since sql database is being used at back end for planning app) which stores the explanations,if yes please let me know which table it is.
Kindly help me with this requirement.Hi,
IKM SQL Control Append is perfect if you don't need incremental updates. If you need it, go for IKM Oracle Incremental Update (MERGE) or something like that.
Regards,
JeromeFr -
How can i extract data from oracle table to flat file or excel spread shee
Hello,
DB Version is 10.1.0.3.0
How can i extract data from oracle table to flat file or excel spread sheet by using sub programs?
Regards,
DHere what I did
SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET HEADING OFF
SET MARKUP HTML OFF SPOOL OFF
Sql> SPOOL bing
select * from -------;
SPOOL OFF;
I do not see file.
I also tried
Sql> SPOOL /tmp/bing
select * from -------;
SPOOL OFF;
But still not seeing the fie, -
Which CKM is used for moving data from Oracle to delimited file ?
Hi All
Please let me know Which CKM is used for moving data from Oracle to delimited file ?
Also is there need of defining each columns before hand in target datastore. Cant ODI take it from the oracle table itself ?Addy,
A CKM is a Check KM which is used to validate data and log errors. It is not going to assist you in data movement. You will need an LKM SQL to File append as answered in another thread.
Assuming that you have a one to one mapping, to make things simpler you can duplicate the Oracle based model and create a file based model. This will take all the column definitions from the Oracle based model.
Alternatively, you can also use an ODI tool odiSQLUnload to dump the data to a file
HTH -
# coming when I select data from oracle table using Native SQL
Hi Gurus,
I am selecting 'First name' from oracle table directly using native sql. I am fetching 65000 records but 10+ records having '#' at the end of firstname. For eg: John#.
But oracle team couldn't find '#' in their table for those records. What could be problem?
or what could be the character in oracle which comes as '#' in abap?
Pls help...
SajThanks for replies.
My DB NLS_PARAMETER is AL32UTF8. I am able to pullout data with older version of ojdbc jar file. So I think there is no issue regarding NLS setting.
So please guide me with proper solution as soon as possible. -
Extract data from Oracle in excel file
Hi,
I have a requirement where in I need to extract data from Oracle in excel file and the excel worksheet name should be "Data".
for eg. excel file name "AR Data_DDMMYY" and excel worksheet name "Data"
I have used the UTL_FILE API to extract the tab delimited data which can be opened in excel but it is not exactly an excel file as the worksheet name is same as the file name.
I tried using utl_file.fcopy and frename.
Is there any way to do this using PLSQL?
select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
"CORE 10.2.0.5.0 Production"
TNS for HPUX: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - ProductionSample Code:
declare
cursor c is
select * from scott.emp;
v varchar2(100);
f utl_file.file_type;
file_name varchar2(100) := 'AR Data.xls';
dir varchar2(50) := 'CESDIR191710';
--select * from dba_directories
begin
f := utl_file.fopen(dir, file_name, 'W');
v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
utl_file.put_line(f, v);
for i in c
loop
v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
utl_file.put_line(f, v);
end loop;
utl_file.fclose(f);
--utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
end;Thanks
ImranImran Soudagar wrote:
Hi,
I was able to generate the excel 2007 file with the data using the package from below link;
http://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/
but the requirement is to generate excel 2003 file.
I tried changing the .xlsx to .xls and it gives a note while opening the file "The file you are trying to open, abc.xls, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"Then you have three options:
1) stop using anton's package and find another one that supports the old and deprecated version of Excel 2003
2) write your own package to produce an Excel file.
3) Upgrade your version of Excel to a recent version
I tried the programs from other links on the forum but I am still getting this message. The client does not want this message to be displayed as the excel file works as an input to another system.
Can anyone help me with the issue?
Also, is it true that the programatically generated excel file is actually an xml file which is renamed to .xls and hence it shows the message while opening such files?Yes, Excel supports several different formats for it's files. By default, if you save an XLS files from Excel, it writes it out in a Microsoft proprietary binary format, which you would be hard pushed to replicate easily from PL/SQL. Excel also has the ability to save it's files as XML format, which is more readable and easier to produce programatically, whilst still allowing you to have multiple sheets, formulas and formatting included in it. That's the format that most people who need formatting and multiple sheets opt for when programatically generating their data as excel workbooks. (There's also an SLYK format that people used to use before that, but it's not as flexible)
If you want to write your own, the easiest thing to do is to start with a blank workbook in Excel, and put in your basic requirements e.g. a couple of named sheets, and some data in different formats (number, date, text etc.) and different formatting options etc. Save that file in XML format from Excel and then open up the file using notepad/wordpad to look at the structure. There'll be a whole load of redundant rubbish Microsoft put in there, but you should be able to figure out the basic structure of XML required to give you what you want. -
Regarding BW migration project from Oracle Tables
hai
please can anyone explain these following thing.
I have data in Oracle tables .
1) How to prepare the Business Blue Print Phase for this project.
2) How to model the data design documents.
3) How to search the Business Content .
4) How to extract the data from Oracle table
5) How to map the fields of oracle tables to Infoobjects
6) can i use Business Content Objects(Infosource, ODS,
Infocube, Infoobjects)
Please explain and send documents to [email protected]
I will assign the points
Thanks Alot
bye
mohammedHi,
I hope the following link may sort out few of your questions:
http://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/frameset.htm
And definately you can use standard ODS or Cube if it suitable to you.
With rgds,
Anil Kumar Sharma .P -
JSON - get data from Oracle table
Hi all,
I hope it is correct thread...
My need is to get data from oracle table using JSON and show output at html table. I'm very new to JSON (got some experience in PL/SQL and basic html knowledge). Could someone direct me to manual or give me simple example?JSON is a way to format data, not a way to fetch data. Call it an alternative to XML.
Are you perhaps talking about doing an ajax request to fetch data? -
Problem fetch data from oracle table to ODI variable
Hi
I created a procedure in ODI to fetch a record from oracle table and store it into ODI variable. In table all columns have values but those values are not storing in to ODI variables when ODI execute procedure
After execution, i am getting following exception
java.lang.Exception: Variable has no value: ORACLEEBIZ_PAS_BULK_LOAD_PROJECT.PVV_ORGANIZATION_CODE
at com.sunopsis.dwg.dbobj.SnpVarSess.getValue(SnpVarSess.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskPreTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:595)
My Procedure: (Please let me know the following ODI procedure correct or not)
begin
select
item_number,
primary_uom_code,
organization_code,
best_by_date,
expiration_date,
lot_number,
origination_date,
retest_date
into
'#PVN_LOT_NUMBER',
'#PVV_PRIMARY_UOM_CODE',
'#PVV_ORGANIZATION_CODE',
'#PVV_BEST_BY_DATE',
'#PVV_EXPIRATION_DATE',
'#PVV_LOT_NUMBER',
'#PVV_ORIGINATION_DATE',
'#PVV_RETEST_DATE'
from (select rownum r,b.* from apps.MTL_OPSM_LOT_EXPORT_V_TEST b) where r='#PVN_ROW_COUNT';
end;
Please help me to resolve the issue
Thanks in advance
Regards
Phani
Edited by: Phanikanth on Jun 29, 2010 6:36 AM
Edited by: Phanikanth on Jun 30, 2010 3:43 AM
Edited by: Phanikanth on Jun 30, 2010 3:59 AMSSIS Import/Export Wizard is the best choice:
http://www.sqlusa.com/bestpractices/ssis-wizard/
Alternative is linked server:
http://www.sqlusa.com/bestpractices/linktooracle/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Display distinct rows from Oracle table without using "DISTINCT" keyword.
How to retrieve distinct rows from oracle table without using 'DISTINCT' keyword in SQL?
Thanks in advance.
MihirWelcome to the forum.
Besides GROUP BY you can use UNIQUE instead of DISTINCT as well, but that's probably not wanted here ;) , and the ROW_NUMBER() analytic:
SQL> create table t as
2 select 1 col1 from dual union all
3 select 1 from dual union all
4 select 2 from dual union all
5 select 3 from dual union all
6 select 4 from dual union all
7 select 4 from dual;
Table created
SQL> select col1 from t;
COL1
1
1
2
3
4
4
6 rows selected
SQL> select distinct col1 from t;
COL1
1
2
3
4
SQL> select unique col1 from t;
COL1
1
2
3
4
SQL> select col1 from t group by col1;
COL1
1
2
3
4
SQL> select col1
2 from ( select col1
3 , row_number() over (partition by col1 order by col1) rn
4 from t
5 )
6 where rn=1;
COL1
1
2
3
4 -
Retrieve data from oracle table, table name passed in runtime into JSP
Hello All,
I am new to JSP, i have a requirement,
I need to retrieve data from oracle table, here table is passed at random. how to get the data displayed in JSP page.
can any one help me in that
thanks1) Learn SQL.
2) Learn Java.
3) Learn JDBC.
4) Learn DAO.
5) Learn HTTP.
6) Learn HTML.
7) Learn JSP/Servlet.
8) Learn JSTL.
9) Apply learned things and develop.
Whenever you stucks, please come back and post the specific coding/technical problem here.
Maybe you are looking for
-
I am using a database in my program and I want to be able to create a radio button which is named after a column name- obviously I can't specify the name of the column myself because the number of column may change for each database as well as the na
-
Audio with video import???
I am using photoshop cc. when I bring in a video the audio doesn't come in with it. If I start with Bridge the audio plays fine in Bridge. Have tried several video files all with the same problem.
-
I've upgraded to iOS6 but can't browse the iTune store. I can updated the apps but just can't browse. It says "Cannot conect to iTunes Store"
-
DW CS5 Unable to connect to a DB
I am using Apache 2.2, PHP 5.3, MySQL 5, and PHPMyAdmin. PHP works in Dreamweaver. MySQL works at the command prompt. I can see my database in PHPMyAdmin. My site is configured correctly. When I open the DATABASES MySQL connection tap in DWCS5 and e
-
Dear Mrs my computer is the least type :macbook air MD761ZP/A . Nowing, my wifi don't work : My wifi performance at work sometimes connected, sometimes disconnected great impact speed. I require that the least wifi update 1.0 !