EntityDataCSV
EntityDataCSV Objects
class EntityDataCSV(CSVParser.CSVParser)
ApertureDB Entity Data.
This class loads the Entity Data which is present in a CSV file, and converts it into a series of ApertureDB queries.
EntityClass
, PROP_NAME_1
, ... PROP_NAME_N
, constraint_PROP1
Example CSV file::
EntityClass,name,lastname,age,id,constraint_id
Person,John,Salchi,69,321423532,321423532
Person,Johna,Salchi,63,42342522,42342522
...
Example usage:
data = EntityDataCSV("/path/to/EntityData.csv")
loader = ParallelLoader(client)
loader.ingest(data)
In the above example, the constraint_id ensures that a Entity with the specified id would be only inserted if it does not already exist in the database.
EntityDeleteDataCSV Objects
class EntityDeleteDataCSV(CSVParser.CSVParser)
ApertureDB Entity Delete Data.
This class loads the Entity Data which is present in a CSV file, and converts it into a series of ApertureDB deletes.
:::note Expects a CSV file with the following columns:
``constraint_PROP1``
:::
Example CSV file::
constraint_id
321423532
42342522
...
Example usage:
data = ImageDeleteDataCSV("/path/to/UnusedImages.csv")
loader = ParallelQuery(client)
loader.query(data)
:::info In the above example, the constraint_id ensures that a Entity with the specified id would be only deleted.
Note that you can take a csv with normal prop data and this will ignore it, so you could use input to a loader to this. :::
ImageDeleteDataCSV Objects
class ImageDeleteDataCSV(EntityDeleteDataCSV)
ApertureData CSV Loader class for deleting images
Usage details in EntityDeleteDataCSV