Based on your description that a subset of columns is empty for all rows of the data:
You need to do very little. Xcalar will naturally handle this scenario by intentionally ignoring the unused fields. When a batch dataflow executes, Xcalar's optimizer will identify the "fields of interest" and only import those select fields which are necessary. The unused fields will be omitted because they are irrelevant. No resources will be spent to move or store the unused fields.
Only if you are memory-constrained during the modeling phase will a UDF be warranted. An import UDF could be employed to restrict the number of columns when the dataset is created, however that filtering is unnecessary when the dataflow is operationalized because Xcalar will naturally ignore the columns because they are not needed.