Ideas

Treasure Data's primary idea portal. 

Submit your ideas & feature requests directly to our product requirements team! We look forward to hearing from you.

Support 2-letter abbreviation for TD_LAT_LONG_TO_COUNTRY()

Support 2-letter abbreviation for TD_LAT_LONG_TO_COUNTRY() UDF.

 

Currently, TD_LAT_LONG_TO_COUNTRY('POSTAL_ABBREVIATION',37, -122) would retrieve either a 1 letter or 2 letter abbreviation.

  • Sri Ramana
  • Feb 23 2017
  • David Borsos commented
    February 24, 2017 12:40

    In the end I couldn't use the postal abbreviation because it was not in line with the standard iso codes.
    The country name was the only version that was identical in each "*_TO_COUNTRY_*" type of functions, ISO2 and ISO3 codes would be also nice to have as majority of 3rd party systems use the ISO2 code.

    ISO2 -> ISO 3166-1 alpha-2
    ISO3 -> ISO 3166-1 alpha-3