The Nissan part # for the knock sensor is 22060-2A000. Rockauto.com has that sensor in NTK (the same company that makes Nissan oxygen sensors and is part of NGK, who makes the OE spark plugs) for $61 or in Standard Motor Products/Intermotor (3-year warranty) for $28.
I'm not sure of the subharness part number. I'm not sure if it's a short, inexpensive harness like that used on the 95-99 Maximas, or if it's part of a bigger and more expensive sub-harness. Rockauto has a pigtail connector, WVE/AIRTEX/Wells # 1P3372, but it's $73. If the pigtail will work for what you need, you may also want to check with WiringSpecialties.com. They have a large number of pigtail connectors and it will probably be cheaper if they have it.
https://www.rockauto.com/en/moreinfo.ph ... 74&jsn=374