Thanks. (2) Makes sense to me. I don't exactly understand (1) still. In the doc you linked, it says: "Notice that the attributes have a specific prefix operation. When adding custom attributes, it's best practice to vendor your attributes (e.x. mycompany.) so that your attributes do not clash with semantic conventions." Does this mean I should prefix my custom attribute with "operation" and that's what you mean by top level? Eg set_attribute("operation.field1", ...) set_attribute("operation.field2", ...) So "operation" is a special prefix? As opposed to I am currently using "side_output"
Could you please keep me posted on what the eng team says? Or if there's another work around like if I log my custom attributes differently somehow or define a fixed schema
Yeah that makes sense
Thanks for looking. The column actually isn't present in the returned Data frame though, even if I add it to the columns arg, so I can't use that workaround. Also sometimes the where clause works with my custom attributes, sometimes it doesn't. I noticed if I query an older date range it works more often.
hi Dylan. yes absolutely. code snippet that hits the error mentioned above:
client = ArizeExportClient(api_key=settings.PHOENIX_API_KEY)
primary_df = client.export_model_to_df(
space_id=settings.PHOENIX_SPACE_ID,
model_id=settings.PHOENIX_PROJECT_NAME,
environment=Environments.TRACING,
start_time=datetime(2025, 9, 4, 22, 26, 24, 553878),
end_time=datetime(2025, 9, 4, 22, 27, 1, 743541),
columns=['context.span_id', 'context.trace_id', 'start_time', 'end_time',
],
where="""attributes.side_output.resolution is not null"""
)if i comment out the where clause, then there's no error and i get back some traces
client = ArizeExportClient(api_key=settings.PHOENIX_API_KEY)
primary_df = client.export_model_to_df(
space_id=settings.PHOENIX_SPACE_ID,
model_id=settings.PHOENIX_PROJECT_NAME,
environment=Environments.TRACING,
start_time=datetime(2025, 9, 4, 22, 26, 24, 553878),
end_time=datetime(2025, 9, 4, 22, 27, 1, 743541),
columns=['context.span_id', 'context.trace_id', 'start_time', 'end_time',
],
# where="""attributes.side_output.resolution is not null"""
)sample trace that i was hoping to retrieve (redacted some text fields)
{
"input": {
"mime_type": "text/plain",
"value": "...."
},
"llm": {
"token_count": {
"completion_details": {
"output": "0"
},
"prompt_details": {
"input": "0"
}
}
},
"openinference": {
"span": {
"kind": "CHAIN"
}
},
"output": {
"mime_type": "text/plain",
"value": "...."
},
"session": {
"id": "20250904-22:26:24-S1L1Orc0"
},
"side_output": {
"issue_info": {
"appliance_main_functionality_working": "Not Applicable",
"emergency": "True",
"issue_details": [
"...",
"...",
"..."
],
"issue_summary": "...",
"responsibility": "..."
},
"resolution": "HUMAN_ESCALATION"
},
"user": {
"id": "123-456-7890"
}
}hi i am having trouble with querying custom attributes using ArizeExportClient.export_model_to_df. the error is saying my attribute can't be found, but i can see it in the trace. i am using my custom attribute in both the where arg and columns arg
File ~/.local/share/virtualenvs/zenportai_mvp-ZWkb7xjr/lib/python3.13/site-packages/arize/exporter/core/client.py:132, in ArizeExportClient.export_model_to_df(self, space_id, model_id, environment, start_time, end_time, include_actuals, model_version, batch_id, where, similarity_search_params, columns, stream_chunk_size)
74 def export_model_to_df(
75 self,
76 space_id: str,
(...) 87 stream_chunk_size: Optional[int] = None,
88 ) -> pd.DataFrame:
89 """
90 Exports data of a specific model in the Arize platform to a pandas dataframe for a defined
91 time interval and model environment, optionally by model version and/or batch id.
(...) 130
131 """
--> 132 stream_reader, num_recs = self._get_model_stream_reader(
133 space_id=space_id,
134 model_id=model_id,
135 environment=environment,
136 start_time=start_time,
137 end_time=end_time,
138 include_actuals=include_actuals,
139 model_version=model_version,
140 batch_id=batch_id,
141 where=where,
142 similarity_search_params=similarity_search_params,
143 columns=columns,
144 stream_chunk_size=stream_chunk_size,
145 )
146 if stream_reader is None:
147 return pd.DataFrame()
File ~/.local/share/virtualenvs/zenportai_mvp-ZWkb7xjr/lib/python3.13/site-packages/arize/exporter/core/client.py:330, in ArizeExportClient._get_model_stream_reader(self, space_id, model_id, environment, start_time, end_time, include_actuals, model_version, batch_id, where, similarity_search_params, columns, stream_chunk_size)
328 flight_client = self.session.connect()
329 query = Query(query_descriptor)
--> 330 reader = query.execute(flight_client, self.session.call_options)
331 return reader
File ~/.local/share/virtualenvs/zenportai_mvp-ZWkb7xjr/lib/python3.13/site-packages/arize/exporter/core/query.py:22, in Query.execute(self, client, call_options)
16 def execute(
17 self,
18 client: flight.FlightClient,
19 call_options: flight.FlightCallOptions,
20 ) -> Tuple[flight.FlightStreamReader, int]:
21 try:
---> 22 flight_info = client.get_flight_info(
23 flight.FlightDescriptor.for_command(
24 json_format.MessageToJson(self.query_descriptor) # type: ignore
25 ),
26 call_options,
27 )
28 logger.info("Fetching data...")
30 if flight_info.total_records == 0:
File ~/.local/share/virtualenvs/zenportai_mvp-ZWkb7xjr/lib/python3.13/site-packages/pyarrow/_flight.pyx:1668, in pyarrow._flight.FlightClient.get_flight_info()
File ~/.local/share/virtualenvs/zenportai_mvp-ZWkb7xjr/lib/python3.13/site-packages/pyarrow/_flight.pyx:78, in pyarrow._flight.check_flight_status()
File ~/.local/share/virtualenvs/zenportai_mvp-ZWkb7xjr/lib/python3.13/site-packages/pyarrow/error.pxi:92, in pyarrow.lib.check_status()
ArrowInvalid: Flight returned invalid argument error, with message: Custom Filter Error: column "attributes.side_output.resolution" does not exist