-
Notifications
You must be signed in to change notification settings - Fork 118
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
docs(samples): add create range partition table #458
docs(samples): add create range partition table #458
Conversation
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
=========================================
Coverage 81.36% 81.36%
Complexity 1225 1225
=========================================
Files 77 77
Lines 6218 6218
Branches 690 691 +1
=========================================
Hits 5059 5059
Misses 802 802
Partials 357 357 Continue to review full report at Codecov.
|
import com.google.cloud.bigquery.TableId; | ||
import com.google.cloud.bigquery.TableInfo; | ||
|
||
// [START bigquery_create_table_range_partitioned] |
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.
this needs to go above import statements so that ppl know what are needed
samples/snippets/src/main/java/com/example/bigquery/CreateRangePartitionedTable.java
Show resolved
Hide resolved
private ByteArrayOutputStream bout; | ||
private PrintStream out; | ||
|
||
private static final String BIGQUERY_DATASET_NAME = System.getenv("BIGQUERY_DATASET_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.
We've decided to just call requireEnv method here to eliminate one other method called. please see this sample for details -
java-bigquery/samples/snippets/src/test/java/com/example/bigquery/LoadCsvFromGcsIT.java
Line 39 in 16738be
private static final String BIGQUERY_DATASET_NAME = requireEnvVar("BIGQUERY_DATASET_NAME"); |
assertThat(bout.toString()).contains("Range partitioned table created successfully"); | ||
|
||
// Clean up | ||
DeleteTable.deleteTable(BIGQUERY_DATASET_NAME, tableName); |
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 put this in teardown() - see sample
java-bigquery/samples/snippets/src/test/java/com/example/bigquery/LoadCsvFromGcsIT.java
Line 78 in 16738be
DeleteTable.deleteTable(BIGQUERY_DATASET_NAME, tableName); |
|
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: