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

Aangepast import formaat #294

Open
26 tasks
jrhillae opened this issue Jan 9, 2025 · 6 comments
Open
26 tasks

Aangepast import formaat #294

jrhillae opened this issue Jan 9, 2025 · 6 comments
Assignees
Labels

Comments

@jrhillae
Copy link
Collaborator

jrhillae commented Jan 9, 2025

Enkele de volgende velden mogen voorkomen in template van importmodule. De overige velden worden automatisch gedefinieerd (zie #291 , #290) of zijn niet overschrijfbaar.

@jrhillae jrhillae added the import label Jan 9, 2025
@peterdesmet peterdesmet changed the title Beperkt aantal velden laten wijzigen via importmodule Aangepast import formaat Jan 20, 2025
@PietrH
Copy link
Member

PietrH commented Jan 20, 2025

If an observation is imported that already exists, fields are overwritten.

  • What happens if the updated observation is missing some fields, are the old fields retained?

  • What happens if you pass null for a field?

  • What happens if you pass an empty string `""´ for a field?

@peterdesmet
Copy link
Member

Based on #297

What happens if the updated observation is missing some fields, are the old fields retained?

Yes, the old data is retained (only provided fields are updated)

What happens if you pass null for a field?

The field is set to NULL in the database, if allowed

What happens if you pass an empty string `""´ for a field?

The value would be set to "" in the database, if allowed. This would for example not work for a controlled vocabulary field that only allows NULL and specific values. We might relax this an interpret "" as null if that is a more useful approach.

@PietrH
Copy link
Member

PietrH commented Jan 20, 2025

It's still not completely clear if I should encode anything as NULL in this first import, the mapping set's a bunch of values to NULL/NA if they are not in the controlled vocabulary.

If there happens to be a value in vespa-db already, I don't want to overwrite it. But if the records are all new, then there is no harm in not including the NULL value pairs at all right?

@peterdesmet
Copy link
Member

Indeed, in the first import (creating records), there's no difference between not providing a value or providing it as null. It will be NULL in the database.

@jrhillae
Copy link
Collaborator Author

@peterdesmet: In this issue (#290) we ask to infer anb automatically based on location. Ok then to remove the field 'anb' from the import file?

@peterdesmet
Copy link
Member

Yes, I have updated the issue body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants