Hello,

I have an incoming arrow record batch without a schema attached coming in
over a UDP port as buf.to_pybytes. We dont want to attach the schema
because the schema is already known. So in my receive script I create my
schema, and I am trying to create an arrow stream reader where I pass in
the batch and the schema, but it says only one argument can be accepted
(meaning it only expected to see the stream and not the schema):

# Receive data
received_data, addr = sock.recvfrom(1024)
# make byte array
byte_stream = bytearray(received_data)
# Create a BytesIO object from the received data
stream = io.BytesIO(byte_stream)
schema = create_schema()
reader = pa.ipc.open_stream(stream, schema=schema)

How can I create an arrow stream reader for this use case?

Thank you in advance!

Amanda

Reply via email to