Skip to content

Commit 5049eeb

Browse files
authored
Merge pull request tylertreat#115 from yu-sa/master
fixed time partitioning issue
2 parents e4df253 + 35e9790 commit 5049eeb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bigquery/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def create_table(self, dataset, table, schema,
557557
body['expirationTime'] = expiration_time
558558

559559
if time_partitioning:
560-
body['timePartitioning'] = "DAY"
560+
body['timePartitioning'] = {'type': 'DAY'}
561561

562562
try:
563563
table = self.bigquery.tables().insert(

bigquery/tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,7 @@ def test_table_create_body_with_time_partitioning(self):
17621762

17631763
body = self.body.copy()
17641764
body.update({
1765-
'timePartitioning': "DAY"
1765+
'timePartitioning': {'type': 'DAY'}
17661766
})
17671767

17681768
self.mock_tables.insert.assert_called_with(

0 commit comments

Comments
 (0)