• Post category:BI Publisher
  • Post comments:0 Comments
  • Post last modified:June 9, 2023
  • Reading time:4 mins read
You are currently viewing How to generate pipe delimited output from BI Report using a dummy template?

In this article, we will try to generate pipe-delimited output from BI Report by using a dummy template

Normally, we will create an etext template and explicitly mention the pipe delimiter after each column and then upload the etext template to generate the pipe delimited output.

Let’s consider a simple data set to pull the action information

SQL Query:

SELECT B.ACTION_TYPE_ID,B.ACTION_TYPE_CODE,T.MEANING,B.BUSINESS_GROUP_ID
FROM PER_ACTION_TYPES_B B, PER_ACTION_TYPES_TL T
WHERE B.ACTION_TYPE_ID = T.ACTION_TYPE_ID
image 11 - How to generate pipe delimited output from BI Report using a dummy template?

Let’s create a report with a dummy template.

Dummy Template – It could be blank or anything. We will be just using it as a medium to generate output file and we will not get the content of this template on the output.

image 14 - How to generate pipe delimited output from BI Report using a dummy template?
image 15 1024x286 - How to generate pipe delimited output from BI Report using a dummy template?

Now, lets go to the Report properties > formatting tab

Search for the CSV and modify the attributes like below:

image 13 - How to generate pipe delimited output from BI Report using a dummy template?

Click OK and then save it.

Now, go to the view list and select the “Data (CSV)” as output format and then select it as default output format.

image 16 1024x351 - How to generate pipe delimited output from BI Report using a dummy template?

Now click on save.

Click on View Report.

Here is how the output will look like with pipe delimiter:

image 17 - How to generate pipe delimited output from BI Report using a dummy template?

Attributes with values having a space character will be enclosed in double quotes.

We are using the seeded CSV functionality over here to generate comma-separated text, however, we are overriding the delimiter to pipe.

Advantage with this approach is it is very easy to generate the pipe delimited output.

Drawbacks using this approach is like we cannot modify the sequence of fields, add header, etc. If there are any input parameters, then those would also get added to the output at the beginning of the file for each row.

Based on your requirement you can use this approach if the file format is straightforward, else go with the etext template and customize the output as per the need.

We can also use similar delimiter Semicolon(;), Tab(\t), Pipe(|), Comma(,)