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

Treating empty Values when using Enforce schema #44

Open
YaphetKG opened this issue Dec 23, 2020 · 2 comments
Open

Treating empty Values when using Enforce schema #44

YaphetKG opened this issue Dec 23, 2020 · 2 comments

Comments

@YaphetKG
Copy link
Contributor

This is more of a question with a use case when loading nodes
lets imagine we have two objects

{ "name": "moving item" , "can_move" : True}
{ "name": "cat" , "can_make_noise": True}

let's say we can create a schema merging the properties of these objects that looks something like

name:STRING|can_move:BOOL|can_make_noise:BOOL
moving item|True|
cat||True

When using the bulk loader with enforce schema we are expected to define a value for the missing columns can_move for cat or can_make_noise for moving item.

There are cases where in data we are trying to load doesn't make sense to use default values , i.e cases where we can't assert that if this is not provided then use False (or True) for that matter .

Question is is it possible to accept missing values and not write those properties in the graph if values for those columns (attributes) are not provided?

@jeffreylovitz
Copy link
Contributor

Hi @YaphetKG,

Sorry for the late response! The enforce-schema option currently assumes no property is optional, but I agree that this is a worse design than allowing missing values.

If you'd like to open a PR to this effect, I'd happily merge it, otherwise I will add this to the project backlog!

@YaphetKG
Copy link
Contributor Author

YaphetKG commented Jan 6, 2021

I haven't had a chance to get that working I ended up spliting my files.

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

No branches or pull requests

2 participants