Skip to main content
May 12, 2023
Question

i am getting data from big query which is not filtered, how to filter that data

  • May 12, 2023
  • 1 reply
  • 0 views

Please Check the sample of data i am getting from big query ,,.. I am creating Row id and Unique id after retrieving the data ..  how to filter data on based on npi

Map

unique_id "1.591111183E9_1902142920_INDIVIDUAL_RIDER_NOT_CHECKED_INITIAL"(Text)
row_id 2(Number (Integer))
event_timestamp "1.591111183E9"(Text)
npi "1902142920"(Text)
rider_type "INDIVIDUAL_RIDER"(Text)
trinary_status "NOT_CHECKED"(Text)
roster_type "INITIAL"(Text)

Map
unique_id "1.591111225E9_1922475623_INDIVIDUAL_RIDER_NOT_CHECKED_FINAL"(Text)
row_id 3(Number (Integer))
event_timestamp "1.591111225E9"(Text)
npi "1922475623"(Text)
rider_type "INDIVIDUAL_RIDER"(Text)
trinary_status "NOT_CHECKED"(Text)
roster_type "FINAL"(Text)


NOTE: I dont have an access to the big query where i can filter from initial stage .. but i have this data i only want to filter this retrieved data .

 

1 reply

harshitb6843
May 12, 2023

Use the below code as an example and change it according to your filter. 

a!localVariables(
  local!data: {
    a!map(
      name: "Harshit",
      age: 25
    ),
    a!map(
      name: "Virat",
      age: 28
    ),
    a!map(
      name: "Amit",
      age: 29
    )
  },
  a!forEach(
    items: local!data,
    expression: if(
      fv!item.age>25,
      fv!item,
      {}
    )
  )
)