I would like the VTU file to set the color bar to “Paraview → Rainbow” and set the the “Color By:” to some dataset in the file.
A dataset can not specify how it should be seen. But if you are talking about ParaView Glance, you can export a
*.glance file which can capture the application state and therefore how each field should be rendered. Please look for previous posts on that subject as many information have been share on how to reference a remote dataset rather than embedding it in the file.