我在循环中使用下面提到的get_data_from_bq方法查询来自bigquery的数据:
def get_data_from_bq(product_ids):
format_strings = ','.join([("\"" + str(_id) + "\"") for _id in product_ids])
query = "select productId, eventType, count(*) as count from [xyz:xyz.abc] where productId in (" + format_strings + ") and eventTime > CAST(\"" + time_thresh +"\" as DATETIME) group by eventType, productId order by productId;"
query_job = bigquery_client.query(query, job_config=job_config)
return query_job.result()
Run Code Online (Sandbox Code Playgroud)
虽然对于第一个查询(迭代)返回的数据是正确的,但所有后续查询都抛出了下面提到的异常
results = query_job.result()
File "/home/ishank/.local/lib/python2.7/site-packages/google/cloud/bigquery/job.py", line 2415, in result
super(QueryJob, self).result(timeout=timeout)
File "/home/ishank/.local/lib/python2.7/site-packages/google/cloud/bigquery/job.py", line 660, in result
return super(_AsyncJob, self).result(timeout=timeout)
File "/home/ishank/.local/lib/python2.7/site-packages/google/api_core/future/polling.py", line 120, in …Run Code Online (Sandbox Code Playgroud) 每当我从中央存储库更新我的存储库时,我的master分支上就有某些合并提交。现在,每当我从master创建一个新分支时,这些提交就会出现在请求中,这很烦人。如何删除这些提交并在将来更新时避免它们?我知道有人问过这类问题,但对我来说还没有任何作用。
我正在开发一个android应用程序。当我尝试在模拟器上运行它时会崩溃。这是我的第一个android应用程序,我无法找出错误原因。有人可以指出错误吗?
LogCat
Shutting down VM
FATAL EXCEPTION: main
Process: io.github.ishankgulati.breakout, PID: 3589
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{io.github.ishankgulati.breakout/io.github.ishankgulati.breakout.BreakoutGame}: java.lang.IllegalAccessException: void io.github.ishankgulati.breakout.BreakoutGame.<init>() is not accessible from java.lang.Class<android.app.Instrumentation>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.IllegalAccessException: void io.github.ishankgulati.breakout.BreakoutGame.<init>() is not accessible from java.lang.Class<android.app.Instrumentation>
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at …Run Code Online (Sandbox Code Playgroud)