Skip to content
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

Destination BigQuery: Nuking old remnants #38111

Merged
merged 1 commit into from
May 10, 2024

Conversation

gisripa
Copy link
Contributor

@gisripa gisripa commented May 10, 2024

What

Removing remnants from old code. There is only CSV support and one implementation for DirectUploader in standard inserts, unified them into a single class removing unused methods for easier refactoring when needed.

No functional changes should happen with this PR.

Review guide

User Impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented May 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 5:28pm

Copy link
Contributor Author

gisripa commented May 10, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @gisripa and the rest of your teammates on Graphite Graphite

@gisripa gisripa changed the title bigquery-delete-unused Destination BigQuery: Nuking old remnants May 10, 2024
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BigQueryTableWriter implements DestinationWriter {
public record BigQueryTableWriter(TableDataWriteChannel writeChannel) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleting remnants of DestinationWriter from pre-async days

@gisripa gisripa force-pushed the gireesh/05-09-bigquery-delete-unused branch from a107209 to 85a9f2d Compare May 10, 2024 16:09
final HashMap<String, Object> destinationV2record = new HashMap<>();
destinationV2record.put(JavaBaseConstants.COLUMN_NAME_AB_RAW_ID, UUID.randomUUID().toString());
destinationV2record.put(JavaBaseConstants.COLUMN_NAME_AB_EXTRACTED_AT, getEmittedAtField(recordMessage.getRecord()));
destinationV2record.put(JavaBaseConstants.COLUMN_NAME_AB_LOADED_AT, null);
Copy link
Contributor

Choose a reason for hiding this comment

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

is there even a point to sending an explicit null for loaded_at? (I'm guessing this is copied from existing code, just seems weird)

... or, if we're immediately serializing it, why not just build a JsonNode directly?


public void upload(final PartialAirbyteMessage airbyteMessage) {
try {
writer.write(recordFormatter.formatRecord(airbyteMessage));
Copy link
Contributor

Choose a reason for hiding this comment

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

are we intentionally not batching multiple records together?

@gisripa gisripa force-pushed the gireesh/05-09-bigquery-delete-unused branch 2 times, most recently from 84b5358 to ec1c3ff Compare May 10, 2024 16:41
@gisripa gisripa force-pushed the gireesh/05-09-bigquery-delete-unused branch from ec1c3ff to 7c18c66 Compare May 10, 2024 17:05
@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label May 10, 2024
@gisripa gisripa force-pushed the gireesh/05-09-bigquery-delete-unused branch from 7c18c66 to a6c5dc5 Compare May 10, 2024 17:07
@gisripa gisripa changed the base branch from cdk-ops-refactor to master May 10, 2024 17:07
@octavia-squidington-iii octavia-squidington-iii removed the CDK Connector Development Kit label May 10, 2024
@gisripa gisripa marked this pull request as ready for review May 10, 2024 17:08
@gisripa gisripa requested a review from a team as a code owner May 10, 2024 17:08
@gisripa gisripa force-pushed the gireesh/05-09-bigquery-delete-unused branch from a6c5dc5 to e1b60e0 Compare May 10, 2024 17:19
@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label May 10, 2024
@gisripa gisripa merged commit 1188221 into master May 10, 2024
34 checks passed
@gisripa gisripa deleted the gireesh/05-09-bigquery-delete-unused branch May 10, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/destination/bigquery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants