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

🎉 New Source: Big Query #4457

Merged
merged 69 commits into from
Jul 22, 2021
Merged

🎉 New Source: Big Query #4457

merged 69 commits into from
Jul 22, 2021

Conversation

DoNotPanicUA
Copy link
Contributor

@DoNotPanicUA DoNotPanicUA commented Jul 1, 2021

What

New source Big Query.
Implemented Full and Incremental refresh types.

Bonus 🍬
Method for generation comprehensive test table SourceComprehensiveTest.getMarkdownTestTable()

Comprehensive tests

Data Type Insert values Expected values Comment Common test result
int64 null, -128, 127, 9223372036854775807, -9223372036854775808 null, -128, 127, 9223372036854775807, -9223372036854775808 Ok
int null, -128, 127 null, -128, 127 Ok
smallint null, -128, 127 null, -128, 127 Ok
integer null, -128, 127 null, -128, 127 Ok
bigint null, -128, 127 null, -128, 127 Ok
tinyint null, -128, 127 null, -128, 127 Ok
byteint null, -128, 127 null, -128, 127 Ok
numeric null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 Ok
bignumeric null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 Ok
decimal null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 Ok
bigdecimal null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 null, -128, 127, 999999999999999999, -999999999999999999, 0.123456789, -0.123456789 Ok
float64 null, -128, 127, 0.123456789, -0.123456789 null, -128.0, 127.0, 0.123456789, -0.123456789 Ok
bool true, false, null true, false, null Ok
bytes FROM_BASE64("test"), null test, null Ok
date date('2021-10-20'), date('9999-12-31'), date('0001-01-01'), null 2021-10-20T00:00:00Z, 9999-12-31T00:00:00Z, 0001-01-01T00:00:00Z, null Ok
datetime datetime('2021-10-20 11:22:33'), datetime('9999-12-31 11:22:33'), datetime('0001-01-01 11:22:33'), null 2021-10-20T11:22:33Z, 9999-12-31T11:22:33Z, 0001-01-01T11:22:33Z, null Ok
timestamp timestamp('2021-10-20 11:22:33'), null 2021-10-20T11:22:33Z, null Ok
geography ST_GEOGFROMTEXT('POINT(1 2)'), null POINT(1 2), null Ok
string 'qwe', 'йцу', null qwe, йцу, null Ok
struct STRUCT("B.A",12), null Ok
time TIME(15, 30, 00), null 15:30:00, null Ok
array ['a', 'b'] [{"test_column":"a"},{"test_column":"b"}] Ok
struct STRUCT('s' as frst, 1 as sec, STRUCT(555 as id_col, STRUCT(TIME(15, 30, 00) as time) as mega_obbj) as obbj) {"frst":"s","sec":1,"obbj":{"id_col":555,"mega_obbj":{"last_col":"15:30:00"}}} Ok

Recommended reading order

  1. BigQuerySource.java
  2. BigQueryDatabase.java
  3. BigQueryUtils.java
  4. others

Pre-merge Checklist

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • Secrets are annotated with airbyte_secret in the connector's spec
  • Credentials added to Github CI if needed and not already present. instructions for injecting secrets into CI.
  • Unit & integration tests added as appropriate (and are passing)
    • Community members: please provide proof of this succeeding locally e.g: screenshot or copy-paste acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • /test connector=connectors/<name> command as documented here is passing.
    • Community members can skip this, Airbyters will run this for you.
  • Code reviews completed
  • Build is successful
  • Connector version bumped like described here
  • New Connector version released on Dockerhub by running the /publish command described here
  • No major blockers
  • PR merged into master branch
  • Follow up tickets have been created
  • Associated tickets have been closed & stakeholders notified

DoNotPanicUA and others added 26 commits June 22, 2021 17:18
s not an abstract class.
+ add default implementation for `AbstractRelationalDbSource.getFullyQualifiedTableName`
…act-source

# Conflicts:
#	airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSource.java
# Conflicts:
#	airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSource.java
@github-actions github-actions bot added area/connectors Connector related issues area/protocol CDK Connector Development Kit labels Jul 1, 2021
Copy link
Contributor

@yaroslav-hrytsaienko yaroslav-hrytsaienko left a comment

Choose a reason for hiding this comment

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

@DoNotPanicUA @heade nice guys, very good job!

*
* @return formatted list of test cases
*/
public String getMarkdownTestTable() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

You can write return the value right here :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

this is great! next step will be write this into a markdown file as part of the build so it's readily available ;) (but not in this pr ofc)

@DoNotPanicUA DoNotPanicUA marked this pull request as ready for review July 15, 2021 16:31
Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

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

Looks great! Just some small changes needed and question about unit tests

*
* @return formatted list of test cases
*/
public String getMarkdownTestTable() {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is great! next step will be write this into a markdown file as part of the build so it's readily available ;) (but not in this pr ofc)

Copy link
Contributor

@subodh1810 subodh1810 left a comment

Choose a reason for hiding this comment

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

Nice!

"supported_destination_sync_modes": ["overwrite", "append", "append_dedup"],
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BigQuery Destination Spec",

Choose a reason for hiding this comment

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

Should this be BigQuery Source Spec?

@sherifnada
Copy link
Contributor

@heade you might need to make some changes similar to #4874 to make sure the config format matches spec.json

@heade
Copy link
Contributor

heade commented Jul 22, 2021

/test connector=source-bigquery

🕑 source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1055650710
✅ source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1055650710

@heade heade merged commit 4c0d1a0 into master Jul 22, 2021
@heade heade deleted the aleonets/1876-source-bigquery branch July 22, 2021 12:39
@heade heade restored the aleonets/1876-source-bigquery branch July 22, 2021 14:07
@heade
Copy link
Contributor

heade commented Jul 22, 2021

/publish connector=connectors/source-bigquery

🕑 connectors/source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1056455930
✅ connectors/source-bigquery https://github.com/airbytehq/airbyte/actions/runs/1056455930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues lang/java
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement utilities required for BigQuery source Add a source BigQuery
6 participants