【发布时间】:2017-06-07 07:36:49
【问题描述】:
我有一个流分析应用程序,其中的事件是 JSON 编码的,看起来像这样
{customerID: 45, state:"S2" , timestamp:"2017-06-06 14:19:21.77"}
{customerID: 74, state:"S2" , timestamp:"2017-06-06 14:19:26.61"}
{customerID: 79, state:"S2" , timestamp:"2017-06-06 14:19:28.50"}
{customerID: 10, state:"D" , timestamp:"2017-06-06 14:19:31.79"}
{customerID: 70, state:"S2" , timestamp:"2017-06-06 14:19:31.93"}
{customerID: 37, state:"S2" , timestamp:"2017-06-06 14:19:32.17"}
{customerID: 41, state:"D" , timestamp:"2017-06-06 14:19:33.48"}
我有一个 CSV 文件中的客户参考数据,如下所示:
"CUST_ID", "Age", "Rich"
1, "50", "Y"
2, "22", "N"
我以上述格式加载数据文件并测试以下查询
select A.[CUSTOMERID], A.[state], B.[AGE], B.[GENDER_CODE] from clickstream A timestamp by A.[TIMESTAMP] left join refdata B on A.[CUSTOMERID]=B.[CUST_ID]
现在,如果将数据引用数据表示为 JSON,则相同的查询可以完美运行。有没有我可以查看 CSV 参考数据的工作示例?
【问题讨论】:
标签: azure azure-stream-analytics