Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix SQLAlchemy timestamp converter + docs#117

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
susodapop merged 3 commits intomainfromfix-sqla-timestamp
May 9, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionsexamples/sqlalchemy.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,8 @@
more of the Databricks API, particularly around table reflection, Alembic usage, and data
ingestion with pandas.

Expected URI format is: databricks+thrift://token:dapi***@***.cloud.databricks.com?http_path=/sql/***

Because of the extent of SQLAlchemy's capabilities it isn't feasible to provide examples of every
usage in a single script, so we only provide a basic one here. More examples are found in our test
suite at tests/e2e/sqlalchemy/test_basic.py and in the PR that implements this change:
Expand Down
4 changes: 2 additions & 2 deletionssrc/databricks/sqlalchemy/dialect/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ class DatabricksTimestamp(types.TypeDecorator):
impl = types.TIMESTAMP

def process_result_value(self, value, dialect):
returnprocessors.str_to_datetime(value)
return value

def adapt(self, impltype, **kwargs):
return self.impl
Expand All@@ -59,7 +59,7 @@ class DatabricksDate(types.TypeDecorator):
impl = types.DATE

def process_result_value(self, value, dialect):
returnprocessors.str_to_date(value)
return value

def adapt(self, impltype, **kwargs):
return self.impl
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp