Last active
November 30, 2020 23:58
-
-
Save arobb/285d2fa022df4874b863563b6d0bc904 to your computer and use it in GitHub Desktop.
BigQuery load errors return a byte position where an error occurred. If you know your data has reasonable line breaks, this command line Python script will show the offending line.
This file contains hidden or 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
# s is the offset provided in the BQ load error | |
# filename.ext is your file's name | |
python -c "s=12345; f=open('filename.ext'); f.seek(s); print(f.readline())" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment