Tools

Great Expectations Semantic Types Expectations

ID greatexpectations

other

A contributed package of custom expectations for Great Expectations, the Python data validation framework. Each expectation asserts that the values of a column are valid for one semantic type, using a regular expression or a helper library such as python-stdnum, schwifty, phonenumbers, pycountry or geonamescache; a few call online services. The expectations live in the package's expectations folder in the Great Expectations repository and are not part of the core library.

Website
https://github.com/fivetran/great_expectations/tree/develop/contrib/great_expectations_semantic_types_expectations
Supported types
63

Supported semantic types

IDNameCategoriesCountriesDescription
arxiv_id arXiv identifier draft science, publishing global Identifier of a preprint in arXiv. Since 2007 it is YYMM.NNNNN (four digits before 2015); older papers use the archive name and a...
bic SWIFT/BIC code draft finances global Datatype for 'SWIFT/BIC code' (bic) from rules in context 'finances'.
bitcoin_txid Bitcoin transaction ID (txid) draft cryptocurrency global Identifier of a Bitcoin transaction: the double SHA-256 hash of the serialized transaction without its witness data, written as 64...
city City PII geo, pii, common global A city is a large human settlement. It can be defined as a permanent and densely settled place with administratively defined boundaries...
colorhextriplet Color hex triplet (web color) pattern common global Web colors are colors used in displaying web pages on the World Wide Web, and the methods for describing and specifying those colors....
country Country code or name geo global A country is a distinct territorial body or political entity. It may be an independent sovereign state or part of a larger state,[2] as...
countrycode_alpha2 ISO 3166-1 Alpha2 country code pattern geo global ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the...
countrycode_alpha3 ISO 3166-1 Alpha3 country code pattern geo global ISO 3166-1 alpha-3 codes are three-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the...
countrycode_num ISO 3166-1 Numeric code (country code) pattern geo global ISO 3166-1 numeric (or numeric-3) codes are three-digit country codes defined in ISO 3166-1, part of the ISO 3166 standard published by...
cryptocurrency_ticker Cryptocurrency ticker symbol draft cryptocurrency, finances global Short code of a cryptocurrency or token used by exchanges, wallets and price services, such as BTC for Bitcoin or ETH for Ether. No...
date Date datetime global Calendar date. The regexp covers the ISO 8601 extended form YYYY-MM-DD; other notations, such as DD.MM.YYYY, are patterns of this datatype.
doi Digital Object Identifier (DOI) science, identifiers global A digital object identifier (DOI) is a persistent identifier or handle used to identify objects uniquely, standardized by the...
ean European Article Number (EAN-13, EAN-8) gs1, objectids global GS1 barcode number of a trade item, the form of the GTIN printed under EAN-13 and EAN-8 barcodes on retail goods, books, music releases...
email Email address PII common, internet, pii global Address of an electronic mailbox in the form local-part@domain, defined in section 3.4.1 of RFC 5322. The local part names the mailbox,...
encountryname Country name (English) pattern geo global Name of the country in English
ethereum_address Ethereum address cryptocurrency global Address of an Ethereum account or contract: 0x followed by 40 hexadecimal digits, the last 20 bytes of the Keccak-256 hash of the public...
euvat EU VAT number (VIES format) PII finances EU VAT identification number of a business registered for VAT in a European Union member state, in the compact form that the VIES system...
fips10_4 FIPS 10-4 country or region code draft geo global Two-letter code of a country, optionally followed by two characters for a first-level subdivision, from the US standard FIPS 10-4,...
fips64 FIPS 6-4 numeric code (US counties) geo US Identifier for US entities (mostly counties) per "Federal Information Processing Series" (FIPS 6-4), used for counties, Puerto Rico zona...
gtin Global Trade Item Number 14 industry, objectids, gs1 global Global Trade Item Number (GTIN-14) written as a GS1 element string with Application Identifier (01): '01' followed by the 14 digits of...
hexcolor sRGB color hex triplet (hex color) pattern common global Color written as a hexadecimal sRGB triplet, for example #1F5FBF.
http_status_code HTTP status code draft internet global Three-digit code with which an HTTP server reports the result of a request. The first digit gives the class: 1xx informational, 2xx...
ianatimezoneid IANA Timezone ID pattern datetime global Time zone identifier from the IANA time zone database (tz database), in Area/Location form, for example Europe/London.
iban International Bank Account Number finances global The International Bank Account Number (IBAN) is an internationally agreed system of identifying bank accounts across national borders to...
icd10 Identifier in the ICD catalogue codes for diseases - Version 10 (ICD-10) medical global ICD-10 is the 10th revision of the International Statistical Classification of Diseases and Related Health Problems (ICD), a medical...
imdb_id IMDb ID draft media, objectids global Identifier of a page in the Internet Movie Database: a two-letter prefix and seven or eight digits. tt is a title (film, series, episode...
imei International Mobile Equipment Identity (IMEI) PII telecom, pii global Number that identifies a mobile device of 3GPP networks (GSM, UMTS, LTE, 5G) and of some satellite networks. It has 15 digits; the...
imsi International Mobile Subscriber Identity (IMSI) PII telecom, pii global Number stored on a SIM card that identifies a subscription in a mobile network (3GPP TS 23.003, ITU-T E.212). It starts with the 3-digit...
ipv4 IPv4 address PII internet, pii global 32-bit address of Internet Protocol version 4 (RFC 791), written in dotted-decimal notation as four numbers from 0 to 255, such as...
ipv6 IPv6 address PII internet, pii global 128-bit address of Internet Protocol version 6, written as eight groups of up to four hexadecimal digits separated by colons (RFC 4291,...
isan International Standard Audiovisual Number (ISAN) draft media global ISO 15706 identifier of audiovisual works, such as films and episodes. It is hexadecimal: a 12-digit root and a 4-digit episode or part,...
isbn International Standard Book Number (ISBN) publishing, objectids global ISO 2108 identifier of a book edition, in either of its two forms: the 10-character ISBN used until 2007, whose last character is a...
isbn10 International Standard Book Number 10-digits (ISBN10) objectids, publishing global 10-digit International Standard Book Number, used for books published before 2007. The last character is a check digit (0-9 or X).
isbn13 International Standard Book Number 13-digits (ISBN13) objectids, publishing global 13-digit International Standard Book Number, used since 2007. It starts with the prefix 978 or 979.
isin International Securities Identification Number finances global An International Securities Identification Number (ISIN) uniquely identifies a security. Its structure is defined in ISO 6166. The ISIN...
ismn International Standard Music Number (ISMN) draft publishing, media global ISO 10957 identifier of notated (printed) music. The current form has 13 digits starting with 979-0; the older 10-character form starts...
iso4217curcode ISO 4217 Currency code pattern draft finances global ISO 4217 Currency code
iso639_1 ISO 639-1 language code (two letters) pattern draft common global Two-letter code of a language from ISO 639-1, such as en (English), de (German) or ja (Japanese). About 180 languages have such a code....
iso639_2 ISO 639-2 language code (three letters) pattern draft common global Three-letter code of a language from ISO 639-2, such as eng (English) or rus (Russian). About twenty languages have two codes: a...
language Language draft common global Human language written as a name, such as English, Deutsch or allemand (German in French), or as a code. Codes have their own patterns:...
mac_address MAC address (Media Access Control) PII internet, identifiers, pii global 48-bit hardware address (EUI-48) of a network interface in Ethernet, Wi-Fi, Bluetooth and other IEEE 802 networks, used to deliver...
md5hash MD5 hash cryptography, software global Digest of the MD5 hash function (128 bits), often used as a checksum of a file or as a record fingerprint. MD5 is not...
meid Mobile Equipment Identifier (MEID) PII draft telecom, pii global 56-bit identifier of CDMA mobile devices that replaced the 32-bit ESN (esn). It is written as 14 hexadecimal characters or as an...
miccode Market Identifier Code (ISO 10383) finances global This International Standard specifies a universal method of identifying exchanges, trading platforms, regulated or non-regulated markets...
mimetype Media type (MIME type) common, internet global Two-part identifier of a data format, type/subtype, such as text/html, image/png or application/vnd.ms-excel, defined by RFC 6838 and...
openlibid Open Library ID objectids global Identifier for a work ("W"), edition ("M") or author ("A") for book data of the Internet Archive
orcid Open Researcher and Contributor ID (ORCID) science, persons global The ORCID, Open Researcher and Contributor ID) is a nonproprietary alphanumeric code to uniquely identify authors and contributors of...
p2pkhaddr Bitcoin P2PKH address cryptocurrency global Legacy Bitcoin address of the pay-to-public-key-hash (P2PKH) type. It is the Base58Check encoding of the version byte 0 and the 20-byte...
p2shaddr Bitcoin P2SH address cryptocurrency global Bitcoin address of the pay-to-script-hash (P2SH) type, defined by BIP 13 and BIP 16. It is the Base58Check encoding of the version byte...
p2wpkhaddr Bitcoin P2WPKH address (native SegWit, bc1q) cryptocurrency global Native SegWit address of the pay-to-witness-public-key-hash (P2WPKH) type: witness version 0 with a 20-byte public key hash (BIP 141),...
phone Phone number PII pii, common, telecom global Telephone number in standard format (RFC3966), without 'tel:' prefix
price Price (money) draft values, common global Price of something, sub-type of money
roman_numeral Roman numeral draft values global Number from 1 to 3999 written in Roman numerals, with the letters I, V, X, L, C, D and M in the standard subtractive form, where IV is 4...
sha1hash SHA-1 hash cryptography, software global Digest of the SHA-1 hash function (160 bits), used for example as a Git object id or a file checksum. SHA-1 is no longer considered...
swiftcode Bank SWIFT code (ISO 9362) finances global ISO 9362 defines a standard format of Business Identifier Codes (also known as SWIFT-BIC, BIC, SWIFT ID or SWIFT code) approved by the...
temperature Temperature draft values, science, environment global A measured or set temperature, such as an air, water or body temperature reading. Datasets store it as a number in degrees Celsius,...
tld Top level domain (TLD) internet global Last label of a domain name, the level directly below the DNS root, such as com, org, ru or de. Country-code TLDs have two letters and...
upc Universal Product Code (UPC) by field name draft gs1 global Universal Product Code (UPC) by field name code
url Uniform Resource Locator (URL) common, internet global Address of a resource on a network that also says how to retrieve it: a scheme such as https, a host, an optional port, a path, a query...
uscounty US County draft geo US Name or code of US County
usssn US Social Security Number PII pii, persons US In the United States, a Social Security number (SSN) is a nine-digit number issued to U.S. citizens, permanent residents, and temporary...
usstate US State draft geo US Name or code of US State
uuid Universally unique identifier (UUID) identifiers global 128-bit identifier that systems generate without a central registry, defined by RFC 9562 (2024), which replaced RFC 4122. Microsoft...

Use this record