I want to filter my Date datasets by Holidays datasets with something like that :

a = load "Date_Test";
b = load "Holidays_Test";
b = foreach b generate 'Holidays' as 'Holidays';
a = filter a by 'Date' not in [toDate('Holidays', "dd/MM/yyyy")];

But I've got this error : Unknown IDTOKEN: Holidays

I don't really know how to join both datasets to get this filter.


Here is the documentation to join two datasets: https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_eql.meta/bi_dev_guide_eql/bi_eql_statement_group.htm

To filter where they join, you can do as such:

A = load ...
B = load ...
q = cogroup A by 'Date' left, B by 'HolidayDate';
q = foreach q generate 
  B['HolidayDate'] as 'Purge'
  ,...Whatever you want from dataset A
  ,A['Date'] as 'Date For Example';
q = filter q by 'Purge' is not null;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.