Delta Flags
Certain data feeds will have the column ‘delta_flag’. This flag is to identify the incremental changes to the data from the previous snapshot that was shared.
Delta Flags will only be present on feeds with incremental and historical endpoints.
Watch the video below or continue reading to find out more.
Values
Values of the Delta Flag can be: ‘D’, ‘I’, or ‘U’:
D - "Delete". Represents that this is a deleted record that was sent previously by Walmart for that item on a given business date (maybe store/item/channel/date). The consumer needs to delete this data in their process.
I - "Initial". Represents that this is the first time Walmart has sent the data for this item for a given date (may be store/item/channel/date). The consumer needs to insert such records into their process.
U - "Update". Represents that this is an update to an existing record that was sent previously by Walmart for that item on a given business date (maybe store/item/channel/date). The consumer needs to update this data into their process.
Processing Sequence
Delta Flags should always process in the following sequence:
- D (Delete) records should always be processed first.
- I (Insert) records should always be processed after D.
U (Update) records should always be processed after both D and I flags have successfully been processed.
Note: When a ‘Delete’ and ‘Insert’ is received for the same record in the same feed, follow the sequence and process ‘Delete’ first before processing the ‘Insert’.
Processing Historical Files
Historical endpoints and files will be available under the following scenarios:
- During the initial supplier onboarding: all historical endpoints will be enabled, and suppliers should expect the Delta Flag to be I on all records.
- During a monthly release where additional data elements are added into an existing endpoint: suppliers should expect the Delta Flag to be U on all records.
- Ad hoc requests to regenerate history: suppliers should expect the Delta Flag to be I on all records. Records should be processed based on the business dates included on the new historical file.
The supplier’s ingestion layer is the raw data layer that has data as provided by Walmart that week. This data needs to be processed with the Delta Flag and fed into the supplier’s stage layer.
For every record in the stage layer, check if that record already exists in the supplier's data and process the feed accordingly to the Delta Flag.
While Walmart delivers the feeds on a daily/weekly basis, consumers of the feed must always follow the order of the date the feeds were generated for further processing of the feeds.
Additionally, whenever a history feed is available, consumers will have 45 days to process the history data and consume the incremental data from there on.