question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `groupby` options for datetime values in the UI

See original GitHub issue

If you have a date or a time column, then we should automatically make this into a toggle-list in the UI.

E.g. if I had created_at_timestamp in dbt, it would appear like this in Lightdash:

  • created_at_timestamp

    created_at_time created_at_date created_at_week … etc.

Alternative, sleeker option:

  • created_at_timestamp

    time date week … etc.

But, when you select one of the options, it puts it on the results table as created at week (for example)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
TuringLovesDeathMetalcommented, Nov 25, 2021

Super awesome!

I almost feel like order date shouldn’t be click-able (as in, this shouldn’t be true: “We can always select the main/original dimension”)

2reactions
TuringLovesDeathMetalcommented, Nov 25, 2021

@ZeRego @owlas summary of our chat:

  • we want to go with option 1: time intervals are split out into separate dimensions.
  • The way you define time intervals is using a parameter called time_intervals. You can set this to default or set the time interval values you’d like. Default intervals are: [time, day, week, month, year] --> if the dimension is a date then we remove the time default value.

Interval options are: time, millisecond, second, minute, hour, day, week, month, year

name: date
  meta:
    dimension:
      time_intervals: default

OR

name: date
  meta:
    dimension:
      time_intervals: [year, month, day]
  • If you have selected a dimension to have time intervals, then we’ll group all of the related dimensions within the original dimension name
Read more comments on GitHub >

github_iconTop Results From Across the Web

Group by and fill missing datetime values - python
You can use DataFrame.reindex per groups with DataFrame.groupby and lambda function: df['datetime'] = pd.to_datetime(df['datetime']) f= ...
Read more >
How to Group Pandas DataFrame By Date and Time
In this article, we will discuss how to group by a dataframe on the basis of date and time in Pandas. We will...
Read more >
pandas GroupBy: Your Guide to Grouping Data in Python
In this tutorial, you'll learn how to work adeptly with the pandas GroupBy facility while mastering ways to manipulate, transform, ...
Read more >
How to handle time series data with ease?
To group on weekdays, we use the datetime property weekday (with Monday=0 and Sunday=6) of pandas Timestamp , which is also accessible by...
Read more >
IGroupByEvaluator - Infragistics WPF™ Help
The following example demonstrates how to create a custom IGroupByEvaluator. The CustomDateTimeEvaluator class implements the IGroupByEvaluator interface and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found