Keerthesre1 opened a new issue, #30080:
URL: https://github.com/apache/beam/issues/30080
import apache_beam as beam
import pandas as pd
from psycopg.rows import dict_row
from datetime import datetime
import pandas as pd
from beam_postgres.io import ReadAllFromPostgres
with beam.Pipeline() as p:
print(datetime.now())
data = p | "Reading example records from database" >>
ReadAllFromPostgres(
"host=host dbname=db user=user password=passowrd",
'SELECT _id FROM "62a9c0ec85354b161b80df98" LIMIT 10000000',
dict_row,
)
data | "Writing to stdout" >> beam.Map(print)
print(datetime.now())
From the above code i am getting ouput in the {"key": "value"} pair but i
dont know how to convert to a Dataframe. Can someone help me with this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]