Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add week ending and week start to grain #191

Merged
merged 3 commits into from
Mar 21, 2016
Merged

Add week ending and week start to grain #191

merged 3 commits into from
Mar 21, 2016

Conversation

imsid
Copy link

@imsid imsid commented Mar 21, 2016

@mistercrunch Adding two new time grains for Presto

  • week_start
  • week_ending

Both grains use Sunday to Saturday as definition of week.

@landscape-bot
Copy link

Code Health
Repository health decreased by 12% when pulling a9ba47f on week-grain into f09f3d7 on master.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 48c8a90 on airbnb:week-grain into f09f3d7 on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 65.459% when pulling 48c8a90 on week-grain into f09f3d7 on master.

@@ -285,6 +285,10 @@ def grains(self):
Grain('Time Column', '{col}'),
Grain('week', "date_trunc('week', CAST({col} AS DATE))"),
Grain('month', "date_trunc('month', CAST({col} AS DATE))"),
Grain("week_ending", "date_add('day', 5, "
"date_trunc('week', date_add('day', 1, CAST({col} AS DATE))))"),
Grain("week_start", "date_add('day', -1, "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first argument shows as the label in the dropdown, week_start_monday week_ending_sunday would be more clear.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mistercrunch Makes sense. Fixed!

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling bad3128 on airbnb:week-grain into f09f3d7 on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 65.459% when pulling bad3128 on week-grain into f09f3d7 on master.

mistercrunch added a commit that referenced this pull request Mar 21, 2016
Add week ending and week start to grain
@mistercrunch mistercrunch merged commit 0890d22 into master Mar 21, 2016
@mistercrunch mistercrunch deleted the week-grain branch March 21, 2016 22:56
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.8.2 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.8.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants