Charts drawn with %%chart command do not render

做~自己de王妃 提交于 2019-12-11 13:37:59

问题


I have this query (a modified version of the query under the Line Chart section of the Datalab Tutorials notebook.)

`%%sql --module timeseries
SELECT HOUR(timestamp) AS timestamp, AVG(latency) AS latency,
FROM [cloud-datalab-samples:httplogs.logs_20140615]
WHERE endpoint = 'Popular'
GROUP BY timestamp`

followed by this call to %%chart

%%chart bars --fields timestamp,latency --data timeseries

but this doesn't seem to draw the required bar chart, even though I do not receive any error message. Am I missing something?


回答1:


It should be '--field', not '--fields', and there is no '--data'. So try:

%chart bars --field timestamp,latency timeseries

When I used your version, I did get an error message about 'too many data arguments', because the line parser tried to parse both '--data' and 'timeseries' as the positional data argument.



来源:https://stackoverflow.com/questions/33259662/charts-drawn-with-chart-command-do-not-render

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!