on 05-04-2005 7:42 AM
Hi all,
We have a situation where a flat file looks somewhat like the following:
name,age
city,country
id,number
dept,wing
now in the flat file the input may vary as shown below....
name,age
city,country
id,number
dept,wing
name1,age1
city1,country1
id1,number1
dept1,wing1
or
name,age
city,country
id,number
dept,wing
name1,age1
city1,country1
name2,age2
city2,country2
or
id,number
dept,wing
id1,number1
dept1,wing1
name,age
city,country
or
name,age
city,country
name1,age1
city1,country1
or
id,number
dept,wing
id1,number1
dept1,wing1
hence in short the (name,age) will always be folllowed by (city,country) and (id,number) by (dept,wing) but the combinations occur in random ie name,age & city,country may come before the id,number & dept,wing or vice versa.
how do we go about in such a scenario.
regards,
ShabZ
Hi Vijay
You should have a key field for each record to identify the type of record.Even thought the combinations are random, the key fields identifies the record and you can create the XML file accodingly.
for eg: key1,name,age
key2,city,country
key3,id,number
key4,dept,wing
key1,name,age
key2,city,country
key3,id,number
key4,dept,wing
key1,name1,age1
key2,city1,country1
key1,name2,age2
key2,city2,country2
Regards
Suneel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The trick lies in defining the source data type.
it may look something like this,
Dt_input
|
Details (0-Unbounded)
|_title (0-Unbounded)
|_name
|_age
|_info(0-Unbounded)
|_city
|_country
|_tag(0-Unbounded)
|_id
|_number
|_node(0-Unbounded)
|_dept
|_wing
and during content conversion, give the recordset as Details and the recordset structure as title,,info,,tag,,node,
and specify the recordset per message as *.
This wud help things out.
Regards,
Shabarish & Prasad.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.