-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Conversation
'string3': ['%Y/%m/%d%H:%M:%S.%f', None], | ||
} | ||
for col in obj.table_columns: | ||
print(col.column_name) |
There was a problem hiding this comment.
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
Nice. This is looking solid. I'm going to test it against our production DB when I have a moment and report back. |
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? |
Those were pretty minor. Submit a PR if you feel like it, otherwise we'll get to it at some point. |
* fix: Workaround for sqlparse issue #652 * Update superset/sql_parse.py Co-authored-by: Ville Brofeldt <[email protected]> * Update sql_parse.py Co-authored-by: John Bodley <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]>
* fix: Workaround for sqlparse issue apache#652 * Update superset/sql_parse.py Co-authored-by: Ville Brofeldt <[email protected]> * Update sql_parse.py Co-authored-by: John Bodley <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]>
* fix: Workaround for sqlparse issue apache#652 * Update superset/sql_parse.py Co-authored-by: Ville Brofeldt <[email protected]> * Update sql_parse.py Co-authored-by: John Bodley <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]>
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.
If timestamp is stored in epoch format in Integer type, users should input this:
If it is stored in date/timestamp type, such as
timestamp with time zone
in postgres, users should input this:Query constructed by Caravel looks like this: