Creating a pretty simple GP service that returns select records from a large dataset. Only need about 8 of the 25 or so columns from the data in the result.
All of the intermediate datasets, and output dataset, are just in memory feature layers.
I'm trying to find a way to have this final output feature layer only include the 8 necessary columns. I've tried setting the unneeded fields to hidden, which is ok up until I look at the json return from the GP service - the hidden fields are there. Delete fields only works on feature classes/shape files etc - this kind of data is not needed for our purposes and requires extra code to ensure they are truncated/appended at each run.
Is there a way using MakeFeatureLayer_management (or anything else that can be in_memory) to simply drop fields, or explicitly say what fields to include?