Removing Headers in eText in BI Publisher - csv

We have a scenario where we should not display the header in the output in CSV using eText template.
Our output looks like this:
Header000001 Header000002
------------ ------------
Adetail1 Bdetail1
Adetail2 Bdetail2
Adetail3 Bdetail3
Desired output is:
Adetail1 Bdetail1
Adetail2 Bdetail2
Adetail3 Bdetail3
We tried all possible options in eText template like removing header section, verifying the data using BI Publisher Desktop tool, verifying logs etc.
We are not getting any error in BI Publisher Desktop tool.
Same question has been posted by somebody some time ago and it was resolved, but solution was not provided.
It would be very helpful if anybody can provide the exact solution.

The header will just be another block in your eText template. You can use the <DISPLAY CONDITION> command to skip printing that block in the output. The display condition command specifies when the enclosed record or data field group should be displayed. The command parameter is a boolean expression. When it evaluates to true, the record or data field group is displayed. Otherwise the record or data field group is skipped. You can just give condition as false, and that block will be skipped.

I have created a template using the provided data xml to output a CSV, without headers. A delimiter based template is used, but the header is not printed.
Access it from here.

Related

Apache NiFi: Mapping an external file to get a new column

I was following the answer in this stack overflow question. But I couldn't get the output I am expecting to get. I have a sample csv, which looks like this:
id,name,city
12,Jimmy,Ontario
33,Kimmel,York
Every city has a unique code, which I have stored in another csv.This is how my csv to be used to map looks like. (I have separated the two values in the row using a tab in the real txt file)
California 5435
Ontario 2342
York 3456
The final output must be like the following:
id,name,city,code
12,Jimmy,Ontario,2342
33,Kimmel,York,3456
This csv has much more data therefore the replacement cannot be achieved by using ReplaceText Processor. So it can be done only by using the ReplaceTextwithMapping Processor.
I have followed the exact steps used as an answer in this question. But it seems like the Replace TextwithMapping is not working as expected. Since a new column is made successfully. But it's just contains the same content of the city column not the codes I want.
Its greatly appreciated if you could submit an answer that I can follow to finally succeed in getting the desired output using ReplaceTextwithMapping Processor
I could make it work kind of using LookupRecord. The overall flow looks like this:
GenerateFlowFile:
LookupRecord:
Configure CSVReader and CSVRecordSetWriter to treat the first line as header line. For the other properties leave the defaults. Configure CSVRecordLookupService:
The mapping file has following content:
city,code
Ontario,2342
California,5435
The LookupRecord processor will take the city value and lookup the proper record from the mapping file. It will extract the code and add the field to the current record. Result:
As you can see the code has been added to the CSV file. However it is enclosed in an object, although I have selected Insert Record Fields setting. I could not solve this problem. This could be another question to ask explicitly.

Query Google Admin User directory comparing parameters

I'm trying to filter my users list by comparing two parameters
query="EmployeeData.EmployeeID=externalId"
EmployeeData.EmployeeID is a custom schema that is populated, with a cron job, with the same value as externalId.
Of course I let the cron do the field copy only if necessary, this is the reason I'm trying to filtering the users list.
In the way i wrote seems that the query trying to looking for a value "externalId" into the EmployeeData.EmployeeID ignoring that "externalId" is a even a field
any suggestion?
The way your code is written, the query sent to Google's servers is as you correctly guessed the following:
EmployeeData.EmployeeID=externalId where your actual externalId is not sent but rather the string "externalId".
To replace this string for the actual value of your variable, you can use what is called "string concatenation" 1. To do it, you just need to modify your code as shown below:
query="EmployeeData.EmployeeID=" + externalId;
This way, the query will be sent as you need to Google's servers.

Send HTML formatted mail from Pentaho

I need to loop through a database table and send a html formatted mail.
Nothing complex, a text value followed by a hyperlink.
I tried with xml and xsl transformation but couldn't get desired results.
ALso, advise on whether its better to construct hyperlink in PostGressql or is it okay from Pentaho
I tried with a Table Input and a Javascript step. Thing is it outputs for each row. i need to combine and concatenate each row output to form result HTML
With Pentaho: get your data with a table input, make the html (for example with a java script), get the mail parameters (addresse, attachement, etc,...) from a grid or a constant step, and give the whole to the mail step.
With the javascript you built a -tag by row named html, but you need only one message. So you group them with a Group by step (no Group field, subject=html, type=Concatenate strings separated by, value=empty). You can then drop it in the Mail step.
But the Mail step needs some more information (recipient, sender, subject, server, port,...). You can put them in the flow with a Constant step.
In view of your use-case, it may surprise you that you have to put this data in the flow rather than to feed a box in the Mail step. This is because this step is designed to send a mail personalized for each recipient.
And now that you know how to do it, refrain from sending 100000 mails to every one you can.

How to get html dynamic table data in response of jmeter

I am using the JMeter for the testing the application.
In the same, I have visited some page where the dynamic table contents should be displayed on the response data in view results.
However except that HTML dynamic table I am able to view the other contents so please help for getting the contents of the dynamic table too.
I have tried to get it using regular expression also have tried to get it with XPath extract. It goes till the <thead> tag, however, doesn't view the values in the <tbody>.
Here I have wanted to get the trains details. As the table is dynamic we should be able to get the values in the response of jmeter. However I am not able to get this contents.
In the same i tried to get the values of the special trains page using XPath so it gives me error of Illegal expression.
Screenshot no.3
I have not used any different library to get the html table data values.
I have tried to get the table contents by using the table it in regular expression
Xpath Query: "/html/body/table/tbody/tr2/td/div"
Reference name: Special_trains
so it gives the output java.net.URISyntaxException: Illegal character in query at index 77: http://enquiry.indianrail.gov.in/ntes/specialTrains.jsp?scrollerDivSpltrn=Not found
In the same the div id is: "scrollerDivSpltrn"
Hence need the answer
You just need to extract the table id properly. Once you are able to extract the that id, you should be able to fetch dynamic table.

SSRS Text Data Output - Header and Details on the same row?

I have turned headers off in the report server config file and am attempting to output the header rows above the details in CSV output. What is happening instead is the header is displaying on the same line as the details. If I add another table with the header row in it, it works, but leaves a one row gap between the header and the content. Any help getting this data to line up correctly would be greatly appreciated.
You could investigate using XSLT to transform the XML output into a desired format. This is really the only option I know of that I've used in the past for making a custom CSV type output. You could then undo the alteration to the server wide (?) config file as the XSLT file would be applied to just that report, making it easier for deployment
http://msdn.microsoft.com/en-us/library/ms159716(v=sql.90).aspx
(Probably more up to date links out there, just Google/Bing "SSRS XSLT" etc)