From bf2aa2e39af69c74c4b8540c9cead714b1e74d96 Mon Sep 17 00:00:00 2001 From: Justin Donn Date: Mon, 23 Sep 2024 16:38:14 -0700 Subject: [PATCH] feat(rawCreate): add rawCreate/rawCreateAsset methods to BaseRemoteWriterDAO (#434) --- .../dao/internal/BaseRemoteWriterDAO.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dao-api/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java b/dao-api/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java index 59f761bee..cbc23a706 100644 --- a/dao-api/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java +++ b/dao-api/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java @@ -37,6 +37,18 @@ abstract public void createWithTracking(@Nonnull URN urn, @Non @Nonnull IngestionTrackingContext trackingContext, @Nullable IngestionParams ingestionParams); + /** + * Same as {@link #createWithTracking(Urn, RecordTemplate, IngestionTrackingContext, IngestionParams)} + * but a raw create request, which skips any pre-, intra-, and post-ingestion updates. + * @param urn the {@link Urn} for the entity + * @param snapshot the snapshot containing updated metadata aspects + * @param trackingContext {@link IngestionTrackingContext} to use for DAO tracking probes and to pass on to the MAE + * @param ingestionParams {@link IngestionParams} which indicates how the aspect should be ingested + * @param must be the entity URN type in {@code SNAPSHOT} + */ + abstract public void rawCreate(@Nonnull URN urn, @Nonnull RecordTemplate snapshot, + @Nonnull IngestionTrackingContext trackingContext, @Nullable IngestionParams ingestionParams); + /** * Same as {@link #createWithTracking(Urn, RecordTemplate, IngestionTrackingContext, IngestionParams)} but create Assets instead. * @param urn the {@link Urn} for the asset @@ -46,4 +58,15 @@ abstract public void createWithTracking(@Nonnull URN urn, @Non */ abstract public void createAsset(@Nonnull URN urn, @Nonnull RecordTemplate asset, @Nullable IngestionParams ingestionParams); + + /** + * Same as {@link #createAsset(Urn, RecordTemplate, IngestionParams)} but a raw create request, + * which skips any pre-, intra-, and post-ingestion updates. + * @param urn the {@link Urn} for the asset + * @param asset the asset containing updated metadata aspects + * @param ingestionParams {@link IngestionParams} which indicates how the aspect should be ingested + * @param must be the entity URN type in {@code ASSET} + */ + abstract public void rawCreateAsset(@Nonnull URN urn, @Nonnull RecordTemplate asset, + @Nullable IngestionParams ingestionParams); }