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 next
Excerpt

You can extract one or more values from within a column of values can turn data into meaningful data. This section describes how to extract object elements by the following transformation.

Source:

For example, suppose your restaurant dataset includes a set of characteristics in the restFeatures column in the following JSON format, from which you are interested in the total number of seats in the restaurant.

...

D trans
p03ValueCounterSeats
Typestep
p01NameColumn
p01ValuerestFeatures
p02NamePaths to elements
p02ValueTotalTableSeats
p03NamePaths to elements
p04ValueSelected
p04NameInclude original column name
SearchTermUnnest Objects into columns

Results:

restFeatures_TotalTable SeatsrestFeatures_CounterSeats
368

After converting into separate columns, you can perform a simple sum of the TotalTableSeats and CounterSeats columns to determine the total number of seats in the restaurant.

The final table looks like the following:

restFeatures_TotalTable SeatsrestFeatures_CounterSeatsTotalSeats_Restaurant
36844