Created
October 11, 2018 14:35
-
-
Save bepcyc/b75c3f0e6531f8af27e163261482ee7b to your computer and use it in GitHub Desktop.
form starting offsets string for spark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""{"acp_prod.devices": {""" + df.select($"partition", $"offset").groupBy($"partition").agg(max($"offset")).as[(Int, Long)].collect.map{case (p, o) => s""""$p": $o"""}.mkString(",") + "}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment