Skip to content

Instantly share code, notes, and snippets.

@timrobertson100
Created July 20, 2015 12:57
Show Gist options
  • Save timrobertson100/9197460dadb28d0b442c to your computer and use it in GitHub Desktop.
Save timrobertson100/9197460dadb28d0b442c to your computer and use it in GitHub Desktop.
Names export for OBIS
create table tim.name_export
row format delimited fields terminated by '\t' as
select datasetKey, kingdom, family, scientificName, taxonKey, count(*) as numRecords
from prod_b.occurrence_hdfs
where
datasetKey is not null and
kingdom is not null and
speciesKey is not null and
scientificName is not null and
family is not null and
taxonKey is not null
group by
datasetKey, kingdom, family, scientificName, taxonKey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment