Skip to content

fix: handle partition overwrite #206

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

Merged
merged 3 commits into from
Jan 15, 2025
Merged

fix: handle partition overwrite #206

merged 3 commits into from
Jan 15, 2025

Conversation

tchow-zlai
Copy link
Collaborator

@tchow-zlai tchow-zlai commented Jan 12, 2025

Summary

Based on
@David Han’s observation's around the spark-bigquery connector, there indeed is a lurking behavior.
when creating BQ tables (in the case they don't exist), user needs to specify a partitioning. This is expected. We do that in the form of a partitionColumn write option.
when the connector performs dynamic partition overwrites, you don't need to specify the partitioning at all. It will do the right thing because the destination table was already created with a partition spec.
^ ideally, the above could be idempotent even if the user passes the partition column to the write, but unfortunately it's a strict requirement that you don't define the partition column when doing dynamic partition overwrites.
Fix is to specify the partition column only when the table DNE and needs to be created, and leave it out in all other cases.

Checklist

  • Added Unit Tests
  • Covered by existing CI
  • Integration tested
  • Documentation update

Summary by CodeRabbit

  • New Features

    • Introduced separate read and write options for data pointers
    • Added support for Google Cloud SDK tool
    • Added new plugins for gcloud and thrift
  • Bug Fixes

    • Enhanced error handling in BigQuery format provider
  • Refactor

    • Standardized DataPointer instantiation method from apply to from
    • Improved options handling in data operations
  • Chores

    • Updated plugin and tool versions for development environment

Copy link

coderabbitai bot commented Jan 12, 2025

Walkthrough

The pull request introduces changes to the DataPointer architecture, focusing on separating read and write options across multiple files. The modifications standardize the instantiation of DataPointer, rename the factory method from apply to from, and introduce explicit readOptions and writeOptions methods. These changes impact several components including TableUtils, CatalogAwareDataPointer, and Extensions, ensuring a consistent approach to handling data source configurations.

Changes

File Change Summary
spark/src/main/scala/ai/chronon/spark/TableUtils.scala Updated DataPointer instantiation from DataPointer(tableName, sparkSession) to DataPointer.from(tableName, sparkSession) and changed logging level in tableReachable method.
api/src/main/scala/ai/chronon/api/DataPointer.scala Replaced single options method with readOptions and writeOptions.
spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala Renamed apply method to from, added readOptions and writeOptions.
spark/src/main/scala/ai/chronon/spark/Extensions.scala Modified save and load methods to use new readOptions and writeOptions.
.plugin-versions Added gcloud and thrift plugin entries.
.tool-versions Added gcloud 504.0.1 tool version.
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GcpFormatProvider.scala Enhanced error handling and project/dataset determination logic.
api/src/test/scala/ai/chronon/api/test/DataPointerTest.scala Corrected class declaration syntax from -class to +class.

Possibly related PRs

Suggested reviewers

  • david-zlai
  • piyush-zlai
  • nikhil-zlai

Poem

🌟 Options split, data's delight
Read and write, now crystal bright
From apply to from we stride
Refactoring with coding pride! 🚀
DataPointer's new design takes flight

Warning

Review ran into problems

🔥 Problems

GitHub Actions: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository.

Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 604dc27 and 50ad19e.

📒 Files selected for processing (8)
  • .plugin-versions (1 hunks)
  • .tool-versions (1 hunks)
  • api/src/main/scala/ai/chronon/api/DataPointer.scala (1 hunks)
  • api/src/test/scala/ai/chronon/api/test/DataPointerTest.scala (1 hunks)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GcpFormatProvider.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/Extensions.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • .tool-versions
  • api/src/test/scala/ai/chronon/api/test/DataPointerTest.scala
  • .plugin-versions
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala
  • spark/src/main/scala/ai/chronon/spark/Extensions.scala
  • spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GcpFormatProvider.scala
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: table_utils_delta_format_spark_tests
  • GitHub Check: other_spark_tests
  • GitHub Check: join_spark_tests
  • GitHub Check: fetcher_spark_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: mutation_spark_tests
🔇 Additional comments (2)
api/src/main/scala/ai/chronon/api/DataPointer.scala (2)

8-10: LGTM! Good separation of read/write options.

Clean interface split that better handles operation-specific configurations.


18-22: Verify partition handling with shared options.

Both read/write use same options map. Confirm this works for partition overwrites.

✅ Verification successful

Shared options implementation is correct for partition handling

Partition overwrite mode is controlled by session-level configuration (spark.sql.sources.partitionOverwriteMode), not through read/write options. Using the same options map is safe.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for partition-related options usage
rg -l 'partitionColumn|partitionField' | xargs rg 'readOptions|writeOptions'

Length of output: 401


Script:

#!/bin/bash
# Check partition handling implementation
ast-grep --pattern 'partition($$$)' 
rg -B2 -A2 'partition.*overwrite'

Length of output: 914


Script:

#!/bin/bash
# Check for partition-specific options
rg -A2 "spark\.sql\.sources\.partition"
rg "options.*partition" 

Length of output: 467


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala (1)

45-52: Remove outdated TODO comment

The TODO references PR #1320 which seems resolved based on the comment.

-        ), // todo(tchow): No longer needed after https://github.com/GoogleCloudDataproc/spark-bigquery-connector/pull/1320
+        ),
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 7f9775e and be2a9b5.

