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

...

XY
truetrue
truefalse
falsetrue
falsefalse

Transforms:

d-

...

trans
RawWrangletrue
p03Value'col_and'
Typestep
WrangleTextderive type:single value:(X && Y) as: 'col_and'

...

p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Value(X && Y)
p03NameNew column name
SearchTermNew formula

D trans
RawWrangletrue
p03Value'col_or'
Typestep
WrangleTextderive type:single value:(X || Y) as: 'col_or'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Value(X || Y)
p03NameNew column name
SearchTerm

...

New formula

D trans
RawWrangletrue
p03Value'col_not_and'
Typestep
WrangleTextderive type:single value:!(or) as: 'col_not_and'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Value!(or)
p03NameNew column name

...

SearchTermNew formula

D trans
RawWrangletrue
p03Value'col_not_or'
Typestep
WrangleTextderive type:single value:!(or) as: 'col_not_or'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Value!(or)
p03NameNew column name
SearchTermNew formula

Results:

Your output looks like the following:

...

Column TypeExample TransformOutputNotes
Integer/Decimal

d-

code

trans
RawWrangletrue
Typestep
WrangleTextset col:InRange value:((Input >= 10) && (Input <= 90))
p01NameColumns
p01ValueInRange
p02NameFormula
p02Value((Input >= 10) && (Input <= 90))
SearchTermEdit column with formula

  • Set the value of the InRange column to true if the value of the Input column is between 10 and 90, inclusive.
  • Otherwise, InRange column is false.

 

 

 
Datetime

d-

code

trans
RawWrangletrue
p03Value((Date >= DATE(2014, 01, 01)) && (Date <= DATE(2014, 12, 31))
Typestep
WrangleTextdelete row: ((Date >= DATE(2014, 01, 01)) && (Date <= DATE(2014, 12, 31))
p01NameCondition
p01ValueCustom formula
p02NameType of formula
p02ValueCustom single
p03NameCondition
p04ValueDelete matching rows
p04NameAction
SearchTermFilter rows

Delete all rows in which the Date value falls somewhere in 2014. 
String

d-

code

trans
RawWrangletrue
Typestep
WrangleTextderive type:single value:((LEFT(USStates,1) == "A") && (RIGHT(USStates,1) == "A"))
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Value((LEFT(USStates,1) == "A") && (RIGHT(USStates,1) == "A"))
SearchTermNew formula

For U.S. State names, the generated column contains true for the following values:

  • Alabama
  • Alaska
  • Arizona

For all other values, the generated value is false.

 

...

Column TypeExample TransformOutputNotes
Integer/Decimal

d-

code

trans
RawWrangletrue
Typestep
WrangleTextset col:BigOrder value:((Total > 1000000) || (Qty > 1000))
p01NameColumns
p01ValueBigOrder
p02NameFormula
p02Value((Total > 1000000) || (Qty > 1000))
SearchTermEdit column with formula

  • In the BigOrder column, set the value to true if the value of Total is more than 1,000,000 or the value of Qty is more than 1000.
  • Otherwise, the value is false.
 
Datetime

d-

code

trans
RawWrangletrue
p03Value((Date <= DATE(1950, 01, 01)) || (Date >= DATE(2050, 12, 31))
Typestep
WrangleTextdelete row: ((Date <= DATE(1950, 01, 01)) || (Date >= DATE(2050, 12, 31))
p01NameCondition
p01ValueCustom formula
p02NameType of formula
p02ValueCustom single
p03NameCondition
p04ValueDelete matching rows
p04NameAction
SearchTermFilter rows

Delete all rows in the dataset where the Date value is earlier than 01/01/1950 or later than 12/31/2050. 
String

d-

code

trans
RawWrangletrue
p03Value'good_car'
Typestep
WrangleTextderive type:single value:((Brand == 'subaru') || ('Color' == 'green')) as:'good_car'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Value((Brand == 'subaru') || ('Color' == 'green'))
p03NameNew column name
SearchTermNew formula

  • Generate the new good_car column containing true if the Brand is subaru or the Color is green.
  • Otherwise, the good_car value is false.
 

...

Column TypeExample TransformOutputNotes
Integer/Decimal

d-

code

trans
RawWrangletrue
p03Value!((sqft < 1300) && (bath < 2) && (bed < 2.5))
Typestep
WrangleTextkeep row:!((sqft < 1300) && (bath < 2) && (bed < 2.5))
p01NameCondition
p01ValueCustom formula
p02NameType of formula
p02ValueCustom single
p03NameCondition
p04ValueKeep matching rows
p04NameAction
SearchTermFilter rows

Keep all rows for houses that do not meet any of these criteria:

  • smaller than 1300 square feet, 
  • less than 2 bathrooms, 
  • less than 2.5 bedrooms.
 
Datetime

d-

code

trans
RawWrangletrue
p03Value!(YEAR(Date) == '2016')
Typestep
WrangleTextkeep row:!(YEAR(Date) == '2016')
p01NameCondition
p01ValueCustom formula
p02NameType of formula
p02ValueCustom single
p03NameCondition
p04ValueKeep matching rows
p04NameAction
SearchTermFilter rows

Keep all rows in the dataset where the year of the Date value is not 2016. 
String

d-

code

trans
RawWrangletrue
p03Value!(status == 'Keep_It')
Typestep
WrangleTextdelete row:!(status == 'Keep_It')
p01NameCondition
p01ValueCustom formula
p02NameType of formula
p02ValueCustom single
p03NameCondition
p04ValueDelete matching rows
p04NameAction
SearchTermFilter rows

Delete all rows in which the value of the status column is not Keep_It.

 

...