Sounds like you're using the .csv exploded export. Based on my reading of the documentation, I don't believe there's a way to force the headers to appear if the entire column is blank. My advice would be to add an intermediate processing step. One option would be to alter the .csv file directly to append the missing column headers.
Consider the following sample .csv file:
FirstName,LastName,City
John,Doe,Seattle
Bob,Smith,Vancouver
The following C# can then make an appropriate transformation. This uses the CsvHelper class for the work.
void Main()
{
var inFile = @"\path\to\input\file.csv";
var outFile = @"\path\to\output.csv";
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
{
MissingFieldFound = null,
HeaderValidated = null
};
var records = new List<ReltioFormat>();
using (var reader = new StreamReader(inFile))
using (var csv = new CsvReader(reader, config))
{
records = csv.GetRecords<ReltioFormat>().ToList();
}
using (var writer = new StreamWriter(outFile))
using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture))
{
csv.WriteRecords(records);
}
}
public class ReltioFormat
{
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
public string City { get; set; }
}
The output file then looks like this
FirstName,MiddleName,LastName,City
John,,Doe,Seattle
Bob,,Smith,Vancouver
------------------------------
Trevor Burn
Assent
------------------------------
Original Message:
Sent: 04-17-2024 06:14
From: Sridhar Raju
Subject: Reltio Export Issue - Dynamic headers based on the data availability in entities
We are facing an issue while trying to export profiles from Reltio using RIH.
Let us assume there are 30 attributes in an entity like Customer, only 25 attributes values are populated and 5 are blank.
Upon export, the attributes information that are blank are not part of the output file. Looks like this is the standard behavior of the export.
We would like to export all the attributes of an entity in the header file and would like to have the data get populated in the export file irrespective of values are present in the entity or not.
Since the export is generated based on the availability of values in the attributes, the header is dynamic based on the data availability in the attributes of the entity.
The export generated will be used by a downstream to ingest the data into their application and since the header is dynamic, the output generated file format is inconsistent.
For ex : For simplicity sake, Customer is the entity and it has 4 attributes configured in Reltio.
FirstName, MiddleName, LastName, City
Only FirstName, LastName, City is always populated. The output generated is skipping the MiddleName altogether , however the downstream is expecting Middlename to be available irrespective whether it is blank or populated.
Please let us know how to address the dynamic behavior@ of Reltio export so that generated output is consistent with the attributes configured in Reltio.
------------------------------
Sridhar Raju
Manager
PricewaterhouseCoopers
------------------------------