[
https://issues.apache.org/jira/browse/GOBBLIN-1584?focusedWorklogId=691322&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-691322
]
ASF GitHub Bot logged work on GOBBLIN-1584:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 06/Dec/21 19:58
Start Date: 06/Dec/21 19:58
Worklog Time Spent: 10m
Work Description: umustafi opened a new pull request #3438:
URL: https://github.com/apache/gobblin/pull/3438
* Allows user to configure a mysql ingestion job to allow replacement of the
record's value for an existing record in the table.
* Also replaces a backward iteration of ResultSet() with forward iteration
in MySqlWriterCommands
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I
have checked off all the steps below!
### JIRA
- [X] My PR addresses the following [Gobblin
JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references
them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-1584
### Description
- [X] Here are some details about my PR, including screenshots (if
applicable):
We only support insertion of new values into tables, not update/upsert. If
you run an ingestion job with a record containing a record with the same
primary key the whole job will fail because of the duplicate entry. We don't
expect ingestion jobs to always contain only new records, so we should handle
duplicate entries, ingestion of data already in the table or updates to old
values. The insert vs. replace logic should be configurable to the user as well.
### Tests
- [X] My PR adds the following unit tests __OR__ does not need testing for
this extremely good reason:
It adds a unit test that utilizes replace logic in the JdbcPublisherTest.
I have also tested manually by copying duplicate data and repeated primary
keys into a Mysql table and verified the values were updated.
### Commits
- [X] My commits all reference JIRA issues in their subject lines, and I
have squashed multiple commits if they address the same issue. In addition, my
commits follow the guidelines from "[How to write a good git commit
message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 691322)
Time Spent: 2h 40m (was: 2.5h)
> Add Replace Logic To Mysql Writer
> ---------------------------------
>
> Key: GOBBLIN-1584
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1584
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-service
> Reporter: Urmi Mustafi
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> We only supportĀ {{insertion}} of new values into tables, not
> {{{}update/upsert{}}}. If you run an ingestion job with a record containing a
> record with the same primary key the whole job will fail because of the
> duplicate entry. We don't expect ingestion jobs to always containĀ _only new_
> records, so we should handle duplicate entries, ingestion of data already in
> the table or updates to old values. The insert vs. replace logic should be
> configurable to the user as well.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)