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 r097

D toc

Excerpt

Extracts the query parameters of a URL into an Object. The Object keys are the parameter's names, and its values are the parameter's values. Input values must be of URL or String type.

This function is part of a set of functions for processing URL data.

D s lang vs sql

D s
snippetBasic

URL literal examples:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:urlparams('http://example.com?color=blue&shape=square' ) as: 'myURLParams'

urlparams('http://example.com?color=blue&shape=square')


Output:
Returns the following Object:

Code Block
{"color": "blue","shape": "square"}

Column reference example:

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

urlparams(myURLs)

Output: Returns the query parameters extracted from the URLs in the myURLs column. 

D s
snippetSyntax

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

urlparams(column_url)


ArgumentRequired?Data TypeDescription
column_urlYstringName of column or String or URL literal containing the parameters and their values to extract

D s lang notes

column_url

Name of the column or URL or String literal containing the query parameters and their values to extract.

  • 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?q1=hello&q2=goodbye

D s
snippetExamples

Example - Domain, Subdomain, Host, and Suffix functions

Include Page
EXAMPLE - Domain Functions
EXAMPLE - Domain Functions

D s also
labelother