Skip to content

[fix] Fix skip empty string proto representation mc #92

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

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
328d7ff
feat: migrating to gotocompany (#2)
lavkesh Mar 14, 2023
4c7d2e4
chore: modify error message on stopped error bq sink (#1)
jesrypandawa Mar 17, 2023
73c78c1
chore: bump up version to 0.4.1 (#3)
jesrypandawa Mar 17, 2023
1720a5c
Bq streaming API (#5)
lavkesh Apr 21, 2023
262867d
fix: remove bytefield (#10)
lavkesh May 5, 2023
62c05ec
fix: bytes to base64 in old api (#11)
lavkesh May 8, 2023
2ca9499
Bug fix (#12)
lavkesh May 10, 2023
6d78e73
fix: recreate writer if closed (#13)
lavkesh Jun 1, 2023
dc1ad87
fix: bq timestamp filter constraints (#15)
lavkesh Jun 9, 2023
8a0fc39
chore: getFieldByName with lowercase (#18)
lavkesh Jun 16, 2023
273cd8a
Camel case fix (#19)
lavkesh Jun 16, 2023
effe0ca
Timestamp check for columns (#22)
lavkesh Jun 20, 2023
d03cf37
chore: update stencil version and cleanup dependencies (#24)
lavkesh Jul 26, 2023
88eb981
feat: add support for redis auth (#26)
h4rikris Sep 4, 2023
9240aba
chore: release v0.7.0 (#27)
h4rikris Sep 6, 2023
3d23ea2
bug: recreate connection when idle for 10 min (#28)
lavkesh Sep 14, 2023
f25b2ed
Update schema bug: version bump (#29)
lavkesh Sep 14, 2023
07bd75a
Update schema bug (#30)
lavkesh Sep 27, 2023
1b7ab60
fix: fetch schema from cache to force refresh when no incoming traff…
lavkesh Sep 28, 2023
7f23e57
fix: have a constant delay for schema checker. (#32)
lavkesh Sep 28, 2023
7063dbe
fix: temp fix for redis broken connection issue (#35)
sumitaich1998 Nov 24, 2023
01c6133
fix: add constant backoff for redis connection issue (#37)
sumitaich1998 Nov 28, 2023
d3ad67b
updating protobuf modules (#34)
ankurs Nov 29, 2023
081274e
feat: add socket and connection timeout configs in redis sink (#38)
sumitaich1998 Dec 15, 2023
faba3ac
feat: add metrics for Redis sink (#39)
sumitaich1998 Dec 21, 2023
fbc5791
feat: depot httpv2 sink (#21)
sumitaich1998 Apr 24, 2024
b840790
docs: fix docs for kafka metadata columns config (#44)
sumitaich1998 May 24, 2024
143bdc5
fix: allow commas in the template string in json body template (#45)
sumitaich1998 Jun 13, 2024
39bb0cc
chore: upgrade jfrog version (#47)
sumitaich1998 Sep 4, 2024
ef469aa
Enable publish to maven local - ./gradlew publishToMavenLocal -Ploca…
rajuGT Dec 5, 2024
707682c
feat: Max Compute Sink (#52)
ekawinataa Dec 6, 2024
ab7f478
feat: Maxcompute Sink Converters Refactor + Performance Improvement (…
ekawinataa Dec 20, 2024
b848af0
fix: Add non-retryable and retryable error handling in insert manager…
ekawinataa Jan 13, 2025
835671f
feat: Maxcompute Timestamp Type Flag (#59)
ekawinataa Jan 13, 2025
494cf65
feat: Add different casting strategy for numeric types (#61)
ekawinataa Jan 27, 2025
d09ba65
Feat: Add Proto Float to MaxCompute double converter (#62)
ekawinataa Feb 3, 2025
727d83e
Bugfix: Duration nanos INT to BIGINT (complying with MMS) (#63)
ekawinataa Feb 3, 2025
8c0add8
fix: Negative nano handling (#65)
Vaishnavi190900 Feb 7, 2025
5b3585c
[refactor] Bump ODPS Version - Dynamic Message Field Assignment - Cac…
ekawinataa Feb 27, 2025
d1de017
[FIX] Recursive proto structure stack overflow + MC - BQ Default Mess…
ekawinataa Mar 10, 2025
ed1b315
[fix] Use Reoderable Struct (#73)
ekawinataa Mar 12, 2025
91608d7
Fix case sensitive alter table (#74)
ekawinataa Mar 17, 2025
4c66c60
[fix] Add flag to process negative second timestamp as null (#76)
ekawinataa Mar 21, 2025
83257e8
[fix] Fix Empty proto messsage parsing (#77)
ekawinataa Mar 21, 2025
851ed14
[refactor] Externalize allow schema mismatch (#78)
ekawinataa Mar 29, 2025
213eb6f
[fix] skip fields with empty string representation
ekawinataa Apr 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ $ ./gradlew clean
```xml

<dependency>
<groupId>io.odpf</groupId>
<groupId>com.gotocompany</groupId>
<artifactId>depot</artifactId>
<version>version</version>
</dependency>
```

```sh
implementation group: 'io.odpf', name: 'depot', version: 'version'
implementation group: 'com.gotocompany', name: 'depot', version: 'version'
```

### Usage example:

```java
public interface OdpfSink extends Closeable {
OdpfSinkResponse pushToSink(List<OdpfMessage> messages) throws OdpfSinkException;
public interface Sink extends Closeable {
SinkResponse pushToSink(List<Message> messages) throws SinkException;
}
```

Expand All @@ -87,12 +87,12 @@ class MyClass {

### Data types

Currently, sink connector library is supporting protobuf and Json format. We can set the datatype of `OdpfMessage` by
Currently, sink connector library is supporting protobuf and Json format. We can set the datatype of `Message` by
setting `SINK_CONNECTOR_SCHEMA_DATA_TYPE`. Each datatype has parsers which takes care of deserialization.

### Adding a new Sink

Each sink will have to implement `OdpfSink` interface. The pushToSink take a batch of messages and return a response
Each sink will have to implement `Sink` interface. The pushToSink take a batch of messages and return a response
with error list.

### Configurations
Expand Down
74 changes: 49 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ buildscript {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.7"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.4'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.33.1"
classpath "org.ajoberstar:gradle-git:1.6.0"
}
}
Expand All @@ -14,44 +14,61 @@ plugins {
id 'idea'
id 'checkstyle'
id 'jacoco'
id "com.google.protobuf" version "0.8.17"
id "com.google.protobuf" version "0.9.4"
id 'io.franzbecker.gradle-lombok' version '5.0.0'
id 'maven-publish'
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}

group 'io.odpf'
version '0.3.8'
group 'com.gotocompany'
version '0.10.15'

repositories {
mavenCentral()
mavenLocal()
mavenCentral()
}

configurations.configureEach { exclude group: 'com.google.guava', module: 'listenablefuture' }

dependencies {
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.1.0'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.25.0'
implementation group: 'com.datadoghq', name: 'java-dogstatsd-client', version: '2.13.0'
implementation group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.1.0'
implementation group: 'io.odpf', name: 'stencil', version: '0.2.1' exclude group: 'org.slf4j'
implementation group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.25.0'
implementation group: 'com.gotocompany', name: 'stencil', version: '0.6.0' exclude group: 'org.slf4j'
implementation group: 'org.aeonbits.owner', name: 'owner', version: '1.0.9'
implementation 'com.google.cloud:google-cloud-bigquery:1.115.0'
implementation (group: 'com.google.cloud', name:'google-cloud-bigtable', version:'2.11.2') {
implementation (group: 'com.google.cloud', name: 'google-cloud-bigquerystorage', version: '2.39.1') {
exclude group: "io.grpc"
}
implementation(group: 'com.google.cloud', name: 'google-cloud-bigquery', version: '2.29.0') {
exclude group: "io.grpc"
}
implementation "io.grpc:grpc-all:1.38.0"
implementation(group: 'com.google.cloud', name: 'google-cloud-bigtable', version: '2.24.1') {
exclude group: "io.grpc"
}
implementation (group: 'com.aliyun.odps', name: 'odps-sdk-core', version: '0.51.10-public') {
exclude group: "com.google"
exclude group: "io.grpc"
exclude group: "org.slf4j"
}
implementation 'io.grpc:grpc-all:1.55.1'
implementation group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.7.35'
implementation group: 'redis.clients', name: 'jedis', version: '3.0.1'
implementation group: 'redis.clients', name: 'jedis', version: '3.10.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.2.1'
implementation 'org.json:json:20220320'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.4.0'
testImplementation group: 'junit', name: 'junit', version: '4.13'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'org.json:json:20230227'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.8.0'
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.9.1'
implementation group: 'joda-time', name: 'joda-time', version: '2.10.2'
implementation('com.google.guava:guava:32.0.1-jre') { force = true }
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.26.3'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.mockito:mockito-core:4.5.1'
testImplementation "com.github.tomakehurst:wiremock:2.3.1"
testImplementation 'com.github.tomakehurst:wiremock:2.16.0'
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1'
testImplementation group: 'io.opentracing', name: 'opentracing-mock', version: '0.33.0'
testImplementation group: 'org.mock-server', name: 'mockserver-netty', version: '3.10.5'
testImplementation group: 'org.mock-server', name: 'mockserver-netty', version: '5.15.0'
testImplementation gradleTestKit()
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
Expand Down Expand Up @@ -93,15 +110,17 @@ idea {
testSourceDirs += file("$projectDir/src/generated/test/java")
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

protobuf {
generatedFilesBaseDir = "$projectDir/src/generated"
protoc {
artifact = "com.google.protobuf:protoc:3.1.0"
artifact = "com.google.protobuf:protoc:3.25.0"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:1.0.3"
artifact = "io.grpc:protoc-gen-grpc-java:1.59.0"
}
}
generateProtoTasks {
Expand Down Expand Up @@ -142,10 +161,10 @@ publishing {
version = project.version
name = 'Depot'
description = 'A sink connector library containing multiple sink implementations'
url = 'https://github.com/odpf/depot'
url = 'https://github.com/goto/depot'

scm {
url = 'https://github.com/odpf/depot.git'
url = 'https://github.com/goto/depot.git'
}

licenses {
Expand All @@ -168,7 +187,9 @@ publishing {
}

signing {
sign publishing.publications.maven
if (!project.hasProperty('local')) {
sign publishing.publications.maven
}
}

nexusPublishing {
Expand All @@ -191,7 +212,10 @@ jacocoTestCoverageVerification {
'**/serializer/**',
'**/cortexpb/**',
'**/Clock**',
'**/GoGoProtos**',])
'**/GoGoProtos**',
'**/MaxComputeClient**',
'**/MaxComputeSinkFactory**',
''])
})
}
violationRules {
Expand Down
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ $ ./gradlew clean
```xml

<dependency>
<groupId>io.odpf</groupId>
<groupId>com.gotocompany</groupId>
<artifactId>depot</artifactId>
<version>version</version>
</dependency>
```

```sh
implementation group: 'io.odpf', name: 'depot', version: 'version'
implementation group: 'com.gotocompany', name: 'depot', version: 'version'
```

### Usage example:

```java
public interface OdpfSink extends Closeable {
OdpfSinkResponse pushToSink(List<OdpfMessage> messages) throws OdpfSinkException;
public interface Sink extends Closeable {
SinkResponse pushToSink(List<Message> messages) throws SinkException;
}
```

Expand All @@ -89,12 +89,12 @@ class MyClass {

### Data types

Currently, sink connector library is supporting protobuf and Json format. We can set the datatype of `OdpfMessage` by
Currently, sink connector library is supporting protobuf and Json format. We can set the datatype of `Message` by
setting `SINK_CONNECTOR_SCHEMA_DATA_TYPE`. Each datatype has parsers which takes care of deserialization.

### Adding a new Sink

Each sink will have to implement `OdpfSink` interface. The pushToSink take a batch of messages and return a response
Each sink will have to implement `Sink` interface. The pushToSink take a batch of messages and return a response
with error list.

### Configurations
Expand Down
7 changes: 7 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@
## Sink
* [Bigquery](sinks/bigquery.md)
* [Redis](sinks/redis.md)
* [Bigtable](sinks/bigtable.md)
* [HTTP](sinks/http-sink.md)


## Reference

* [Configuration](reference/configuration/README.md)
* [Generic](reference/configuration/generic.md)
* [Stencil Client](reference/configuration/stencil-client.md)
* [Bigquery Sink](reference/configuration/bigquery-sink.md)
* [Redis Sink](reference/configuration/redis.md)
* [Bigtable Sink](reference/configuration/bigtable.md)
* [HTTP Sink](reference/configuration/http-sink.md)

* [Metrics](reference/metrics.md)

## Contribute
Expand Down
4 changes: 2 additions & 2 deletions docs/contribute/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The following is a set of guidelines for contributing to Depot. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. Here are some important resources:

* Github [issues](https://github.com/odpf/depot/issues) track the ongoing and reported issues.
* Github [issues](https://github.com/goto/depot/issues) track the ongoing and reported issues.

Development of Depot happens in the open on GitHub, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving Depot.

Expand Down Expand Up @@ -53,5 +53,5 @@ Please follow these practices for your change to get merged fast and smoothly:
* If you are introducing a completely new feature or making any major changes to an existing one, we recommend starting with an RFC and get consensus on the basic design first.
* Make sure your local build is running with all the tests and checkstyle passing.
* If your change is related to user-facing protocols/configurations, you need to make the corresponding change in the documentation as well.
* Docs live in the code repo under [`docs`](https://github.com/odpf/depot/tree/main/docs/README.md) so that changes to that can be done in the same PR as changes to the code.
* Docs live in the code repo under [`docs`](https://github.com/goto/depot/tree/main/docs/README.md) so that changes to that can be done in the same PR as changes to the code.

16 changes: 8 additions & 8 deletions docs/contribute/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ Environment variables can be configured in the following way -
* run `export SAMPLE_VARIABLE=287` on a UNIX shell, to directly assign the required environment variable.

### Custom application
We need to create an application which has io.odpf.depot as a dependency.
We need to create an application which has com.gotocompany.depot as a dependency.
This application will create any sink that a developer wants to test by using sink-factories.
The OdpfSink's APIs can be used to send data to sinks and check the response.
The Sink's APIs can be used to send data to sinks and check the response.
One can setup monitoring to see metrics emitted too.
#### Maven and gradle dependency

```xml

<dependency>
<groupId>io.odpf</groupId>
<groupId>com.gotocompany</groupId>
<artifactId>depot</artifactId>
<version>version</version>
</dependency>
```

```sh
implementation group: 'io.odpf', name: 'depot', version: 'version'
implementation group: 'com.gotocompany', name: 'depot', version: 'version'
```
#### Sample Application
```java
Expand Down Expand Up @@ -75,7 +75,7 @@ The environment variable `SCHEMA_REGISTRY_STENCIL_ENABLE` must be set to `true`
Stencil server URL must be specified in the variable `SCHEMA_REGISTRY_STENCIL_URLS` .
The Proto Descriptor Set file of the messages must be uploaded to the Stencil server.

Refer [this guide](https://github.com/odpf/stencil/tree/master/server#readme) on how to set up and configure the Stencil server, and how to generate and upload Proto descriptor set file to the server.
Refer [this guide](https://github.com/goto/stencil/tree/master/server#readme) on how to set up and configure the Stencil server, and how to generate and upload Proto descriptor set file to the server.

### Monitoring

Expand All @@ -89,10 +89,10 @@ Following are the typical requirements:


### Adding a new Sink
To add a new sink implementation the Sink class has to implement OdpfSink interface
To add a new sink implementation the Sink class has to implement Sink interface
```java
public interface OdpfSink extends Closeable {
OdpfSinkResponse pushToSink(List<OdpfMessage> messages) throws OdpfSinkException;
public interface Sink extends Closeable {
SinkResponse pushToSink(List<Message> messages) throws SinkException;
}
```
Sink implementations will normally have a factory class too which will be used to setup and create objects of Impl classes.
Expand Down
1 change: 1 addition & 0 deletions docs/reference/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ This page contains reference for all the configurations for sink connectors.
* [Bigquery Sink](bigquery-sink.md)
* [Redis Sink](redis.md)
* [Bigtable Sink](bigtable.md)
* [HTTP Sink](http-sink.md)

Loading