Complete the code to load data from the file 'input.txt'.
data = LOAD '[1]';
The LOAD command reads data from the specified file. Here, we want to load from 'input.txt'.
Complete the code to filter records where the age field is greater than 30.
filtered_data = FILTER data BY [1] > 30;
The FILTER command keeps only records where the condition is true. We want to filter by the 'age' field.
Fix the error in the code to store the filtered data into 'output.txt'.
STORE filtered_data INTO [1];The STORE command saves data to a file. The file name must be a quoted string, so use 'output.txt'.
Fill both blanks to load data from 'data.csv' and filter records where salary is less than 50000.
data = LOAD [1]; filtered = FILTER data BY [2] < 50000;
We load from 'data.csv' and filter by the 'salary' field to keep records with salary less than 50000.
Fill all three blanks to load 'records.txt', filter where date equals '2023-01-01', and store the result in 'filtered.txt'.
data = LOAD [1]; filtered = FILTER data BY [2] == [3]; STORE filtered INTO 'filtered.txt';
We load from 'records.txt', filter where the 'date' field equals '2023-01-01', and store the filtered data.