How to load multiple flat files
Hi,
I am new to ODI 10, I have one requirement where I need load flat files containing the folder size11GB.
I want to load them all in a single instances with using of single data server, single physical schema and single logical schema.
How can we do this.
Also to execute this in package what steps and precautions do we need to follow.
Thx
Is the data in your files the same format?
If so, simply follow one of the many guides to looping around files that use a common structure to load them, you can do this in parallel if you want.
http://odiexperts.com/multiple-files-single-interface/
or
http://www.odigurus.com/2011/05/multiple-files-single-target-table.html
Similar Messages
-
Loading Multiple Flat File around 80+
Hi,
Loading multiple flat file in to BI system.
My issue: I got a scenerio of loading multiple i.e., 80+ flat file into BI system every month and my client want it to be done through process chain r automation with out manual intervention.
Can any one suggest me how can i achiev this one.
Regards,
Prabhakar.Hi All,
We have developed a logic to upload multiple flat file at a time i.e., .CSV file. Please find below is the logic regarding that routine.
*+ program filename_routine.
Global code
$$ begin of global - insert your declaration only below this line -
Enter here global variables and type declarations
as well as additional form routines, which you may call from the
main routine COMPUTE_FLAT_FILE_FILENAME below
data : v_filename type string.
data : v_foldername type string.
data : v_uploadfile type string.
data: v_download_file type string.
data : v_ext(4) type c.
data : v_FILE_EXISTS type c.
data : v_file type DXFILE-FILENAME.
data : v_count(3) type c.
data : v_length type i.
TYPES: BEGIN OF TY_file,
LINE(900),
END OF TY_file.
DATA: GIT_file TYPE TABLE OF TY_file.
$$ end of global - insert your declaration only before this line -
form compute_flat_file_filename
using p_infopackage type rslogdpid
p_datasource type rsoltpsourcer
p_logsys type rsslogsys
changing p_filename type RSFILENM
p_subrc like sy-subrc.
$$ begin of routine - insert your code only below this line -
This routine will be called by the adapter,
when the infopackage is executed.
v_count = 1.
*---- As per the folder location of the files & system we have to change
*the path fo the folder in the below variable i.e., 'c:\............
v_foldername =
'C:\Documents and Settings\Prabhakar-HP\Desktop\test\'.
*---- As per the Prefix of the files like 'CSI_01_..' we have change the
*prefix if required in the below variable i.e., 'CSI_01_..', IF REQUIRED
*OR IF WANT TO CHANGE THE PREFIX TO SOME OTHER.
v_filename = 'CSI_01_'.
v_ext = '.csv'.
condense v_count.
concatenate v_foldername
v_filename
v_count
v_ext into v_uploadfile.
v_file = v_uploadfile.
CALL FUNCTION 'DX_FILE_EXISTENCE_CHECK'
EXPORTING
FILENAME = v_file
PC = 'X'
IMPORTING
FILE_EXISTS = v_FILE_EXISTS
EXCEPTIONS
RFC_ERROR = 1
FRONTEND_ERROR = 2
NO_AUTHORITY = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
while v_FILE_EXISTS = 'X'.
v_file = v_uploadfile.
CALL FUNCTION 'DX_FILE_EXISTENCE_CHECK'
EXPORTING
FILENAME = v_file
PC = 'X'
IMPORTING
FILE_EXISTS = v_FILE_EXISTS
EXCEPTIONS
RFC_ERROR = 1
FRONTEND_ERROR = 2
NO_AUTHORITY = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if v_file_exists = 'X'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = v_uploadfile
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = GIT_file
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
elseif sy-subrc = 0.
**----- As per the REQUIRMENT, want to change the down loading file
*path means we have to change the path in the below variable i.e.,
*'c:\.......
v_download_file =
'C:\Documents and Settings\Prabhakar-HP\Desktop\test\satheesh.CSV'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = v_download_file
FILETYPE = 'ASC'
APPEND = 'X'
TABLES
DATA_TAB = git_file
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
refresh git_file.
ENDIF.
endif.
if v_file_exists = 'X'.
if p_subrc = 0.
v_count = v_count + 1.
condense v_count.
concatenate
v_foldername
v_filename
v_count
v_ext into v_uploadfile.
endif.
else.
endif.
endwhile.
v_uploadfile = v_download_file.
p_filename = v_uploadfile.
p_subrc = 0.
$$ end of routine - insert your code only before this line -
endform. +*
Reagrds,
Prabhakar. -
Loading Multiple Flat File in to BI System with one InfoPackage
Greetings,
i have developed a routine to Load Multiple Flate File in one InfoPackage, but it doesn't work. Only the Last File are loaded. Who can Help me?
Loading 'R:\Verzeichnis \ing_wan_b_002.fall.csv' to 'R:\Verzeichnis \ing_wan_b_240*.fall.csv'
Routine:
DATA: VerzUndDateiname TYPE string value 'R:\Verzeichnis \ing_wan_b_000.fall.csv',
VerzUndDateinameKomplett TYPE string,
count TYPE i value 2,
countN(3) TYPE n.
WHILE count <= 240.
countN = count.
VerzUndDateinameKomplett = VerzUndDateiname.
REPLACE '000' WITH zaehlerN
INTO VerzUndDateinameKomplett.
p_filename = VerzUndDateinameKomplett.
count = count + 1.
ENDWHILE.
Best Regards
Jens
Edited by: JB6493 on May 18, 2009 1:03 PM
Edited by: JB6493 on May 18, 2009 1:07 PMHello Jens,
you have to process the InfoPackage 239 times. Your routine would be executed once during one processing of the InfoPackage. This would run the WHILE statement and end up with the last filename after 239 iterations.
Either try to concatenate the files you want to load (if possible) and load them in one go. Alternatively you could try to use a process chain to run the InfoPackage 239 times.
Kind regards,
Christoph -
How to load a flat file with utf8 format in odi as source file?
Hi All,
Anybody knows how we can load a flat file with utf8 format in odi as source file.Please everybody knows to guide me.
Regards,
SaharCould you explain which problem are you facing?
Francesco -
InfoPackage to load multiple flat file for different plant
Hi
There is a requirements to load the data from multiple flat files by different plant into BI which source data is coming from other system. Each flat file has it own naming convention.
As data has to load via infopackage into the targeted cube. Then I have to create multiple infopackage in order to load the data according to the number of flat files that provided. However, new plant will be created due to expansion of bussiness. If that is the case, additional infopackage is required to create as and when there is a new plant.
Is there a way to create a infopackage to load the data from flat file by plant? Your advice is much appreciated.
Thanks and regards
Kang RingHi,
The best way I can suggest is....
1. Create a folder in AL11 for your requirements.
2. In InfoPackage under Extraxction Tab you can have File Name , just side of this you can fine ABAP Routines ICon there you click on that and asks Name give some and then it will takes to your into ABAP Code there you can access the AL11 and then write code in such way that to take file irrespective of the File name, whatever the file is there in that Folder it ahoud take from that AL11 Folder path.
3. Load the Data using PC.
4.At the end of the PC Delete the File in AL11 folder , becasue we don't need it for next load.
Else
See the thread
Re: Automation of load from application server
Thanks
Reddy
Edited by: Surendra Reddy on Jun 4, 2010 11:03 AM -
How to load a flat file with lot of records
Hi,
I am trying to load a flat file with hundreds of records into an apps table. when i create the process and deploy it onto the console it asks for an input in an html form. why does it ask for an input when i have specified the input file directory in my process? is there any way around tis where in it just reads all the records from the flat file directly??is custom queues anyway related to what I am about to do?any documents on this process will be greatly appreciated.If any one can help me on this it will be great. thank you guys....After deploying it, do you see if it is active and the status is on from the BPEL console BPEL Process tab? It should not come up to ask for input unless you are clicking it from the Dashboard tab. Do not click it from the Dashboard. Instead you should put some files into the input driectory. Wait few seconds you should see the instances of the BPEL process is created and start to process the files asynchrously.
-
Loading multiple flat file at a time.
hi experts,
I am having 15 flat files with same data structure.so how do i load all the fileswith out creating 15 info packges .
( say all the files are on the desktop.)
I had seen the option that ABAP code an be written in info package in extraction tab.
Can any one share me the abap code
Regards
Laxman.You can write dynamic code using ABAP if your number of flat files are not fixed...but if you have to 15 flat files always just creating multiple infopackages.
For code, you have to store file names/name pattern in some table and reading it at run time. You can use function modules starting with BAPI_IPAK* to create/change/start template IP like BAPI_IPAK_START. You can set IP parameters at run time using FM RSBATCH_MAINTAIN_PAR_SETTINGS.
Kamaljeet -
How to load a flat file into BW-BPS using Web Browser
Hello, i have a problem with the "How to do Paper". I want to upload a Excel CSV file , but the paper only describes a txt file Uplaod. Does anybody can help me ?Thanks !
You need to parse the line coming in from the flat file...
You can do this with generic types in your flat file structure (string).
Then you loop through the table of strings that is your flat file and parse the string so that it breaks up the line for each comma. There is an ABAP command called: SPLIT - syntax is as follows:
SPLIT dobj AT sep INTO
{ {result1 result2 ...} | {TABLE result_tab} }
[IN {BYTE|CHARACTER} MODE].
Regards,
Zane -
How to load multiple CSV files into oracle in one go.
Hi,
I have project requirement like: I'll be getting one csv file as one record for the source table.
So i need to know is there any way by which I can load multiple csv in one go. I have searched a lot on net about external table.(but problem is I can only use one consolidate csv at a time)
and UTL_FILE same thing consolidate file is required here to load.
but in my scenario I'll have (1000+) csv files(as records) for the table and it'd be hectic thing to open each csv file,copy the record in it and paste in other file to make consolidate one.
Please help me ..it's very new thing for me...I have used external table for , one csv file in past but here I have to user many file.
Table description given below.
desc td_region_position
POSITION_KEY NUMBER Primary key
POSITION_NAME VARCHAR2(20)
CHANNEL VARCHAR2(20)
LEVEL VARCHAR2(20)
IS_PARTNER CHAR(1)
MARKET_CODE VARCHAR2(20)
CSV file example:
POSITION_KEY|POSITION_NAME|CHANNEL|LEVEL|IS_PARTNER|MARKET_CODE
123002$$FLSM$$Sales$$Middle$$Y$$MDM2203
delimeter is -- $$my database version as follows:
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 IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Productio
NLSRTL Version 10.2.0.5.0 - ProductionEdited by: 974253 on Dec 10, 2012 9:58 AMif your csv files have some mask, say "mask*.csv" or by file "mask1.csv" and "mask2.csv" and ...
you can create this.bat file
FOR %%c in (C:\tmp\loader\mask*.csv) DO (
c:\oracle\db\dbhome_1\BIN\sqlldr <user>@<sid>l/<password> control=C:\tmp\loader\loader.ctl data=%%c
)and C:\tmp\loader\loader.ctl is
OPTIONS (ERRORS=0,SKIP=1)
LOAD DATA
APPEND
INTO TABLE scott.td_region_position
FIELDS TERMINATED BY '$$' TRAILING NULLCOLS
( POSITION_KEY,
POSITION_NAME ,
CHANNEL,
LVL,
IS_PARTNER,
MARKET_CODE
)test
C:\Documents and Settings\and>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 10 11:03:47 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from td_region_position;
no rows selected
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:\Documents and Settings\and>cd C:\tmp\loader
C:\tmp\loader>dir
Volume in drive C has no label.
Volume Serial Number is F87F-9154
Directory of C:\tmp\loader
12/10/2012 10:51 AM <DIR> .
12/10/2012 10:51 AM <DIR> ..
12/10/2012 10:55 AM 226 loader.ctl
12/10/2012 10:38 AM 104 mask1.csv
12/10/2012 10:39 AM 108 mask2.csv
12/10/2012 10:57 AM 151 this.bat
4 File(s) 589 bytes
2 Dir(s) 4,523,450,368 bytes free
C:\tmp\loader>this.bat
C:\tmp\loader>FOR %c in (C:\tmp\loader\mask*.csv) DO (c:\oracle\db\dbhome_1\BIN\
sqlldr user@orcl/password control=C:\tmp\loader\loader.ctl data=%c )
C:\tmp\loader>(c:\oracle\db\dbhome_1\BIN\sqlldr user@orcl/password control=C
:\tmp\loader\loader.ctl data=C:\tmp\loader\mask1.csv )
SQL*Loader: Release 11.2.0.1.0 - Production on Mon Dec 10 11:04:27 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
C:\tmp\loader>(c:\oracle\db\dbhome_1\BIN\sqlldr user@orcl/password control=C
:\tmp\loader\loader.ctl data=C:\tmp\loader\mask2.csv )
SQL*Loader: Release 11.2.0.1.0 - Production on Mon Dec 10 11:04:28 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
C:\tmp\loader>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 10 11:04:46 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from td_region_position;
POSITION_KEY POSITION_NAME CHANNEL LVL I
MARKET_CODE
123002 FLSM Sales Middle Y
MDM2203
123003 FLSM1 Sa2les M2iddle Y
MDM22203
SQL> -
Hi,
I have created an empty BPEL process which should take a flat file from my input directory and write it on to the database.But how is this process initiated?would the process be initiated by the presence of a flat file.... which is not happening in my case?or should it be be done by giving an input through a html form?if so how should it be done?Any reply in this case would be highly appreciated. thanks in advanceHi ,
You can use File Adapter to read the file from your specified directory.
Oracle JDev BPEL Designer has in-built support for configuring file adapter to read file from a input directory.
HTH.
Rakesh -
How to Load a Flat File into BW-BPS Using a Web Browser
Hello,
I'm using the upload functionality described in the how to guide.
When we want to have this functionality available for 12 different Planning levels. Do I have to create the Web Interface (as described in the how to guide) for each Planning Level separately, or can i pass a parameter in the URL (wenn calling the File Upload functionality) to determine which Planning level and Function it is.
This pice of coding i want to have a bit more flexible
*Execute planning function
CALL FUNCTION 'API_SEMBPS_FUNCTION_EXECUTE'
EXPORTING
i_area = 'ZIPM0001' " <<<< ADJUST
i_plevel = 'ZCAPB006' " <<<< ADJUST
i_package = '0-ADHOC' " <<<< ADJUST
i_function = 'ZEX00001' " <<<< ADJUST
i_param = 'Z0000001' " <<<< ADJUST
IMPORTING
e_subrc = l_subrc
TABLES
etk_return = lt_bapiret.
Does someone have an idea ?
Thank you
DieterHi Dieter,
you should be able to grab the variable value by the following statement (e.g. in this case 'area' is being passed along, works for whatever you want to send) is:
data: l_area type upc_y_area.
l_area = request->get_form_field( 'area' ).
in this case the calling URL looks like:
<normal URL>?area=example_area
example_area will then contain your value.
Then depending on the value execute your different SEM functions
Note that if you want to load different flatfile formats, more has to change in the functions as indicated in the white paper,
Hope it helps,
Regards,
MArc
I got it from the following document I found on SAPNet or SDN (forgot..) some time back:
How To Call a BPS Web Interface with Predefined Selections -
Parallel loading of flat files into BPC 7.0 NW - Help required
Hi All
Can I load multiple flat files in parallel into BPC using IMPORT process chain.
If yes , How ?
Regards
AKPlease import SAP Note [1507226|https://service.sap.com/sap/support/notes/1507226] titled "FileService should support running DM package simultaneously" which is contained in BPC 7.0 NW SP10 and BPC 7.5 NW SP05.
Best regards,
[Jeffrey Holdeman|http://wiki.sdn.sap.com/wiki/display/profile/Jeffrey+Holdeman]
SAP Labs, LLC
BusinessObjects Division
Americas Applications Regional Implementation Group (RIG) -
Load a flat file into BW-BPS using SAP GUI
Hi,
We are using BW BPS 3.5 version, i implemented how to guide " How to load a flat file into BW-BPS using SAP GUI" successfully without any errors.
I inlcuded three infoobjects in the text file costelemt, Posting period and amount. the same three infoobjects i inlcuded the file structure in the global data as specified in the how to document
The flat file format is like this
Costelmnt Postingperiod Amount
XXXXX #
XXXXX 1 100
XXXXX 2 800
XXXXX 3 700
XXXXX 4 500
XXXXX 5 300
XXXXX 6 200
XXXXX 7 270
XXXXX 8 120
XXXXX 9 145
XXXXX 10 340
XXXXX 11 147
XXXXX 12 900
I successfully loaded above flat file in to BPS cube and it dispalyed in the layout also.
But users are requesting to load flatfile in the below format
Costelmnt Annual(PP=#) Jan(PP=1) Feb(PP=2) ........................................Dec(PP=12)
XXXXX Blank 100 800 900
Is it possible to load a flat file like this
They wants load a single row instead of 13 rows for each costelement
How to do this. Please suggest me if anybody accorss this requirment.
In the infocube we have got only one Info object 0FISCPER3(Posting period) and one 0AMOUNT(Amount)
do we need 13 Infobjects for each posting period and amount.
Is there any possiblity we can implement any user exit which we use in BEX Quer's
Please share your ideas on this.
Thanks in advance
Best regards
SSHi,
There are 2 ways to do this.
One is to change the structure of the cube to have 12 key figures for the 12 posting periods.
Another way is to write an ABAP Function Module to fetch the values from each record based on the posting period and store it in the cube for the corresponding characteristic. This way, you dont have to change the structure of the cube.
If this particular cube is not used anywhere else, I would suggest to change the structure itself.
Hope this helps. -
Unable to load the flat file from client work station
Hi,
I am trying load a flat file (.CSV file)from my desktop (Client work station) and getting the following error.
An upload from the client workstation in the background is not possible
Message no. RSM860
Diagnosis
You cannot load data from the client workstation in the background.
Procedure
Transfer your data to the application server and load it from there.
I have recd a .XLS file and then I have converted to .CSV file , which I saved in my desktop and trying to load the same.
Please help me how to go about this?...
Thanks in advance.
Christy.Hi All,
Again, I have tried to load the flat file from clint work station with direct loading..I have got the following errors..
Errors : 1
Record 990: Contents '50,000' from Field /BIC/ZPLQTY_B Not Convertible in Type QUAN -> Long Tex
like this i recd so many errors.
ERROR : 2
Error in an arithmetic operation in record 259
Please help me how to load the flat file successfully.
If I hv to save the flat file in Appl server..how to do that..Please provide step by step instruction..
Thanks
Christy -
Loading from multiple flat files to same table using SQL Loader
Hi Gurus,
Can anyone please brief me the pros and cons of kicking of multiple sql loader sessions that reads multiple flat files but inserting it into just one table.
The table is not partitioned. Avg record counts for each flat file is about 5-6 million.
Oracle 11g,
OS: Linux
Regards
Cherrish VaidiyanVaidiyan wrote:
Hi Gurus,
Can anyone please brief me the pros and cons of kicking of multiple sql loader sessions that reads multiple flat files but inserting it into just one table.Cherrish,
Pros -> Faster loading of more data
Cons -> Potential performance degradation
Test to see how much resource consuming this task would be and do a priority comparison of that multi-multi load task with other stuff that will be happening in the database in the multi-multi load time so you could decide how to share resources in that time.
Maybe you are looking for
-
Just installed DW CS4 and have been playing around with creating a dynamic table using Spry data sets. I was able to get it working & looking OK. I have two questions. In the past a client would send me an Excel spreadsheet that I normally would expo
-
Can you add different songs to different slides while making a slideshow
Can I change music on individual slides while making a slideshows
-
hie all i am trying to reconstruct my budget from FI documents using transaction FMN0. I am getting the following errors -No fiscal year variant specified -The update profile (DATE) is inconsistent I checked the FI and FM configurations they are all
-
Transfering only edited pages and direct to my site
Hello all, As I use a domain (not .mac) I have to publish my site to a local folder, and then transfer files to my FTP site. Problem is that on publishing to a local folder, I replace all files, and therefore cannot see which files have been modified
-
iPhone 4s.used to get swoosh sound every time I got an email. Now I don't and I have to open email for it to connect and get new messages. What do I do?