我根据以下代码编写了一个示例 https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/sql_taxi.py
我收到一条错误消息
/usr/local/lib/python3.6/dist-packages/apache_beam/typehints/schemas.py in typing_to_runner_api(type_) 177 array_type=schema_pb2.ArrayType(element_type=element_type)) 178 --> 179 raise ValueError("不支持的类型: %s" % type_) 180 181
ValueError:不支持的类型:任何
代码的对应部分是
mean_open_close = ( csv_lines |beam.Map( lambda x: beam.Row( element_date=x['Date'], element_open=x['Open'], element_close=x['Close'])) | SqlTransform( """ SELECT element_date, AVERAGE(element_open) AS average_open, AVERAGE(element_close) AS average_close FROM PCOLLECTION""")
)