External table headache
Hi there!
Got this problem that are driving me quite mad.
I'm working on a Oracle 9.2.0.7, Unix is a hp-ux.
The problem is:
using an external table, record in variable format, with '^' as separetor, if file size is an exact power of 1024 (i.e. 1K, 2k, 1M etc) I get the error:
reject limit reached
The strange thing is that the file is correct, anc other files are loaded with no problem at all.
For now the "work around" is to edit the file (vi on file so we check that there aren't strange chars) and then add a space at the end of it.
After this the file is loaded!
Anyone have an idea?
Thank you,
Antonio
Sorry guys, I was a bit busy.
I've talked with a coworker, we got an example of a table and a more precise idea: it's not "power of 1K" but "power of 1M"
This is the example table:
CREATE TABLE ext_table
c_field_1 CHAR(1),
v_field_2 VARCHAR2(15),
v_field_3 VARCHAR2(24),
v_field_4 VARCHAR2(24),
v_field_5 VARCHAR2(14),
v_field_6 VARCHAR2(14),
n_field_7 NUMBER(6,0),
n_field_8 NUMBER(6,0),
n_field_9 NUMBER(10,0),
v_field_10 VARCHAR2(79),
v_field_11 VARCHAR2(12),
c_field_12 CHAR(1),
v_field_13 VARCHAR2(2),
v_field_14 VARCHAR2(7),
v_field_15 VARCHAR2(30),
v_field_16 VARCHAR2(14),
d_field_17 DATE,
n_field_18 NUMBER(8,0),
d_field_19 DATE,
n_field_20 NUMBER(8,0),
v_field_21 VARCHAR2(191),
d_field_22 DATE,
n_field_23 NUMBER(8,0),
v_field_24 VARCHAR2(2),
n_field_25 NUMBER(6,0),
n_field_26 NUMBER(10,0))
ORGANIZATION EXTERNAL (
DEFAULT DIRECTORY DR_LOAD
ACCESS PARAMETERS(records delimited by newline
badfile 'DR_ERROR':'EXT_TABLE_LOAD.error'
logfile 'DR_LOG':'EXT_TABLE_LOAD.log'
fields (
c_field_1 POSITION(2:2) CHAR(1)
,v_field_2 POSITION(3:17) CHAR(15)
,v_field_3 POSITION(18:41) CHAR(24)
,v_field_4 POSITION(42:65) CHAR(24)
,v_field_5 POSITION(66:79) CHAR(14)
,v_field_6 POSITION(80:93) CHAR(14)
,n_field_7 POSITION(94:99) INTEGER EXTERNAL(6)
,n_field_8 POSITION(100:105) INTEGER EXTERNAL(6)
,n_field_9 POSITION(106:115) INTEGER EXTERNAL(10)
,v_field_10 POSITION(116:194) CHAR(79)
,v_field_11 POSITION(195:206) CHAR(12)
,c_field_12 POSITION(207:207) CHAR(1)
,v_field_13 POSITION(208:209) CHAR(2)
,v_field_14 POSITION(210:216) CHAR(7)
,v_field_15 POSITION(217:246) CHAR(30)
,v_field_16 POSITION(247:260) CHAR(14)
,d_field_17 POSITION(261:274) DATE YYYYMMDDHH24MISS
,n_field_18 POSITION(261:268) INTEGER EXTERNAL(8)
,d_field_19 POSITION(275:288) DATE YYYYMMDDHH24MISS
,n_field_20 POSITION(275:282) INTEGER EXTERNAL(8)
,v_field_21 POSITION(289:479) CHAR(191)
,d_field_22 POSITION(480:493) DATE YYYYMMDDHH24MISS
,n_field_23 POSITION(480:487) INTEGER EXTERNAL(8)
,v_field_24 POSITION(494:495) CHAR(2)
,n_field_25 POSITION(496:501) INTEGER EXTERNAL(6)
,n_field_26 POSITION(502:511) INTEGER EXTERNAL(10)
LOCATION (
DR_LOAD:'EXT_TABLE_LOAD'
and a row
2T0123456789 11111111 2008091008264220080910092642020202020304000000000200613359956 0006133599560L2*************************************999912310000002008091008264220080910092642L2061335995620202203042008091008264220080910092642 20090319112538000808291000021162
If you replicate the row, that is 512 byte, 2048 times so you will have a file that is exactly 1MB, then any select on the external table will fail.
The error log EXT_TABLE_LOAD.log says:
KUP-04021: field formatting error for field C_FIELD_1
KUP-04023: field start is after end of record
KUP-04101: record 2049 rejected in file <file>
(NOTE: it's not true, the file is correct! if you try to load the single row it will load nicely)
and you'll have an empty EXT_TABLE_LOAD.error
Hope this will help.
Bye,
Antonio
Similar Messages
-
Error: while Selecting External table
Hi everybody,
When i Select an external table i am getting this error. The file is like this:
229|1|506460|SIGROUP |4890|100|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|12|CLIENT|INE547A01012|10:31:00|
229|1|506460|SIGROUP |4900|900|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|13|CLIENT|INE547A01012|10:31:00|
229|1|500407|SWARAJENG |21400|300|0|0|10:33:28|2007/12/17|OWN|20191397001|L|B|154|OWN|INE277A01016|10:33:28|
I had created the Table like this:
SQL> CREATE TABLE TEMP_SAUDA
2 (S_A VARCHAR2(20),
3 S_TYPE VARCHAR2(20),
4 S_CO VARCHAR2(20),
5 S_CONAME VARCHAR2(40),
6 S_RATE NUMBER,
7 S_QTY NUMBER,
8 S_G NUMBER,
9 S_H NUMBER,
10 S_TIME TIMESTAMP WITH TIME ZONE,
11 S_DATE DATE,
12 S_PCODE VARCHAR2(20),
13 S_SETNO VARCHAR2(20),
14 S_M VARCHAR2(20),
15 S_N VARCHAR2(20),
16 S_O VARCHAR2(20),
17 S_CLIENTOWN VARCHAR2(10),
18 S_ISIN VARCHAR2(12),
19 S_ORDER_TIME TIMESTAMP WITH TIME ZONE
20 )
21 ORGANIZATION EXTERNAL
22 (TYPE oracle_loader
23 DEFAULT DIRECTORY BSE17122007
24 ACCESS PARAMETERS
25 (RECORDS DELIMITED BY NEWLINE
26 FIELDS
27 (
28 S_A CHAR(20),
29 S_TYPE CHAR(20),
30 S_CO CHAR(20),
31 S_CONAME CHAR(20),
32 S_RATE CHAR(20),
33 S_QTY CHAR(20),
34 S_G CHAR(20),
35 S_H CHAR(20),
36 S_TIME CHAR(35) date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM
37 S_DATE CHAR(22) date_format DATE mask "mm/dd/yyyy hh:mi:ss ",
38 S_PCODE CHAR(20),
39 S_SETNO CHAR(20),
40 S_M CHAR(20),
41 S_N CHAR(20),
42 S_O CHAR(20),
43 S_CLIENTOWN CHAR(20),
44 S_ISIN CHAR(20),
45 S_ORDER_TIME date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM"
46 )
47 )
48 location (BSE17122007:'BR171207.DAT')
49 )
50 ;
Table created.
SQL> SELECT * FROM TEMP_SAUDA;
SELECT * FROM TEMP_SAUDA
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "date_format": expecting one of: "binary_double,
binary_float, comma, char, date, defaultif, decimal, double, float, integer, (,
nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned,
varrawc, varchar, varraw, varcharc, zoned"
KUP-01007: at line 21 column 14
ORA-06512: at "SYS.ORACLE_LOADER", line 19
Is there any mistake in this table creation.
what i have to declare to the time format if the format in the file id hh:mm:ss
Thank u...!
RaviThe output you posted is completely wrong, I could not even create the table without errors.
Try with this.
CREATE TABLE TEMP_SAUDA
(S_A VARCHAR2(20),
S_TYPE VARCHAR2(20),
S_CO VARCHAR2(20),
S_CONAME VARCHAR2(40),
S_RATE NUMBER,
S_QTY NUMBER,
S_G NUMBER,
S_H NUMBER,
S_TIME TIMESTAMP WITH TIME ZONE,
S_DATE DATE,
S_PCODE VARCHAR2(20),
S_SETNO VARCHAR2(20),
S_M VARCHAR2(20),
S_N VARCHAR2(20),
S_O VARCHAR2(20),
S_CLIENTOWN VARCHAR2(10),
S_ISIN VARCHAR2(12),
S_ORDER_TIME TIMESTAMP WITH TIME ZONE
ORGANIZATION EXTERNAL
(TYPE oracle_loader
DEFAULT DIRECTORY BSE17122007
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
FIELDS terminated by "|"
S_A CHAR(20),
S_TYPE CHAR(20),
S_CO CHAR(20),
S_CONAME CHAR(20),
S_RATE CHAR(20),
S_QTY CHAR(20),
S_G CHAR(20),
S_H CHAR(20),
S_TIME CHAR(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM",
S_DATE CHAR(10) date_format DATE mask "yyyy/mm/dd",
S_PCODE CHAR(20),
S_SETNO CHAR(20),
S_M CHAR(20),
S_N CHAR(20),
S_O CHAR(20),
S_CLIENTOWN CHAR(20),
S_ISIN CHAR(20),
S_ORDER_TIME char(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM"
location (BSE17122007:'BR171207.DAT')
;With this you get:
SQL> col s_time format a40
SQL> col s_date format a40
SQL> col s_order_time format a40
SQL> r
1* select s_time,s_date,s_order_time from temp_sauda
S_TIME S_DATE S_ORDER_TIME
01-JAN-08 10.31.01.000000 AM +00:00 17.DEC.2007 00:00:00 01-JAN-08 10.31.00.000000 AM +00:00
01-JAN-08 10.31.01.000000 AM +00:00 17.DEC.2007 00:00:00 01-JAN-08 10.31.00.000000 AM +00:00
01-JAN-08 10.33.28.000000 AM +00:00 17.DEC.2007 00:00:00 01-JAN-08 10.33.28.000000 AM +00:00Be aware that your file does not contain date information for the time fields, so as you see above it is defaulted to 01-JAN-08 for the S_TIME and S_ORDER_TIME column. -
Error while creating external table
Hi i tried to create external table. The table is created but while selecting that table it is throwing below errors
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Countries1.txt in EXT_TABLES not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19I've created temp directory in window under oracle directory " C:\oracle\product\10.2.0\temp"
In the temp directory i've a text file countries1.txt
the text file has the below information
ENG,England,English
SCO,Scotland,English
IRE,Ireland,English
WAL,Wales,WelshI've connected to system user and created one directory and granted the read and write permissions to user SCOTT.
SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp\';
Directory created.
SQL> grant read,write on directory ext_tables to scott;
Grant succeeded.The creation of external table query is
CREATE TABLE countries_ext (
country_code VARCHAR2(5),
country_name VARCHAR2(50),
country_language VARCHAR2(50)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY ext_tables
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
country_code CHAR(5),
country_name CHAR(50),
country_language CHAR(50)
LOCATION ('Countries1.txt')
PARALLEL 5
REJECT LIMIT UNLIMITED;And the error is
SQL> select *from countries_ext;
select *from countries_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Countries1.txt in EXT_TABLES not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
SQL> Please help me in thisYou are missing something. Most probably the file does not exists in your specified path. This is working in my 10.2.0.3
Step1: Check the file is actually there.
C:\oracle\product\10.2.0>mkdir temp
C:\oracle\product\10.2.0>cd temp
C:\oracle\product\10.2.0\temp>dir
Volume in drive C is C_Drive
Volume Serial Number is 8A93-1441
Directory of C:\oracle\product\10.2.0\temp
07/30/2011 12:00 PM <DIR> .
07/30/2011 12:00 PM <DIR> ..
07/30/2011 12:00 PM 79 countries1.txt
1 File(s) 79 bytes
2 Dir(s) 50,110,582,784 bytes free
C:\oracle\product\10.2.0\temp>type countries1.txt
ENG,England,English
SCO,Scotland,English
IRE,Ireland,English
WAL,Wales,Welsh
C:\oracle\product\10.2.0\temp>Step 2: Creating the directory object.
SQL> show user
USER is "SYS"
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp';
Directory created.
SQL> grant read,write on directory ext_tables to scott;
Grant succeeded.
SQL>Step 3: Table definition.
C:\>sqlplus scott@orclsb/tiger
SQL*Plus: Release 10.1.0.4.2 - Production on Sat Jul 30 12:04:24 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> CREATE TABLE countries_ext (
2 country_code VARCHAR2(5),
3 country_name VARCHAR2(50),
4 country_language VARCHAR2(50)
5 )
6 ORGANIZATION EXTERNAL (
7 TYPE ORACLE_LOADER
8 DEFAULT DIRECTORY ext_tables
9 ACCESS PARAMETERS (
10 RECORDS DELIMITED BY NEWLINE
11 FIELDS TERMINATED BY ','
12 MISSING FIELD VALUES ARE NULL
13 (
14 country_code CHAR(5),
15 country_name CHAR(50),
16 country_language CHAR(50)
17 )
18 )
19 LOCATION ('Countries1.txt')
20 )
21 PARALLEL 5
22 REJECT LIMIT UNLIMITED;
Table created.
SQL> SELECT * FROM countries_ext;
COUNT COUNTRY_NAME
COUNTRY_LANGUAGE
ENG England
English
SCO Scotland
English
IRE Ireland
English
COUNT COUNTRY_NAME
COUNTRY_LANGUAGE
WAL Wales
Welsh -
Error while selecting date from external table
Hello all,
I am getting the follwing error while selecting data from external table. Any idea why?
SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
2 SE_CUST_ID NUMBER(38),
3 SE_TRAN_AMT_LCY FLOAT(126),
4 SE_REVERSAL_MARKER VARCHAR2(255))
5 ORGANIZATION EXTERNAL (
6 TYPE ORACLE_LOADER
7 DEFAULT DIRECTORY ext_tables
8 ACCESS PARAMETERS (
9 RECORDS DELIMITED BY NEWLINE
10 FIELDS TERMINATED BY ','
11 MISSING FIELD VALUES ARE NULL
12 (
13 country_code CHAR(5),
14 country_name CHAR(50),
15 country_language CHAR(50)
16 )
17 )
18 LOCATION ('SE2.csv')
19 )
20 PARALLEL 5
21 REJECT LIMIT UNLIMITED;
Table created.
SQL> select * from se2_ext;
SQL> select count(*) from se2_ext;
select count(*) from se2_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04043: table column not found in external source: SE_REF_NO
ORA-06512: at "SYS.ORACLE_LOADER", line 19It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
HTH -- Mark D Powell -- -
Error while querying the external tables in 9i
i am working on a project on Oracle 9iR2 on Linux AS 3.0, i am in urgent need to port my data in text files for using in the DB
I have created an external table using the following script. While executing a query it gives the following error. Pls Hlp
create table ap_info_ex
(ser_no number(7),
no_of_sps number(1),
hpy_liq_mm number(2),
rmp_rnk_cd number(1),
ir number(3),
dps_flg varchar2(1))
organization external
(type oracle_loader
default directory aps_jul
access parameters (records delimited by newline
fields terminated by ","
(sno char,
no_sps char,
hpy_mm char,
rmp_rnk char,
ir char,
dpsflg char))
location ('info.txt'));
Table has been created successfully
but when i execute a query say
select * from ap_info_ex;
THIS IS THE ERROR MESSAGE I AM GETTING
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file AP_INFO_EX_6151.log
OS error Permission denied
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
hope you would help me. i am greateful for that.Arun,
Here are the things you could do.
1. You may want to specify a logfile in your access parameters using the command 'logfile'.
For example,
logfile 'info.log'. You could create the file in advance and provide appropriate permissions to the operating system user(In unix, I use the commands 'touch' and 'chmod').
2. You could specify the command
'NOLOGFILE' in your access parameters.
3. Provide permissions for the user to create files in the folder associated with the directory object 'aps_jul'. -
Join large external external Tables (best practice ?)
Hi there,
I have three external tables in a master-detail relation: table A (10000000 rows) is master of table B (20000000 rows), Table B is master of table C (100000000 rows). Can you tell my the best way:
- directly join the external tables, or
- copy the external tables into tables, create an index, and join them
What is more efficient, and why ?
Thanks for your help and ideas.
Gerhard.In general, if the joins you are doing can benefit from indexes, you will want to copy the data to database tables. If the joins will end up doing full table scans anyway, it will matter far less.
For data integrity, you will likely also want to be able to enforce foreign key constraints.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
How to import external table, which exist in export dump file.
My export dump file has one external table. While i stated importing into my developement instance , I am getting the error "ORA-00911: invalid character".
The original definition of the extenal table is as given below
CREATE TABLE EXT_TABLE_EV02_PRICEMARTDATA
EGORDERNUMBER VARCHAR2(255 BYTE),
EGINVOICENUMBER VARCHAR2(255 BYTE),
EGLINEITEMNUMBER VARCHAR2(255 BYTE),
EGUID VARCHAR2(255 BYTE),
EGBRAND VARCHAR2(255 BYTE),
EGPRODUCTLINE VARCHAR2(255 BYTE),
EGPRODUCTGROUP VARCHAR2(255 BYTE),
EGPRODUCTSUBGROUP VARCHAR2(255 BYTE),
EGMARKETCLASS VARCHAR2(255 BYTE),
EGSKU VARCHAR2(255 BYTE),
EGDISCOUNTGROUP VARCHAR2(255 BYTE),
EGREGION VARCHAR2(255 BYTE),
EGAREA VARCHAR2(255 BYTE),
EGSALESREP VARCHAR2(255 BYTE),
EGDISTRIBUTORCODE VARCHAR2(255 BYTE),
EGDISTRIBUTOR VARCHAR2(255 BYTE),
EGECMTIER VARCHAR2(255 BYTE),
EGECM VARCHAR2(255 BYTE),
EGSOLATIER VARCHAR2(255 BYTE),
EGSOLA VARCHAR2(255 BYTE),
EGTRANSACTIONTYPE VARCHAR2(255 BYTE),
EGQUOTENUMBER VARCHAR2(255 BYTE),
EGACCOUNTTYPE VARCHAR2(255 BYTE),
EGFINANCIALENTITY VARCHAR2(255 BYTE),
C25 VARCHAR2(255 BYTE),
EGFINANCIALENTITYCODE VARCHAR2(255 BYTE),
C27 VARCHAR2(255 BYTE),
EGBUYINGGROUP VARCHAR2(255 BYTE),
QTY NUMBER,
EGTRXDATE DATE,
EGLISTPRICE NUMBER,
EGUOM NUMBER,
EGUNITLISTPRICE NUMBER,
EGMULTIPLIER NUMBER,
EGUNITDISCOUNT NUMBER,
EGCUSTOMERNETPRICE NUMBER,
EGFREIGHTOUTBOUNDCHARGES NUMBER,
EGMINIMUMORDERCHARGES NUMBER,
EGRESTOCKINGCHARGES NUMBER,
EGINVOICEPRICE NUMBER,
EGCOMMISSIONS NUMBER,
EGCASHDISCOUNTS NUMBER,
EGBUYINGGROUPREBATES NUMBER,
EGINCENTIVEREBATES NUMBER,
EGRETURNS NUMBER,
EGOTHERCREDITS NUMBER,
EGCOOP NUMBER,
EGPOCKETPRICE NUMBER,
EGFREIGHTCOSTS NUMBER,
EGJOURNALBILLINGCOSTS NUMBER,
EGMINIMUMORDERCOSTS NUMBER,
EGORDERENTRYCOSTS NUMBER,
EGRESTOCKINGCOSTSWAREHOUSE NUMBER,
EGRETURNSCOSTADMIN NUMBER,
EGMATERIALCOSTS NUMBER,
EGLABORCOSTS NUMBER,
EGOVERHEADCOSTS NUMBER,
EGPRICEADMINISTRATIONCOSTS NUMBER,
EGSHORTPAYMENTCOSTS NUMBER,
EGTERMCOSTS NUMBER,
EGPOCKETMARGIN NUMBER,
EGPOCKETMARGINGP NUMBER,
EGWEIGHTEDAVEMULTIPLIER NUMBER
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY EV02_PRICEMARTDATA_CSV_CON
ACCESS PARAMETERS
LOCATION (EV02_PRICEMARTDATA_CSV_CON:'VPA.csv')
REJECT LIMIT UNLIMITED
NOPARALLEL
NOMONITORING;
While importing , when i seen the log file , it is failing the create the external table. Getting the error "ORA-00911: invalid character".
Can some one suggest how to import external tables
Addressing this issue will be highly appriciated.
NaveenHi Srinath,
When i observed the create table syntax of external table from import dump log file, it show few lines as below. I could not understand these special characters. And create table definationis failing with special character viz ORA-00911: invalid character
ACCESS PARAMETERS
LOCATION (EV02_PRICEMARTDATA_CSV_CON:'VPA.csv').
I even observed the create table DDL from TOAD. It is same as i mentioned earlier
Naveen -
DATE fields and LOG files in context with external tables
I am facing two problems when dealing with the external tables feature in Oracle 9i.
I created an External Table with some fileds with the DATE data type . There were no issues during the creation part. But when i query the table, the DATE fields are not properly selected though the data is there in the files. Is there any ideas to deal with this ?
My next question is regarding the log files. The contents in the log file seems to be growing when querying the external tables. Is there a way to control this behaviour?
Suggestions / Advices on the above two issues are welcome.
Thanks
LakshminarayananHi
If you have date datatypes than:
select
greatest(TABCASER1.CASERRECIEVEDDATE, EVCASERS.FINALEVDATES, EVCASERS.PUBLICATIONDATE, EVCASERS.PUBLICATIONDATE, TABCASER.COMPAREACCEPDATE)
from TABCASER, TABCASER1, EVCASERS
where ...-- join and other conditions
1. greatest is good enough
2. to_date creates date dataype from string with the format of format string ('mm/dd/yyyy')
3. decode(a, b, c, d) is a function: if a = b than return c else d. NULL means that there is no data in the cell of the table.
6. to format the date for display use to_char function with format modell as in the to_date function.
Ott Karesz
http://www.trendo-kft.hu -
External Table Security with OBIEE 11G is not working properly.
Hello Everyone,
we just upgraded for OBIEE from 10G to 11G.
not what we had in 10G for object level and data level security is that we were using "External table" and LDAP Authentication.
Now for User we are capturing Groups in that table, so basically we have Group-level security.
so in that case we are creating Groups in External Table, RPD & Catalog.
Now we upgraded OBIEE to 11G, there we have totally different concept for security.
So here in what we have to do to implement the same concept. because we have created the Application Roles in Admin Console and Groups in Enterprise Manager with same name, and assigned same Groups to same Application Role.
now while applying security in frontend we can catalog groups options too!!! so do we have to create the same groups in catalog too?? and while applying the security to catalog which one do we need to use? "Application Role" OR "Catalog Groups"???
Thanking You..Hi,
which version r u using? until obiee11.1.1.5 its bug but solve it by workaround method . also the bug fixed in obiee.11.1.1.6
11700314 REPORT NOT EXPORTED FULLY INTO EXCEL WHEN DOWNLOADING FROM PAGES OTHER THAN 1
1) stop it all u r bi serivices then take a back of u original instanconfig.xml file then do the below changes
D:\Oracle\Middleware\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1
instanceconfig.xml
just add below content then
<Views>
<Pivot>
<MaxCells>6500000</MaxCells>
<MaxVisibleColumns>100</MaxVisibleColumns>
<MaxVisiblePages>1000</MaxVisiblePages>
<MaxVisibleRows>65000</MaxVisibleRows>
<MaxVisibleSections>25</MaxVisibleSections>
<DefaultRowsDisplayed>500</DefaultRowsDisplayed>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDownload>64000</DefaultRowsDisplayedInDownload>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DisableAutoPreview>false</DisableAutoPreview>
</Pivot>
<Table>
<MaxCells>6500000</MaxCells>
<MaxVisiblePages>1000</MaxVisiblePages>
<MaxVisibleRows>65000</MaxVisibleRows>
<MaxVisibleSections>25</MaxVisibleSections>
<DefaultRowsDisplayed>500</DefaultRowsDisplayed>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDownload>64000</DefaultRowsDisplayedInDownload>
</Table>
</Views>
Restart all u r bi services..
then test it out.
Thanks
Deva -
Report query not returning the field value from external table
hi
I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
Can anyone please help me in this issue.
Thanks and Regards
kkDuplicate post?
value not displaying in report whereas it returns in plsql developer
value not displaying in report whereas it returns in plsql developer
Please log a SR if you do not get any reply to your thread instead of creating new one.
Thanks,
Hussein -
External table - fetch location ?
Using Oracle 10.2.0.5
An external table is a construct that gives me SQL access to a file.
Is it possible to know the name of the file somehow inside the select? Like Add a column with the file name?
pseudo example
CREATE TABLE EXT_DUMMY
"RECORDTYPE" VARCHAR2(100 BYTE),
"COL1" VARCHAR2(100 BYTE),
"COL2" VARCHAR2(100 BYTE),
"FILE" VARCHAR2(100 BYTE)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER DEFAULT DIRECTORY "IMPORT_BAD_FILE"
ACCESS PARAMETERS (
records delimited BY newline
FIELDS TERMINATED BY ';'
MISSING FIELD VALUES ARE NULL
( RECORDTYPE CHAR
, COL1 CHAR
, COL2 CHAR
, FILE CHAR FILLER
LOCATION ( 'Testfile1.txt, Testfile2.txt' )
reject limit 10
;The result could look like this:
RECORDTYPE COL1 COL2 FILE
SAMPLE DUMMY DUMMY Testfile1.txt
SAMPLE DUMMY1 DUMMY Testfile1.txt
SAMPLE DUMMY2 DUMMY Testfile1.txt
SAMPLE DUMMY3 DUMMY Testfile1.txt
SAMPLE DUMMY1 DUMMY1 Testfile2.txt
SAMPLE DUMMY1 DUMMY2 Testfile2.txt
SAMPLE DUMMY2 DUMMY1 Testfile2.txtI would like to know from which file a certain row is read. Maybe I missed an option in the documentation. In this example I have two different files as the source for the external table.
Another use case could be this:
If I enable a user to switch the external table to a different file alter table EXT_DUMMY location ('Testfile3.txt' ). How can we know which file is read during the select on the table? When userA does the select, maybe userB just altered the location before the select was started. Therefore userA would read in a different file then expected.
Edited by: Sven W. on May 26, 2011 4:48 PM
Edited by: Sven W. on May 26, 2011 4:51 PM
Edited by: Sven W. on May 26, 2011 5:11 PMHi Sven,
I'm not sure how much we can rely on this, but let's consider the following :
create table test_xt (
rec_id number
, message varchar2(100)
organization external (
default directory test_dir
access parameters (
records delimited by newline
fields terminated by ';'
location (
'marc5.txt'
, 'test1.csv'
, 'test2.csv'
, 'test3.csv'
);I always thought the ROWID doesn't hold much sense for an external table, but...
SQL> select t.rowid
2 , dump(t.rowid) as rowid_dump
3 , regexp_substr(dump(t.rowid,10,9,1),'\d+$') as file#
4 , t.*
5 from test_xt t
6 ;
ROWID ROWID_DUMP FILE# REC_ID MESSAGE
(AADVyAAAAAAAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,0,0,0,0,0,0,0,0,0 0 1 this is a line from marc5.txt
(AADVyAAAAAAAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,0,0,0,0,0,0,0,0,33 0 2 this is a line from marc5.txt
(AADVyAAAAAAAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,0,0,0,0,0,0,0,0,66 0 3 this is a line from marc5.txt
(AADVyAAAAAAAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,0,0,0,0,0,0,0,0,99 0 4 this is a line from marc5.txt
(AADVyAAAAAEAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,1,0,0,0,0,0,0,0,0 1 1 this is a line from test1.csv
(AADVyAAAAAEAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,1,0,0,0,0,0,0,0,33 1 2 this is a line from test1.csv
(AADVyAAAAAEAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,1,0,0,0,0,0,0,0,66 1 3 this is a line from test1.csv
(AADVyAAAAAEAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,1,0,0,0,0,0,0,0,99 1 4 this is a line from test1.csv
(AADVyAAAAAIAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,2,0,0,0,0,0,0,0,0 2 1 this is a line from test2.csv
(AADVyAAAAAIAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,2,0,0,0,0,0,0,0,33 2 2 this is a line from test2.csv
(AADVyAAAAAIAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,2,0,0,0,0,0,0,0,66 2 3 this is a line from test2.csv
(AADVyAAAAAMAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,3,0,0,0,0,0,0,0,0 3 1 this is a line from test3.csv
(AADVyAAAAAMAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,3,0,0,0,0,0,0,0,33 3 2 this is a line from test3.csv
(AADVyAAAAAMAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,3,0,0,0,0,0,0,0,66 3 3 this is a line from test3.csv
(AADVyAAAAAMAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,3,0,0,0,0,0,0,0,99 3 4 this is a line from test3.csv
(AADVyAAAAAMAAAAAA Typ=208 Len=17: 4,0,0,213,200,0,0,0,3,0,0,0,0,0,0,0,132 3 5 this is a line from test3.csv
16 rows selected
Then with a join to EXTERNAL_LOCATION$ :
SQL> with ext_loc as (
2 select position-1 as pos
3 , name as filename
4 from sys.external_location$
5 where obj# = ( select object_id
6 from user_objects
7 where object_name = 'TEST_XT' )
8 )
9 select x.filename,
10 t.*
11 from test_xt t
12 join ext_loc x on x.pos = to_number(regexp_substr(dump(t.rowid,10,9,1),'\d+$'))
13 ;
FILENAME REC_ID MESSAGE
marc5.txt 1 this is a line from marc5.txt
marc5.txt 2 this is a line from marc5.txt
marc5.txt 3 this is a line from marc5.txt
marc5.txt 4 this is a line from marc5.txt
test1.csv 1 this is a line from test1.csv
test1.csv 2 this is a line from test1.csv
test1.csv 3 this is a line from test1.csv
test1.csv 4 this is a line from test1.csv
test2.csv 1 this is a line from test2.csv
test2.csv 2 this is a line from test2.csv
test2.csv 3 this is a line from test2.csv
test3.csv 1 this is a line from test3.csv
test3.csv 2 this is a line from test3.csv
test3.csv 3 this is a line from test3.csv
test3.csv 4 this is a line from test3.csv
test3.csv 5 this is a line from test3.csv
Seems to work... assuming the files are always read in the order specified through the LOCATION parameter, and the generated ROWID actually means what I think it means. -
How to get the bound object of an external table with OMB
Hello,
I try to find it but without success. So may be one of you, know this secret information.
I want to synchronize with the help of an OMB script my external tables.
OMBSYNCHRONIZE FLAT_FILE '/MY_PROJECT/MY_FLAT_FILE_MODULE/MY_FLAT_FILE' RECORD 'MY_RECORD' TO EXTERNAL_TABLE 'MY_EXTERNAL_TABLE' \
USE (RECONCILE_STRATEGY 'REPLACE', MATCHING_STRATEGY 'MATCH_BY_OBJECT_ID')For this purpose, I need to know the bound object. When you synchronize with the help of the GUI, you see it easily.
Example:
/MY_PROJECT/MY_FLAT_FILE_MODULE/MY_FLAT_FILE/MY_RECORDI searched in the properties of the external table and I don't see a BOUND OBJECT property.
OMBDESCRIBE CLASS_DEFINITION 'EXTERNAL_TABLE' GET PROPERTY_DEFINITIONS
BAD_FILE_LOCATION BAD_FILE_NAME BUSINESS_NAME DATA_FILES DEPLOYABLE DESCRIPTION
DISCARD_FILE_LOCATION DISCARD_FILE_NAME ENDIAN GENERATE_ERROR_TABLE_ONLY GENERAT
ION_COMMENTS LOAD_NULLS_WHEN_MISSING_VALUES LOG_FILE_LOCATION LOG_FILE_NAME NLS_
CHARACTERSET NUMBER_OF_REJECTS_ALLOWED PARALLEL_ACCESS_DRIVERS PARALLEL_ACCESS_M
ODE REJECTS_ARE_UNLIMITED SHADOW_TABLESPACE SHADOW_TABLE_NAME STRING_SIZES_IN TR
IM UOIDThen I try the BOUND_OBJECT cached properties of a mapping operator but no luck.
OMBRETRIEVE EXTERNAL_TABLE 'MY_EXTERNAL_TABLE' GET BOUND_OBJECT
OMB00001: Encountered BOUND_OBJECT at line: 1, column: 56. Was expecting one of:
"PROPERTIES" ...
"REF" ...
"REFERENCE" ...
"COLUMN" ...
"DEFAULT_LOCATION" ...
"FLAT_FILE" ...
"RECORD" ...
"COLUMNS" ...
"DATA_FILES" ...
"DATA_RULE_USAGES" ...I have already the file and the record with the FLAT_FILE and RECORD properties
OMBRETRIEVE EXTERNAL_TABLE 'MY_EXTERNAL_TABLE' GET FLAT_FILE
OMBRETRIEVE EXTERNAL_TABLE 'MY_EXTERNAL_TABLE' GET RECORDBut how can I get the flat file module:
MY_FLAT_FILE_MODULEDoes anybody know how OWB retrieve this information ?
Thanks in advance and good day
Nico
Edited by: gerardnico on Jan 13, 2010 12:08 PM
Change get the location by get the flat_file_moduleYes, Oleg. It's what's worried me.
The BOUND_OBJECT property of a table operator is not in the API.
OMBDESCRIBE CLASS_DEFINITION 'TABLE_OPERATOR' GET PROPERTY_DEFINITIONS
ADVANCED_MATCH_BY_CONSTRAINT AUTOMATIC_HINTS_ENABLED BOUND_NAME BUSINESS_NAME CO
NFLICT_RESOLUTION DATABASE_FILE_NAME DATABASE_LINK DATA_COLLECTION_FREQUENCY DAT
A_RULES DB_LOCATION DEBUG_BOUND_NAME DEBUG_DB_LOCATION DESCRIPTION DIRECT ENABLE
_CONSTRAINTS ERROR_SELECT_FILTER ERROR_SELECT_ROLL_UP ERROR_TABLE_NAME EVALUATE_
CHECK_CONSTRAINTS EXCEPTIONS_TABLE_NAME EXTRACTION_HINT IS_TEMP_STAGE_TABLE JOIN
RANK KEYS_READONLY LOADING_HINT LOADING_TYPE MATCH_BY_CONSTRAINT OPTIMIZE_MERGE
PARTITION_NAME PEL_ENABLED PRIMARY_SOURCE RECORDS_TO_SKIP REPLACE_DATA ROW_COUNT
ROW_COUNT_ENABLED SCHEMA SINGLEROW SORTED_INDEXES_CLAUSE SUBPARTITION_NAME TARG
ET_FILTER_FOR_DELETE TARGET_FILTER_FOR_UPDATE TARGET_LOAD_ORDER TEMP_STAGE_TABLE
_EXTRA_DDL_CLAUSES TEST_DATA_COLUMN_LIST TEST_DATA_WHERE_CLAUSE TRAILING_NULLCOL
S TRUNCATE_ERROR_TABLE UOID USE_LCR_APIThen I was wondering if anyone knew a little bit the same hidden property but to get the flat file source object of an external table.
Cheers
Nico -
How to spilt files when using DATA UNLOAD (External Table, 10g)?
Hi,
I am runnin 10gR2 and need to export partitions by using data_pump driver
via dmp files (External Tables).
Now as requierment the created files can not exceed 2GB mark.
Some of partitions are larger than that.
How could I split the partition so I could be able to create files smaller than 2GB? Is there any parameter I am not aware of or do I need to do SELECT COUNT(*) FROM source_table PARTITION(partiton_01);
and than to work with ROWNUM?
This example working fine for all partitions samller than 2GB:
CREATE TABLE partiton_01_tbl
2 ORGANIZATION EXTERNAL
3 (
4 TYPE ORACLE_DATAPUMP
5 DEFAULT DIRECTORY def_dir1
6 LOCATION ('inv_xt1.dmp')
7 )
8 PARALLEL 3
9 AS SELECT * FROM source_table PARTITION(partiton_01);You could specify multiple destination files in the LOCATION parameter (the number of files should match the degree of parallelism specified). I am not aware of an option that would allow the external table to automatically add new data files as the partition size increased, so you'd likely have to do some sort computation about the expected size of the dump file in order to figure out how many files to create.
Justin -
External table refere to a file in subfolder location
Hi,
I'm trying to link a external table to a file in a subfolder in a file location in OWB. Is this possible or do i need to make a new connectior for every folder i want to use for an external file?
The server is an AIX server. So for example:
- Location1 is refering to /POS
But i want to use a file located in /POS/BLA
regards,
Osman
Edited by: Ossy81 on Nov 5, 2009 3:39 PMYes. Here the input from user guide:
Describing the Flat File Module
Type a name and an optional description for the flat file module.
Recall that you create a module for each folder in your file system from which you want to sample existing files or to which you want to create new files. Therefore,
consider naming the module based on the folder name. Each file module corresponds to one folder in the file system.
For example, to import flat files from c:\folder1 and a subfolder such as c:\folder1\subfolder,create two file modules such as C_FOLDER1 and C_FODLER1_SUBFOLDER. -
How change NLS_NUMERIC_CHARACTERS parameter for load external table
Hi,
I use this version:
OWB 11gR2
Database 11gR2
Parameter NLS_NUMERIC_CHARACTERS Database ., Instance ,.
When I created database with wizard and in this moment I don't set spanish language, later I changed this parameters in instance parameters.
Now I want load data from a file to external table, but I've an error when I try load data with decimal point.
why does it use the database parameter instead of instance parameter?
Is possible to change this parameter?
Cheers
MarisolAt this moment , this is not possible . You can see metalink note ID 268906.1.
It says:
Currently, external tables always use the setting of NLS_NUMERIC_CHARACTERS
+at the database level.+
Cheers
Marisol
Maybe you are looking for
-
Display MDM key mapping information in EP Item Detail iViews
Hi, in my repository I have the main table 'customer' including key mapping information for several client systems (master data consolidation scenario). The customer data is diplayerd in EP using the Item Details iView. I'd additionally like to displ
-
Check box rendering problem in List.
Hi All, I am using list component in my app and list component allows multiple selections. I am using an itemrenderer having the checkbox and label in hbox. Rendering is working fine. but when I selected three or four items randomly using
-
Hello, i'm using Iphone 5, with ios 7 . I have one old macbook, working with mac osx 10.6.8 and itunes last version updated. Itunes do not synchronize new contacts from my Iphone to my adress book mac. What can i do ?
-
Migration assistant new mac?
I bought a new MacBook Air - when I went to transfer files from my old MacBook - I used Migration Assistant - but both computers just sat looking for another omputer
-
2nd Gen ipod dead/ upgraded to video
I have a 2nd gen ipod that has died. I have since upgraded to an ipod video. Is there some way to retrieve my music from the old 1 so I can load it onto the new 1? Only prob is,I no longer have the PC I originally used to download my music. HELP!!!!