Skip to content

Commit

Permalink
Create a partition table for SLI/SLO. (GoogleCloudPlatform#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
Djabx authored Jul 8, 2020
1 parent 894cc28 commit cdbb290
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/slo-generator/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
long_description = f.read()

setup(name='slo-generator',
version='1.0.1',
version='1.1.0',
description='SLO generator',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down
3 changes: 3 additions & 0 deletions tools/slo-generator/slo_generator/exporters/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def create_table(self, project_id, dataset_id, table_id, schema=None):
table_name = f"{project_id}.{dataset_id}.{table_id}"
LOGGER.info(f"Creating table {table_name}", table_name)
table = bigquery.Table(table_name, schema=pyschema)
table.time_partitioning = bigquery.TimePartitioning(
type_=bigquery.TimePartitioningType.DAY,
)
return self.client.create_table(table)


Expand Down

0 comments on commit cdbb290

Please sign in to comment.