Skip to main content
Version: 0.19.5

Extract

Extract helps you explore and clean your data by allowing you to extract fields from a column that contains date or time values or attributes from a column that contains JSON values. For example, if you had a Date column in your dataset, you could use Extract to calculate and extract which quarter of the year the date is in.

Format

Extract uses two different utterance variations:

  • Extract the <date parts> from <column> and call the output columns <names>
  • Extract attribute <attributes> from <json column>

Parameters

Extract uses the following parameters:

  • date parts. A unit of time or a date, including:
    • Microsecond
    • Millisecond
    • Second
    • Seconds since epoch. The number of seconds that have elapsed since January 1, 1970 (the Unix epoch).
    • Minute
    • Hour
    • Day
    • Day of Week
    • Day of Year
    • Week
    • Month
    • YYYYMM. The year and month. For example, extracting YYYYMM from 4/21/2021 returns 2021-4.
    • Quarter
    • YYYYQ. The year and quarter. For example, extracting YYYYQ from 4/21/2021 returns 2021-2.
    • Year
    • Decade
    • Century
  • attributes. The JSON property to extract.

Output

If the date part or attribute is successfully extracted, a new column is created and appended to the end of the dataset. The updated dataset is then shown in the display panel along with a success message in the chat box.

Otherwise, an error message is shown in the chat box.

Examples

Imagine a dataset called birthdates where each row represents a person and that contains the following columns:

  • Name
  • Age
  • Gender
  • Birthdate (in the format “Month Day, Year”)

To extract the day each person in the dataset was born, enter Extract the day from the column Birthdate and call the output columns Birth Day.

To extract the quarter of the year in which each person was born, enter Extract the quarter from the column Birthdate call the output columns Birth Quarter.