Anyone who has created dynamic workflows where the upstream tools might change has done the following pattern of tools where you have some text input that you select 0 rows from that forces Alteryx's metadata engine to have the fields and dtypes in all downstream tools. I got sick of this especially when developing and the fields could be changing frequently, so I have created a macro to cache the metadata of a workflow in case it disappears from upstream tools. This macro id placed in line with the data stream and will force the metadata to remain as the tool configuration below does.

Configuration:
Remove fields that don't exist on run:
This option determines if the fields specified will be output in the case where they don't appear in the macro input data stream. If ticked, they will be removed from the output data if they don't exist but when the metadata is refreshed, they will appear in the metadata again. if unticked fields will always appear in output but with the value of NULL if that field doesn't exist in macro input.
Input Field Metadata (1 per Line Field:DataType:Size[Optional]):
This text box is where you can specify what fields you would like to appear in the outputs metadata, it will also pass through any that exist in the macro input data stream. Each line should be one field with the data type and optionally the size (For certain data types if the size is wrong it will cause an error in macro if uncertain leave size off).
If no dtype is provided will default to V_string
Dtypes supported with example string and size:
Field1:Bool:1
Field2:Byte:1
Field3:Int16:2
Field4:Int32:4
Field5:Int64:8
Field6:FixedDecimal:19.6
Field7:Float:4
Field8:Double:8
Field9:String:16384
Field10:WString:16384
Field11:V_String:2147483647
Field12:V_WString:1073741823
Field15
19
Field13:Date:10
Field14:Time:8
Field16:SpatialObj:2147483647
Example valid input string:
Name:String:255
Description:V_String
Starting_Date:Datetime
ID:Int32
Name:String
Value:Float
Discount:Float
Location ID: Int64
Input Example:

Resulting Output

MetaDataString:
The second output (M) will output a string that contains the metadata text for the current input, this can be copied over to the macros configuration to keep it for any future runs

I have tried to test under many different configurations, but this is a new macro so there might be issues with it. If you encounter any or would like to provide any feedback please post below and I will try to respond asap.