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

datetime format and database expression on column level #652

Merged
merged 58 commits into from
Jun 28, 2016
Merged

datetime format and database expression on column level #652

merged 58 commits into from
Jun 28, 2016

Conversation

yxjames
Copy link
Contributor

@yxjames yxjames commented Jun 21, 2016

This PR is a revision of #506 .
Now users can edit datetime format and database expression per column. Without specifying anything, Caravel follows default pandas timestamp format and empty database_expression.
screen shot 2016-06-21 at 12 35 17 pm
If timestamp is stored in epoch format in Integer type, users should input this:
screen shot 2016-06-21 at 12 40 20 pm
If it is stored in date/timestamp type, such as timestamp with time zone in postgres, users should input this:
screen shot 2016-06-21 at 12 45 04 pm
Query constructed by Caravel looks like this:
screen shot 2016-06-21 at 12 48 02 pm

@coveralls
Copy link

coveralls commented Jun 25, 2016

Coverage Status

Coverage increased (+0.07%) to 81.394% when pulling f38fd03 on joshwalters:dttm_format_columns into d5b8414 on airbnb:master.

@coveralls
Copy link

coveralls commented Jun 25, 2016

Coverage Status

Coverage increased (+0.07%) to 81.394% when pulling 0bb8afd on joshwalters:dttm_format_columns into d5b8414 on airbnb:master.

@coveralls
Copy link

coveralls commented Jun 27, 2016

Coverage Status

Coverage increased (+0.07%) to 81.394% when pulling 4bcbd19 on joshwalters:dttm_format_columns into 4191b75 on airbnb:master.

'string3': ['%Y/%m/%d%H:%M:%S.%f', None],
}
for col in obj.table_columns:
print(col.column_name)
Copy link
Member

Choose a reason for hiding this comment

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

let's remove this line

@mistercrunch
Copy link
Member

Nice. This is looking solid. I'm going to test it against our production DB when I have a moment and report back.

@mistercrunch
Copy link
Member

Ok. Everything looks good. This was pretty tricky but I think we support most use cases at this point. Thanks for bearing with me.
img

@mistercrunch mistercrunch merged commit 7a7f61a into apache:master Jun 28, 2016
@yxjames
Copy link
Contributor Author

yxjames commented Jun 28, 2016

Thanks for you patience for showing me the right way to write python code! I haven't fix those small issues you just pointed out. You will do it yourself?

@mistercrunch
Copy link
Member

Those were pretty minor. Submit a PR if you feel like it, otherwise we'll get to it at some point.

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
john-bodley added a commit that referenced this pull request Jan 12, 2022
* fix: Workaround for sqlparse issue #652

* Update superset/sql_parse.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update sql_parse.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
* fix: Workaround for sqlparse issue apache#652

* Update superset/sql_parse.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update sql_parse.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
* fix: Workaround for sqlparse issue apache#652

* Update superset/sql_parse.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update sql_parse.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.10.0 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.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants