-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test read_gbq
with dryRun
in configuration
parameter
#88
Comments
Are there other properties besides |
I think a general “update” call would be a good way to implement this. We’d probably want some checks for duplicate values. I think the current implementation checks that query is not also defined in the job config. |
I believe I might have fixed this issue in #152. I'll add a test to try out a |
Unfortunately even with #152, still can't do dry run queries because it raises when google-cloud-bigquery tries to fetch the results. Test code (query from analyzing PyPI downloads): def test_configuration_with_dryrun(self):
query = """SELECT COUNT(*) AS num_downloads
FROM `the-psf.pypi.downloads*`
WHERE file.project = 'pandas-gbq'
-- Only query the last 30 days of history
AND _TABLE_SUFFIX
BETWEEN FORMAT_DATE(
'%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
"""
config = {
'dryRun': True
}
df = gbq.read_gbq(query, project_id=_get_project_id(),
private_key=self.credentials,
dialect='standard',
configuration=config)
assert df is None Exception:
I think this might be related to issue #45 and/or an issue upstream in google-cloud-bigquery. |
I've confirmed that |
read_gbq
job definitionread_gbq
with dryRun
in configuration
parameter
any progress on this? |
Hello,
Recently a question featured on SO asking about running a
read_gbq
job withdryRun
settings defined asTrue
.As it turns out, for what I could check, currently we can send query definitions but everything defined outside of
query
is discarded.I wonder if it would be possible to also consider updating other values such as
dryRun
.kwargs
should probably be able to receive arguments such asconfiguration={"query": {...}, "dryRun": True}
and
run_query
probably would have to processjob_config.update(config)
.Best,
Will
The text was updated successfully, but these errors were encountered: