You only need to define column names and types in the build datatable activity.
Now if your datatable is the result of a « read range » excel activity for example, then you don’t need to define any columns, the datatable will take the structure of the excel table.
Can you share a screenshot on the error/warning you’re having and how you are assigning columns?