Created
February 12, 2020 08:58
-
-
Save marufeuille/79a09394e8e955c6005cb5516130a415 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e_set("timestamp",dt_totimestamp(dt_parse(v("dteday")))) | |
e_if( | |
e_search("weathersit==1"), e_set("good", 1, "normal", 0, "bad", 0, "terrible", 0), | |
e_search("weathersit==2"), e_set("good", 0, "normal", 1, "bad", 0, "terrible", 0), | |
e_search("weathersit==3"), e_set("good", 0, "normal", 0, "bad", 1, "terrible", 0), | |
e_search("weathersit==4"), e_set("good", 0, "normal", 0, "bad", 0, "terrible", 1) | |
) | |
e_if( | |
e_search("weekday==0"), e_set("sunday", 0, "monday", 0, "tuesday", 0, "wednesday", 0, "thursday", 0, "friday", 0, "saturday", 0), | |
e_search("weekday==1"), e_set("sunday", 0, "monday", 1, "tuesday", 0, "wednesday", 0, "thursday", 0, "friday", 0, "saturday", 0), | |
e_search("weekday==2"), e_set("sunday", 0, "monday", 0, "tuesday", 1, "wednesday", 0, "thursday", 0, "friday", 0, "saturday", 0), | |
e_search("weekday==3"), e_set("sunday", 0, "monday", 0, "tuesday", 0, "wednesday", 1, "thursday", 0, "friday", 0, "saturday", 0), | |
e_search("weekday==4"), e_set("sunday", 0, "monday", 0, "tuesday", 0, "wednesday", 0, "thursday", 1, "friday", 0, "saturday", 0), | |
e_search("weekday==5"), e_set("sunday", 0, "monday", 0, "tuesday", 0, "wednesday", 0, "thursday", 0, "friday", 1, "saturday", 0), | |
e_search("weekday==6"), e_set("sunday", 0, "monday", 0, "tuesday", 0, "wednesday", 0, "thursday", 0, "friday", 0, "saturday", 1) | |
) | |
e_if( | |
e_search("season==1"), e_set("winter", 1, "spring", 0, "summer", 0, "autom", 0), | |
e_search("season==2"), e_set("winter", 0, "spring", 1, "summer", 0, "autom", 0), | |
e_search("season==3"), e_set("winter", 0, "spring", 0, "summer", 1, "autom", 0), | |
e_search("season==4"), e_set("winter", 0, "spring", 0, "summer", 0, "autom", 1), | |
) | |
e_drop_fields("dteday", "yr", "mnth", "temp", "weathersit", "season", "weekday") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you used aliyun log service(SLS)?