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

Import / export of entities should be flexible w.r.t entity name #128

Open
silvanheller opened this issue Jul 25, 2022 · 3 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@silvanheller
Copy link
Member

silvanheller commented Jul 25, 2022

Currently, you have to use something like sed after exporting a table if you want to import the same entries into a differently named table. As #95 is still on the wishlist, this makes renaming an entity or migrating data somewhat cumbersome. It would be good if the CLI command for export would allow specifying the tablename which is intended to be used

@silvanheller silvanheller added enhancement New feature or request good first issue Good for newcomers labels Jul 25, 2022
@lucaro
Copy link
Member

lucaro commented Jul 25, 2022

Shouldn't this be a parameter of the import? If I'm not mistaken, at least the CSV import requires you to specify the entity name to import into.

@silvanheller
Copy link
Member Author

It is an import parameter, but it is not respected / bugged.

entity dump -f JSON -o . cineast.cineast_multimediaobject
sed -i 's/cineast.cineast_multimediaobject/cineast.features_providedocr/g' warren.cineast.cineast_multimediaobject.json
entity import -f JSON -i warren.cineast.cineast_foo.json cineast.cineast_multimediaobject

Importing entries into warren.cineast.cineast_multimediaobject failed due to error: warren.cineast.features_providedocr.objectid does not match the expected column name warren.cineast.cineast_multimediaobject.objectid.

@sauterl
Copy link
Collaborator

sauterl commented Jan 5, 2023

This is partially addressed in #137 as @ppanopticon kindly provides a newly introduced flag for JSON improt / export. The culprit are fully qualified column names (including schema and entity, which is in this context argualby an undesired artefact).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants