Skip to content

Commit

Permalink
Merge pull request #416 from atlanhq/DVX-164
Browse files Browse the repository at this point in the history
Add logging of the specific assets that are skipped
  • Loading branch information
cmgrote authored Jan 9, 2024
2 parents 83f7e06 + 844c2e7 commit 2583df5
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class CSVReader @JvmOverloads constructor(
val totalFailures = AtomicLong(0)
someFailure = someFailure || primaryBatch.failures.isNotEmpty()
logFailures(primaryBatch, logger, totalFailures)
logSkipped(primaryBatch, logger)
logger.info { "Total assets created: $totalCreates" }
logger.info { "Total assets updated: $totalUpdates" }
logger.info { "Total assets skipped: $totalSkipped" }
Expand Down Expand Up @@ -224,6 +225,15 @@ class CSVReader @JvmOverloads constructor(
}
}

private fun logSkipped(b: ParallelBatch, logger: KLogger) {
if (b.skipped.isNotEmpty()) {
logger.info { "Skipped the following assets as they do not exist in Atlan (running in update-only mode):" }
b.skipped?.forEach {
logger.info { " ... skipped asset: ${it.typeName}::${it.qualifiedName}" }
}
}
}

/** {@inheritDoc} */
@Throws(IOException::class)
override fun close() {
Expand Down

0 comments on commit 2583df5

Please sign in to comment.