@mohaseeb
我正在尝试下面的示例将数据从 pub\sub 写入 postgresql。将 pub\sub 数据写入 postgresql 时出现以下错误。“/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/result.py”,第 545 行,在 _colnames_from_description colname = description_decoder(colname) TypeError: expected bytes, str found [while running ‘Writing to DB /ParDo(_WriteToRelationalDBFn)-ptransform-74904']
你能帮忙修一下吗?
months = p | "Reading month records" >> beam.Create([
{'name': 'Jan', 'num': 1},
{'name': 'Feb', 'num': 2},
])
months | 'Writing to Sqlite table' >> relational_db.Write(
source_config=relational_db.SourceConfiguration(
drivername='sqlite',
database='/tmp/months_db.sqlite',
create_if_missing=True
),
table_config=relational_db.TableConfiguration(
name='months',
create_if_missing=True```