ummm.... theres no knock sensor on either of those motors that i know of. where is the sensor you're talking about?
the map sensor on the a6 is on the firewall. the map sensor on the z6 is on the throttle body. you can use the stock wiring harness connector from your car's wiring harness. just pull it out of the wire loom and connect it to the map sensor on the z6 TB.