cancel
Showing results for 
Search instead for 
Did you mean: 

BODS | Flat file with two headers - tech name and field description

0 Kudos

From a Source table or from Query transform, can we generate a file with 2 Headers - Field Name and Field Description.

I want to have load file with 2 headers. Rest of the file would have columns data as usual.

Thanks in advance !

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member208402
Active Contributor
0 Kudos

Hi Rv,

U mean if you have 10 columns in source you want to load only 2 column names (headers) in target and load data as usual?

0 Kudos

Sorry for the Confusion. Suppose you have 3 columns in source, whose Description are only visible in Query Transform or database Design studio. Normally below is the format (Header and data) we generate Load File:

Col_1| Col_2| Col_3

Data_Col_1|Data_Col_2|Data_Col_3

Data_Col_1|Data_Col_2|Data_Col_3


Now requirement is to generate file in below format:


Col_1| Col_2| Col_3

Description_Col_1| Description_Col_2| Description_Col_3

Data_Col_1|Data_Col_2|Data_Col_3

Data_Col_1|Data_Col_2|Data_Col_3


Let me know if it still does not make sense..


Thanks.

Former Member
0 Kudos

Hi Rv,

You can get the description below the header as needed. Consider the description of the columns as the values for those columns.

Basically add one more Query to the design , In first Query (Data) pass the input data as usual and in the second query(Desc) hard code the values for the columns with your description. 

Add a qualifier field in both Queries and let the Qualifier in Desc Query be 1.

Merge the results , sort the output by Qualifier. This will give the Description of Columns below the header and above the actual data set. And the Qualifier field can be removed in the output file.

Thanks,

Senthil

0 Kudos

Hi Senthil,

Thanks for your response.

Even I had used the same logic with row_generation transform, see below snapshot for reference. Was wondering if there is any feature in BODS to pull such data or if we can fetch these details from repository tables. 

Rv

mageshwaran_subramanian
Active Contributor
0 Kudos

Can you check the repository views ALvw_tableATTR / ALvw_ColumnATTR / ALvw_ColumnInfo/AL_ATTR ?.

mageshwaran_subramanian
Active Contributor
0 Kudos

ALVW_COLUMNATTR is what you need