fix(bigquery): support LOAD DATA FROM FILES syntax#7482
Open
RedZapdos123 wants to merge 4 commits intotobymao:mainfrom
Open
fix(bigquery): support LOAD DATA FROM FILES syntax#7482RedZapdos123 wants to merge 4 commits intotobymao:mainfrom
RedZapdos123 wants to merge 4 commits intotobymao:mainfrom
Conversation
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
VaggelisD
reviewed
Apr 14, 2026
Collaborator
VaggelisD
left a comment
There was a problem hiding this comment.
Hey @RedZapdos123, thank you for your contribution, leaving a few comments:
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
5194ed5 to
8e7e831
Compare
VaggelisD
reviewed
Apr 14, 2026
Collaborator
VaggelisD
left a comment
There was a problem hiding this comment.
One more comment and should be good to go I believe:
| local = " LOCAL" if expression.args.get("local") else "" | ||
| inpath = f" INPATH {self.sql(expression, 'inpath')}" | ||
| overwrite = " OVERWRITE" if expression.args.get("overwrite") else "" | ||
| this = f" INTO TABLE {self.sql(expression, 'this')}" |
Collaborator
There was a problem hiding this comment.
- We can pull these upwards to avoid duplicating them as well
- We should avoid doing
self.funchere, looks a bit hacky given that this is an option list and not a function call
I'd try to rewrite this more like the following (may need minor fixes):
Suggested change
| this = self.sql(expression, "this") | |
| overwrite = " OVERWRITE" if expression.args.get("overwrite") else "" | |
| files = self.sql(expression, "files") | |
| if files: | |
| files = f"FILES {self.wrap(files)}" | |
| this = f" {this}" overwrite else f" INTO TABLE {this}" | |
| return f"LOAD DATA{overwrite}{this} FROM {files_sql}" | |
| local = " LOCAL" if expression.args.get("local") else "" | |
| inpath = f" INPATH {self.sql(expression, 'inpath')}" | |
| this = f" INTO TABLE {this}" |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Closes #7480.
Validation:
The validations screenshots of the tests run, locally on WSL: