Gilbert Jimenez is on trial for assault on a peace officer for the January 2008 incident.
Prosecutors showed the knife they say he used to attack a member of an auto theft task force.
The officer says he confronted Jimenez in a northeast Fresno parking lot.
We can't show his testimony because he works undercover, but the officer says Jimenez came at him aggressively.
He says Jimenez first tried to punch him,
"At some point, he came out with a knife and tried to stab me in the face," Corben Whitney said.
Another officer fired three shots at Jimenez, but he managed to drive away before crashing his car a few miles away.
His defense attorney says as a knife was not used. He claims his client was set up after the accident.