Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0811

D toc

Excerpt

Finds the host value from a valid URL. Input values must be of URL or String type and can be literals or column references.

In this implementation, a host value includes everything from the end of the protocol identifier (if present) to the end of the extension (e.g. .com).

D s lang vs sql

D s
snippetBasic

URL literal examples:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value: host('http://www.example.com' ) as: 'myHost'

host('http://www.example.com')


Output:
Returns the value www.example.com

Column reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value: host(myURLs) as: 'myHost'

host(myURLs)

Output: Returns the host values extracted from the myURLs column. 

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value: host(column_url)

host(column_url)


ArgumentRequired?Data TypeDescription
column_urlYstringName of column or String or URL literal containing the host value to extract

D s lang notes

column_url

Name of the column or URL or String literal whose values are used to extract the host value.

  • Missing input values generate missing results.
  • Multiple columns and wildcards are not supported.

D s
snippetusage

 

Required?Data TypeExample Value
YesString literal or column reference (URL)http://www.example.com

D s
snippetExamples

Example - Domain, Host, Subdomain, and Suffix functions

Include Page
EXAMPLE - Domain Functions
EXAMPLE - Domain Functions

D s also
labelother