The problem with the macro economic data is that it's a single value. Factors were originally designed to provide a separate value for a list of assets. With the advent of multiple pipelines, it may be convenient to use a separate pipeline for all the macro data and supply a screen like 'SPY' therefore returning only a single asset with all the associated data values. Anyway, to use the macro data one needs to create a simple custom factor.
# To use the single value datasets (ie ones that don't have a value for each asset)
# one needs to ceate a simple custom factor
class LatestMacroEconomic(CustomFactor):
window_length = 1
def compute(self, today, asset_ids, out, values):
out[:] = values[-1]
See attached notebook. Good luck.