Ignore missing values for declared fields during sink to HBase #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes not all values will be available for the declared fields, so the HBaseScheme has to allow for sinking even when there are missing values.
In my scenario, I have some records coming from a CSV file, but some columns are missing, which prevented me from sinking to HBase.
So, I added a "strict" flag that, when set to false, ignores null values (by default this flag is set true, to keep it backwards compatible).
This is similar to the "strict" flag used in Cascading's TextDelimited scheme.