More detailed manuals/examples/syntax
Hello. I'm new to Experian Aperture Data Studio V2. I'm using the documents/help at the Data Quality User documentation site. I'll give you an example. I'm trying to use Get age to filter a dataset down to records with an effective date (one of our fields) to only the current year.
The Get age tells me "Returns the number of years between the supplied date and the current date". shows example of Input: 01/01/2000. Result 23. but when i add the function to a filter, I have two fields to fill out. I get an error that it must return true or false. but I thought it was going to return a 0 or a 1 using dates in 2024. So now I look everywhere and I don't see why it's saying true false or what to do next. Is there more detailed documentation available? I also tried editing the script, but I can't find anything on the syntax of the script language.
any ideas:
Best Answers
-
Hi christyjime,
As you're using the Filter step, the function will require a true or false condition, so that it can filter the records that meet the true condition. Get age will return the number of years difference between the given date and the current date. For example, you want use the Date of Birth field to filter records that have an age of less than or equals 18, it can be done in the Filter step as follows:
As for your use case, since you want to filter the records to the current year using the Effective date field, there is another way of doing this rather than using Get age. You can set the following function in your Filter stepGet years allows you to extract the Year from the date, and hence you can compare it with the current year in your filter. Hope this helps.
I've taken note of this and will see how we can improve the documentation further. Thanks for the feedback.
3 -
In terms of examples of Functions, there is a Library available here:
2 -
Hi christyjime,
In this case, you can use the compare date/time function to get the days difference between the current date and the date in your column. Then you can attach the Less than or equal function to make within 90 days comparison. Please see below:
Hope this helps. Thanks.
1
Answers
-
Thank you Ivan, this explains a lot! I think I can use your examples in my workflow. I think your get years example is actually what I'm looking for. I will work on using this today!
Thanks Josh, I will hit this resource that you provided.
Hopefully you can teach a dinosaur new tricks. ☺️
1 -
I got them both to work although get age results are wonkey. but get year is doing the trick.
follow up question what if I want something within 90 days. Looks like Get weeks get days and get months work in a similar way?
0 -
Perfect!
0