Finds the value a subdomain value from a valid URL. Input values must be of URL or String type. |
http://
or https://
, for example). URL literal example:
derive type:single value: SUBDOMAIN('http://www.example.com' ) as: 'myDomain' |
Output: Generates a column containing the value www
.
derive type:single value: SUBDOMAIN('http://www.exampl.e.com') as: 'myDomain' |
Output: Generates a column containing the value www.exampl
.
Column reference example:
derive type:single value: SUBDOMAIN(myURLs) as: 'myDomain' |
Output: Generates the new myDomain column containing the subdomain values extracted from the myURLs
column.
derive type:single value: SUBDOMAIN(column_url) |
Argument | Required? | Data Type | Description |
---|---|---|---|
column_url | Y | string | Name of column or String or URL literal containing the sub-domain value to extract |
Name of the column or URL or String literal whose values are used to extract the subdomain value.
Required? | Data Type | Example Value |
---|---|---|
Yes | String literal or column reference (URL) | http://www.example.com |