"This file adds to DB.raw all of the metadata contained in DB.SpotifyMeta
It also calculates for each UPC whether an add was run or not (this is based on `impressions` not being NA)"

  ## Adding in Genre & Release info from our Spotify/Genre DT to the DB.raw numbers
  matchKey(DB.raw, DB.SpotifyMeta, "upc")

  if (!identical(class(DB.raw[["upc"]]), class(DB.SpotifyMeta[["upc"]])))
    stop("\nThe `upc` column in DB.raw & DB.SpotifyMeta differ\n")
  
  cat("before adding Spotify Data into DB.raw:\n")
  print.dims(DB.raw, verbose=TRUE)


  ## This adds to DB.raw the meta data extracted from infinDB (plus some from the XLS file)
  ##    all conflicts between the DB & the XLS file were resolved prior to here in section 02.
  ## TODO:  Look into using `merge()` instead, to preserve factor
  s.t({
    DB.raw[, SpotifyAddRan := FALSE]
    DB.raw[DB.SpotifyMeta, 
           c("SpotifyAddRan", "formatOfAddProd", "genre", "release", "label", "artist", "mkt_priority", "artist_country", "label_country", "label_priority", "startDate") := 
        list(         TRUE  , as.character(i.formatOfAddProd), i.genre, i.release, i.label, i.artist, i.mkt_priority, i.artist_country, i.label_country, i.label_priority, i.startDate )
           ]
    ## I think i can use this instead
    ##  DB.raw <- merge(DB.raw, DB.SpotifyMeta, all.x=TRUE)
   }, title="merge in the Genre & Release info columns to DB.raw from DB.SpotifyMeta")

  ## Fix SpotifyAddRan, which is based on impressions. 
  DB.raw[, SpotifyAddRan := FALSE]
  DB.raw[DB.SpotifyMeta[!is.na(impressions)], SpotifyAddRan := TRUE]

  ## Fix factors. 
  formatOfAddProd.levels <- c("Album", "Contest", "EP", "Playlist", "Single", "Soundrop Room")
  DB.raw[, formatOfAddProd := factor(formatOfAddProd, levels=formatOfAddProd.levels)]

  ## Fix startdate too.  
  # ... not doing it, because i may not need it. 

  cat("After adding Spotify Data into DB.raw:\n")
  print.dims(DB.raw, verbose=TRUE)
  

# 
#   ## ------------------------------ ##
#   ##      SAVE THE DATA             ##
#   ## ------------------------------ ##
#   # SHALLOW Copy
#   DB.raw.plus.Spotify.plus.agg.cols <- DB.raw
#   
#   f.ind <- paste0("DB.raw.plus.Spotify.plus.agg.cols", "_", qry_timestamp)
#   fileBackUps[[ f.ind ]] <-
#        jesusForData(DB.raw.plus.Spotify.plus.agg.cols, verbose=FALSE, RDS=TRUE)
#   
#   invisible(reproduce((fileBackUps[[f.ind]]), name="file.DB.raw.plus.Spotify.plus.agg.cols", clipboard=FALSE, showSample=FALSE))
# 
#   # Clean Shallow copy
#   rm(DB.raw.plus.Spotify.plus.agg.cols)
#   gcQuietly()
#   ## ------------------------------ ##
# 
