Data streams and Analyzers

When we create an index, we can add a custom analyzer to text fields. Can we do the same in a datastream?

As you do not control the creation of data stream indices you need to enforce mappings through an index template.

Thank you, I will try this way