Normalize text field or sort values

Hello so I am trying to "normalize" data so that it will upload correctly into a postgreql db.
The problem I am running into is that I formatted my db to injest the data in the order of which it is normalized.
However in certain data sets several fields of information are not available, so when I normalize those with my script it gets thrown off, and the values are not injested into the correct column in the DB.
So the options I have are

  1. when I normalize the information, sort it so the first fields are the ones that are always present or
  2. When i normalize the information insert the ,, for the missing fields in order to keep everything in the correct column.
    Either way I have no idea how to do this and would appreciate any suggestions.
    THANK YOU SO MUCH FOR YOUR TIME
  1. Could you please clarify?
    injest => ingest
    normalize => sort ?

  2. Could you provide a short example of your input data?

  3. Could you provide your script trial?
    If you run it on the example input data, would goes wrong?