📒 Files selected for processing (1)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: scala_compile_fmt_fix
🔇 Additional comments (2)
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala (2)

44-44: LGTM: Table reachability check

Good defensive programming to verify table accessibility before operations.


53-57: Verify partition field behavior

The conditional inclusion of partitionField could affect existing partition overwrites.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
api/src/main/scala/ai/chronon/api/DataPointer.scala (1)

18-19: Consider separating read and write options.

Currently, both readOptions and writeOptions return the same map. Consider allowing different options for read and write operations.

 case class URIDataPointer(
     override val tableOrPath: String,
     override val readFormat: Option[String],
     override val writeFormat: Option[String],
-    options: Map[String, String]
+    readOptions: Map[String, String],
+    writeOptions: Map[String, String]
 ) extends DataPointer {
-  override val readOptions: Map[String, String] = options
-  override val writeOptions: Map[String, String] = options
 }

Also applies to: 21-22

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between dd68dc3 and 5f393cb.

📒 Files selected for processing (6)
  • api/src/main/scala/ai/chronon/api/DataPointer.scala (1 hunks)
  • api/src/test/scala/ai/chronon/api/test/DataPointerTest.scala (1 hunks)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/Extensions.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • api/src/test/scala/ai/chronon/api/test/DataPointerTest.scala
🚧 Files skipped from review as they are similar to previous changes (2)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: table_utils_delta_format_spark_tests
  • GitHub Check: other_spark_tests
  • GitHub Check: mutation_spark_tests
  • GitHub Check: join_spark_tests
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: fetcher_spark_tests
  • GitHub Check: scala_compile_fmt_fix
🔇 Additional comments (6)
spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala (3)

14-16: LGTM! Good use of lazy evaluation.

The implementation correctly retrieves read options from the format provider.


18-19: LGTM! Consistent with readOptions implementation.

The implementation mirrors readOptions for write operations.


34-34: LGTM! Better method naming.

Renaming from apply to from better follows the factory method pattern.

api/src/main/scala/ai/chronon/api/DataPointer.scala (1)

9-10: LGTM! Good separation of concerns.

Clear distinction between read and write options.

spark/src/main/scala/ai/chronon/spark/Extensions.scala (2)

Line range hint 307-337: LGTM! Clean format handling.

Good use of pattern matching and consistent error handling.


Line range hint 346-372: LGTM! Symmetric with save implementation.

Consistent pattern matching and error handling with the save method.

