If you don’t provide an OID for the table then only the specified fields will be gathered:
[[inputs.snmp]]
agents = [ "127.0.0.1" ]
version = 2
community = "public"
[[inputs.snmp.table]]
name = "interface"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifHCInOctets"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifHCOutOctets"