We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bacbf24 commit 790733bCopy full SHA for 790733b
google/cloud/bigquery/table.py
@@ -738,11 +738,6 @@ def insert_data(self,
738
rows_info = []
739
data = {'rows': rows_info}
740
741
- def _convert_timestamp(value):
742
- if isinstance(value, datetime.datetime):
743
- value = _microseconds_from_datetime(value) * 1e-6
744
- return value
745
-
746
for index, row in enumerate(rows):
747
row_info = {}
748
@@ -1134,3 +1129,10 @@ class _UrlBuilder(object):
1134
1129
def __init__(self):
1135
1130
self.query_params = {}
1136
1131
self._relative_path = ''
1132
+
1133
+def _convert_timestamp(value):
+ """Helper for :meth:`Table.insert_data`."""
+ if isinstance(value, datetime.datetime):
1137
+ value = _microseconds_from_datetime(value) * 1e-6
1138
+ return value
0 commit comments