Monday, 2 December 2024

Generate Empty File in BI Publisher Bursting sql returns no data

 Currently there is no supported method for that. The workaround is to make sure that your sql will always return at least one record.

You could accomplish this by adding a union to your sql that will always return one row if the main sql returns no data.

We have provided a sample select that you may use as guidance:


We have modified the Data Model main sql in such a way that it will always return a record when the main sql returns no data. This will prevent the report job from failing and, at the same time, the bursting will not send out the email out as the party_site_id is equals to -999, which does not meet the bursting sql criteria.


SELECT s.vendor_id,

  s.vendor_name,

  ps.party_site_name ,

  ps.party_site_id

FROM fusion.poz_suppliers_v s,

  fusion.hz_party_sites ps

WHERE s.party_id = ps.party_id

UNION

SELECT 1,

  '2' ,

  '3' ,

  -99999

FROM dual

WHERE NOT EXISTS

  (SELECT 1

  FROM fusion.poz_suppliers_v s,

    fusion.hz_party_sites ps

  WHERE s.party_id = ps.party_id

  );



Reference link : Doc ID 1925999.1

No comments:

Post a Comment