oracle - Have dynamic columns in external tables -


my requirement have use single external table in store procedure different text files have different columns.

can use dynamic columns in external tables in oracle 11g? this:

create table ext_table  select * tbl_test                               organization external (                 type  oracle_loader                 default directory  dataload                 access parameters(                                 records delimited  newline                 fields  terminated '#'                 missing field values null                 )                 location ('apd.txt')               )               reject limit unlimited; 

the set of columns defined external table, set of columns defined regular table, must known @ time external table defined. can't choose @ runtime determine table has 30 columns today , 35 columns tomorrow. potentially define external table have maximum number of columns of flat files have, name columns generically (i.e. col1 through col50) , move complexity of figuring out column n of external table particular field etl code. it's not obvious, though, why more useful creating external table definition properly.

why there requirement use single external table definition load many differently formatted files? not seem reasonable.

can drop , re-create external table definition @ runtime? or violate requirement single external table definition?


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -