CREATE JOB function_operator_example ADD_MISSING_COLUMNS = true ASINSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAMESELECT1+1AS add_example1,1+2+3AS add_example2,1.1+2.2AS add_example3FROM default_glue_catalog.upsolver_samples.orders_raw_data WHERE time_filter()LIMIT1;
Query result
add_example1
add_example2
add_example3
2
6
3.3000000000000003
Subtraction
Subtracts one number from another.
Examples
SQL
CREATE JOB function_operator_example ADD_MISSING_COLUMNS = true ASINSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAMESELECT1-1AS sub_example1,1-2-3AS sub_example2,2.2-1.1AS sub_example3FROM default_glue_catalog.upsolver_samples.orders_raw_data WHERE time_filter()LIMIT1;
Query result
sub_example1
sub_example2
sub_example3
0
-4
1.1
Negation
Negates the value of a number.
Examples
SQL
CREATE JOB function_operator_example ADD_MISSING_COLUMNS = true ASINSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAMESELECT-1AS neg_example1,- (-1) AS neg_example2,-0AS neg_example3FROM default_glue_catalog.upsolver_samples.orders_raw_data WHERE time_filter()LIMIT1;
Query result
neg_example1
neg_example2
neg_example3
-1
1
0
Multiplication
Multiplies two numbers.
Examples
SQL
CREATE JOB function_operator_example ADD_MISSING_COLUMNS = true ASINSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAMESELECT1*0AS mult_example1,1*2*3AS mult_example2,1.1*2.2AS mult_example3FROM default_glue_catalog.upsolver_samples.orders_raw_data WHERE time_filter()LIMIT1;
Query result
mult_example1
mult_example2
mult_example3
0
6
2.4200000000000004
Division
Divides one number with another.
Note that when dividing integers, the result is truncated, meaning that only the integer portion of the result is returned if the numbers do not divide evenly.
Examples
SQL
CREATE JOB function_operator_example ADD_MISSING_COLUMNS = true ASINSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAMESELECT4/2AS div_example1,4/2/2AS div_example2,3/4AS div_example3,2.2/3.3AS div_example4FROM default_glue_catalog.upsolver_samples.orders_raw_data WHERE time_filter()LIMIT1;
Query result
div_example1
div_example2
div_example3
div_example4
2
1
0
0.6666666666666667
Integer division
Divides one integer from another.
Inputs that are not integers are truncated and then divided.