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

Changes to make queryPath optional #162

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

dup05
Copy link
Collaborator

@dup05 dup05 commented Sep 22, 2023

Summary (Short summary of what is being done) :

Simplify REID workflow by making the query parameter optional

Description (Describe in detail the fix made) :

The REID workflow required users to compulsarily provide SQL query to read from the BigQuery. This involved manual steps to create a GCS object containing sql query and passing its path in the pipeline parameter. With this change, the queryPath parameter has been made optional and users can run REID pipeline without needing to provide a SQL query.

Bug ID (if any) :

b/293427326

Public Documentation (if any) :

TESTED (Test Cases with scenario and description - must have 1 positive and 1 negative scenario) :

  1. Tested REID without passing queryPath and verified the results
  2. Tested REID by passing the query

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #162 (01f8279) into master (0139d92) will decrease coverage by 0.03%.
Report is 12 commits behind head on master.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #162      +/-   ##
============================================
- Coverage     12.45%   12.43%   -0.03%     
  Complexity       63       63              
============================================
  Files            53       53              
  Lines          2480     2484       +4     
  Branches        207      208       +1     
============================================
  Hits            309      309              
- Misses         2152     2156       +4     
  Partials         19       19              
Files Coverage Δ
...n/DLPTextToBigQueryStreamingV2PipelineOptions.java 0.00% <ø> (ø)
...ava/com/google/swarm/tokenization/common/Util.java 30.24% <0.00%> (-0.33%) ⬇️
...arm/tokenization/common/BigQueryReadTransform.java 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

.usingStandardSql()
.withMethod(Method.DEFAULT))
.apply("AddTableNameAsKey", WithKeys.of(tableRef()));
throw new IllegalArgumentException("Export method not supported");
Copy link
Collaborator

Choose a reason for hiding this comment

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

May not be the intended behaviour but since the EXPORT case used to work with DEFAULT read earlier, are we declaring that somewhere before removing the support altogether?

.withMethod(Method.DEFAULT))
.apply("AddTableNameAsKey", WithKeys.of(tableRef()));
}

case EXPORT:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just club EXPORT and DIRECT_READ together and throw the exception "Only DEFAULT Read Method supported"?

case EXPORT: case DIRECT_READ: throw new IllegalArgumentException("Only DEFAULT READ method supported");

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.

3 participants