Skip to content

Instantly share code, notes, and snippets.

@ldenson11
Created October 28, 2019 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ldenson11/cbf4d25aee796ef5db4c5febb925b83e to your computer and use it in GitHub Desktop.
Save ldenson11/cbf4d25aee796ef5db4c5febb925b83e to your computer and use it in GitHub Desktop.
-- job to identify and route military aircraft to ML pipeline
SELECT a.icao as _eventKey, -- New Kafka partition key
a.lat, b.lon, b.mfr, b.model, b.type_acft
FROM airplanes
JOIN airplanes_registrations
ON a.icao = b.icao
WHERE a.type_registrant = 5 -- Government registration
AND country <> 'US' -- US registrations only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment