I'm new to Python and I'm trying to do a Export Features tool with the Field mapping only bringing over a handful of the fields. I have ran the tool and then copied the python code into a Notebook and it works. However I was trying to use variables of the location of the input and output database. With the variables the export works with the input and output features, but the field mapping doesn't and it exports ALL the fields. Is there a way when using variables it only exports only the fields I want it to export.
Below are some screenshots that I have come up with.
Variables:

Attempt at Export Features with Variables. I tired the wODB with and without the brackets and neither worked.

Working script when not using any variables.
