Module 5 Filtering and formatting data Flashcards

1
Q

what does the eval command allow you to do?

A

It allows you to calculate and manipulate field values in your report
eval fieldname1= expression1 [, eval fieldname2 = expression2…]
- calculate expressions
-place the results in a field
-use that field in searches or other expressions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

where are the results of eval command written?

A

in either a new or existing field that yo have specified

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what happens if the destination field of the eval command already exists?

A

the results of the eval replace the existing field..

The index values of the field are not modified

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

are field values of eval command treated in a case-sensitive manner?

A

yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what type of functions does the eval command use?

A

Arithmetic +-*/%
Concatenation + .
Boolean AND OR NOT XOR
Comparison < > <= >= != = == LIKE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what does the round function perform with the eval command

A

it rounds the number to the decimal points you specify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what happens when you don’t specify the decimal points to round to when using the round function with the eval command?

A

It rounds to a whole number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how do you add or remove fields

A

fields - or fields + function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what does the tostring function do?

A

it converts a numeric filed to a value string

tostring(field, “option”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what are the tostring Options?

A
  • “commas” if the number includes decimals it rounds to 2 decimal places
  • “duration” formats the numbers as “hh:mm:ss”
  • “hex” formats the number in hexadecimal
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

True or False

eval with added characters converts numeric field values to string?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

when wanting to sort numerically using eval what do you do first?
A. eval then sort
B. sort then eval

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Can multiple expressions be combined into one eval command?

A

Yes,
each subsequent expression references the results of the previous expression
Expressions must be separated by commas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how many arguments does the if function take with the eval command?

A

3
if(X,Y,Z)
if X evaluates to TRUE, the result evaluates the second argument, Y
if X evaluates to FALSE, the result evaluates the third argument, Z
non-numeric values must be enclosed in “double quotes”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

using the eval command are filed values treated in case-sensitive or non case-sensitive manner?

A

case sensitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

case function with the eval command….
case (X1,Y1,X2,Y2….)
what happens if the x1 argument which is a boolean expression evaluates as FALSE?

A

the next Boolean expression which is X2 is then evaluated etc etc

17
Q

what functions do the search and where commands perform?

A

They both filter results

18
Q

the like operator as part of the eval command what character is used for multiple characters?

A

%
use () for a single character
| stats count by src_ip like “10
.%”
| where

19
Q

what does fillnull command do

A

replace null values in fields
fillnull value=NULL
if no value=clause then the replacement value is 0