mongo-arrow icon indicating copy to clipboard operation
mongo-arrow copied to clipboard

Setting partial Schema to find_arrow_all and find_pandas_all

Open frbelotto opened this issue 1 year ago • 3 comments

Hello guys, I would like to discuss about setting the Schema for find_arrow_all or find_pandas_all. I have a database with several columns, two of them are ObjetctIds that are crashing my code (I´ve reported here ), so, I am trying to import all my table columns but just setting such columns to be imported as strings

schema = Schema({'_id': pa.string(), 'referenciaConversao': pa.string()})
pd_confirmacao_conversao = find_pandas_all(pd_confirmacao_conversao, {'estadoContabilizacaoEvento': {'$lt': 100}}, schema=schema)

My issue here is that, as I only set the schema for those two columns, only those columns are being imported from the dataset! Is there any way to improve it?

frbelotto avatar Oct 14 '24 16:10 frbelotto

Hi @frbelotto Is this related to #242 or a separate question?

aclark4life avatar Oct 14 '24 19:10 aclark4life

Hi @aclark4life There I am reporting a issue/bug that I am facing. Here I propose an improvement/discussion about partial schema definition (that, in my case, is a workaround I´ve found for my issue!)

frbelotto avatar Oct 14 '24 19:10 frbelotto

@frbelotto Ah! OK thanks, we'll track both in INTPYTHON-256

aclark4life avatar Oct 18 '24 20:10 aclark4life