@@ -41,14 +41,16 @@ case class GcpFormatProvider(sparkSession: SparkSession) extends FormatProvider
override def writeFormat(tableName: String): Format = {

val tu = TableUtils(sparkSession)
val partitionColumnOption =
if (tu.tableReachable(tableName)) Map.empty else Map("partitionField" -> tu.partitionColumn)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

threading the options through here.

options: Map[String, String]
) extends DataPointer {

override val readOptions: Map[String, String] = options
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for URIDataPointer, just treat the options the same.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala (1)

Line range hint 34-46: Add error handling for reflection.

The factory method could fail silently. Consider wrapping reflection in Try.

-  def from(tableOrPath: String, sparkSession: SparkSession): DataPointer = {
+  def from(tableOrPath: String, sparkSession: SparkSession): DataPointer = Try {
     val clazzName =
       sparkSession.conf.get("spark.chronon.table.format_provider.class", classOf[DefaultFormatProvider].getName)
     // ... existing code ...
     CatalogAwareDataPointer(tableOrPath, provider)
-  }
+  }.getOrElse(throw new IllegalStateException(s"Failed to initialize FormatProvider for table: $tableOrPath"))
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala (1)

55-56: Track GCS bucket cleanup.

TODO indicates this can be simplified after PR GoogleCloudDataproc/spark-bigquery-connector#1320.

Want me to create an issue to track the GCS bucket cleanup?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between c7ca79f and 8f95b2b.

📒 Files selected for processing (8)
  • .plugin-versions (1 hunks)
  • .tool-versions (1 hunks)
  • api/src/main/scala/ai/chronon/api/DataPointer.scala (1 hunks)
  • api/src/test/scala/ai/chronon/api/test/DataPointerTest.scala (1 hunks)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/Extensions.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • api/src/test/scala/ai/chronon/api/test/DataPointerTest.scala
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala
  • spark/src/main/scala/ai/chronon/spark/Extensions.scala
  • api/src/main/scala/ai/chronon/api/DataPointer.scala
🔇 Additional comments (6)
spark/src/main/scala/ai/chronon/spark/CatalogAwareDataPointer.scala (2)

14-16: LGTM! Clean separation of read options.


18-19: LGTM! Verify partition handling.

The separation allows for different handling of partition columns during writes.

✅ Verification successful

Separation of writeOptions is correctly implemented

The design properly supports format-specific partition handling through format providers, with special cases for BigQuery and consistent partition overwrite behavior configured globally.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if writeOptions is used consistently for partition handling
rg -p "writeOptions.*partition" --type scala

Length of output: 46


Script:

#!/bin/bash
# Find all writeOptions usages
rg -p "writeOptions" --type scala -A 3

# Search for partition-related code
rg -p "partition.*write|write.*partition" --type scala

# Check format provider implementations
fd -e scala -x cat {} \; | rg -p "class.*Format.*Provider"

Length of output: 3073

.tool-versions (1)

8-8: Verify gcloud SDK version compatibility

✅ Verification successful

✓ gcloud SDK version 504.0.1 appears compatible

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if this version has known issues or is outdated
curl -s "https://cloud.google.com/sdk/docs/release-notes.json" | jq '.[] | select(.version | contains("504.0.1"))'

# Check for minimum version requirements in project
rg -l "google-cloud|gcloud" | xargs rg "minimum|requires|version"

Length of output: 4755

.plugin-versions (1)

2-2: Verify plugin commit hashes

Also applies to: 7-7

✅ Verification successful

Plugin commit hashes verified successfully

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify commit existence and check if it's the latest stable
for repo in "https://github.com/jthegedus/asdf-gcloud.git" "https://github.com/alisaifee/asdf-thrift.git"; do
  echo "Checking $repo..."
  git ls-remote $repo HEAD
done

Length of output: 685

cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryFormat.scala (2)

41-43: LGTM: Clear table ID validation.

Assertions properly validate required fields with descriptive error messages.


46-47: Verify table reachability implementation.

Logic aligns with PR objective: partition field only specified for new tables.

✅ Verification successful

Table reachability check verified as correct.

Implementation properly attempts to load table and handles failures gracefully. The partition field logic in BigQueryFormat.scala correctly uses this to determine when partition specification is needed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify TableUtils.tableReachable implementation
rg -A 5 "def tableReachable"

Length of output: 503


Script:

#!/bin/bash
# Find loadTable implementation
ast-grep --pattern 'def loadTable($$$)'

Length of output: 41


Script:

#!/bin/bash
# Find loadTable implementation with broader context
rg -A 10 "loadTable"

Length of output: 21766

@tchow-zlai tchow-zlai force-pushed the tchow/test-bq-connector branch from 8f95b2b to 5622486 Compare January 15, 2025 06:49
tchow-zlai and others added 3 commits January 15, 2025 09:52
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
@tchow-zlai tchow-zlai force-pushed the tchow/test-bq-connector branch from 604dc27 to 50ad19e Compare January 15, 2025 17:53
@tchow-zlai tchow-zlai merged commit 7c2290a into main Jan 15, 2025
9 of 10 checks passed
@tchow-zlai tchow-zlai deleted the tchow/test-bq-connector branch January 15, 2025 19:48
kumar-zlai pushed a commit that referenced this pull request Apr 25, 2025
## Summary

Based on 
[@david Han](https://zipline-2kh4520.slack.com/team/U0846REC8F7)’s
observation's around the spark-bigquery
[connector](https://zipline-2kh4520.slack.com/archives/C08710CDH8D/p1736700947319249?thread_ts=1736644291.357239&cid=C08710CDH8D),
there indeed is a lurking behavior.
when creating BQ tables (in the case they don't exist), user needs to
specify a partitioning. This is expected. We do that in the form of a
partitionColumn write option.
when the connector performs dynamic partition overwrites, you don't need
to specify the partitioning at all. It will do the right thing because
the destination table was already created with a partition spec.
^ ideally, the above could be idempotent even if the user passes the
partition column to the write, but unfortunately it's a strict
requirement that you don't define the partition column when doing
dynamic partition overwrites.
Fix is to specify the partition column only when the table DNE and needs
to be created, and leave it out in all other cases.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
	- Introduced separate read and write options for data pointers
	- Added support for Google Cloud SDK tool
	- Added new plugins for `gcloud` and `thrift`

- **Bug Fixes**
	- Enhanced error handling in BigQuery format provider

- **Refactor**
- Standardized `DataPointer` instantiation method from `apply` to `from`
	- Improved options handling in data operations

- **Chores**
	- Updated plugin and tool versions for development environment

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1209143482009688

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

Co-authored-by: Thomas Chow <[email protected]>
kumar-zlai pushed a commit that referenced this pull request Apr 29, 2025
## Summary

Based on 
[@david Han](https://zipline-2kh4520.slack.com/team/U0846REC8F7)’s
observation's around the spark-bigquery
[connector](https://zipline-2kh4520.slack.com/archives/C08710CDH8D/p1736700947319249?thread_ts=1736644291.357239&cid=C08710CDH8D),
there indeed is a lurking behavior.
when creating BQ tables (in the case they don't exist), user needs to
specify a partitioning. This is expected. We do that in the form of a
partitionColumn write option.
when the connector performs dynamic partition overwrites, you don't need
to specify the partitioning at all. It will do the right thing because
the destination table was already created with a partition spec.
^ ideally, the above could be idempotent even if the user passes the
partition column to the write, but unfortunately it's a strict
requirement that you don't define the partition column when doing
dynamic partition overwrites.
Fix is to specify the partition column only when the table DNE and needs
to be created, and leave it out in all other cases.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
	- Introduced separate read and write options for data pointers
	- Added support for Google Cloud SDK tool
	- Added new plugins for `gcloud` and `thrift`

- **Bug Fixes**
	- Enhanced error handling in BigQuery format provider

- **Refactor**
- Standardized `DataPointer` instantiation method from `apply` to `from`
	- Improved options handling in data operations

- **Chores**
	- Updated plugin and tool versions for development environment

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1209143482009688

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

Co-authored-by: Thomas Chow <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

Based on 
[@david Han](https://zipline-2kh4520.slack.com/team/U0846REC8F7)’s
observation's around the spark-bigquery
[connector](https://zipline-2kh4520.slack.com/archives/C08710CDH8D/p1736700947319249?thread_ts=1736644291.357239&cid=C08710CDH8D),
there indeed is a lurking behavior.
when creating BQ tables (in the case they don't exist), user needs to
specify a partitioning. This is expected. We do that in the form of a
partitionColumn write option.
when the connector performs dynamic partition overwrites, you don't need
to specify the partitioning at all. It will do the right thing because
the destination table was already created with a partition spec.
^ ideally, the above could be idempotent even if the user passes the
partition column to the write, but unfortunately it's a strict
requirement that you don't define the partition column when doing
dynamic partition overwrites.
Fix is to specify the partition column only when the table DNE and needs
to be created, and leave it out in all other cases.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
	- Introduced separate read and write options for data pointers
	- Added support for Google Cloud SDK tool
	- Added new plugins for `gcloud` and `thrift`

- **Bug Fixes**
	- Enhanced error handling in BigQuery format provider

- **Refactor**
- Standardized `DataPointer` instantiation method from `apply` to `from`
	- Improved options handling in data operations

- **Chores**
	- Updated plugin and tool versions for development environment

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1209143482009688

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

Co-authored-by: Thomas Chow <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

Based on 
[@david Han](https://zipline-2kh4520.slack.com/team/U0846REC8F7)’s
observation's around the spark-bigquery
[connector](https://zipline-2kh4520.slack.com/archives/C08710CDH8D/p1736700947319249?thread_ts=1736644291.357239&cid=C08710CDH8D),
there indeed is a lurking behavior.
when creating BQ tables (in the case they don't exist), user needs to
specify a partitioning. This is expected. We do that in the form of a
partitionColumn write option.
when the connector performs dynamic partition overwrites, you don't need
to specify the partitioning at all. It will do the right thing because
the destination table was already created with a partition spec.
^ ideally, the above could be idempotent even if the user passes the
partition column to the write, but unfortunately it's a strict
requirement that you don't define the partition column when doing
dynamic partition overwrites.
Fix is to specify the partition column only when the table DNE and needs
to be created, and leave it out in all other cases.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
	- Introduced separate read and write options for data pointers
	- Added support for Google Cloud SDK tool
	- Added new plugins for `gcloud` and `thrift`

- **Bug Fixes**
	- Enhanced error handling in BigQuery format provider

- **Refactor**
- Standardized `DataPointer` instantiation method from `apply` to `from`
	- Improved options handling in data operations

- **Chores**
	- Updated plugin and tool versions for development environment

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1209143482009688

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

Co-authored-by: Thomas Chow <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 16, 2025
## Summary

Based on 
[@david Han](https://zipline-2kh4520.slaour clients.com/team/U0846REC8F7)’s
observation's around the spark-bigquery
[connector](https://zipline-2kh4520.slaour clients.com/archives/C08710CDH8D/p1736700947319249?thread_ts=1736644291.357239&cid=C08710CDH8D),
there indeed is a lurking behavior.
when creating BQ tables (in the case they don't exist), user needs to
specify a partitioning. This is expected. We do that in the form of a
partitionColumn write option.
when the connector performs dynamic partition overwrites, you don't need
to specify the partitioning at all. It will do the right thing because
the destination table was already created with a partition spec.
^ ideally, the above could be idempotent even if the user passes the
partition column to the write, but unfortunately it's a strict
requirement that you don't define the partition column when doing
dynamic partition overwrites.
Fix is to specify the partition column only when the table DNE and needs
to be created, and leave it out in all other cases.

## Cheour clientslist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
	- Introduced separate read and write options for data pointers
	- Added support for Google Cloud SDK tool
	- Added new plugins for `gcloud` and `thrift`

- **Bug Fixes**
	- Enhanced error handling in BigQuery format provider

- **Refactor**
- Standardized `DataPointer` instantiation method from `apply` to `from`
	- Improved options handling in data operations

- **Chores**
	- Updated plugin and tool versions for development environment

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1209143482009688

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to traour clients
the status of staour clientss when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

Co-authored-by: Thomas Chow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants