物联网机器学习:模型应用与实践
1. 物联网数据处理基础
在处理物联网数据时,首先要将数据接入并结构化。以下是具体步骤:
1. 配置事件位置和接收器超时时间
endingEventPosition = {
"offset": None,
"seqNo": -1,
"enqueuedTime": endTime,
"isInclusive": True
}
ehConf["eventhubs.recieverTimeout"] = 100
- 将数据放入Spark DataFrame
df = spark \
.readStream \
.format("eventhubs") \
.options(**ehConf) \
.load()
- 定义数据结构
from pyspark.sql.types import *
Schema = StructType([StructField("deviceEndSessionTime", StringType()),
StructField("se
超级会员免费看
订阅专栏 解锁全文
1060

被折叠的 条评论
为什么被折叠?



