PHOENIX -- Zac Gallen earned his first win of the season, Starling Marte had two hits and two RBIs and the Arizona Diamondbacks snapped an eight-game losing streak by beating the San Francisco Giants 7-4 on Friday night.