Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Python tool: read yxdb from a file (not from input connection)

vcarey
7 - Meteor

 

Hi,

 

I'd like to use the Python tool, but import a yxdb file from a file path, NOT by connecting an input to the tool.


The reason for this is that when you use the usual import, first the file is loaded into Alteryx memory, then again loaded into Python memory upon Alteryx.read(), so you essentially double the memory usage for a dataset.  But if you only need the data for the Python process this is unnecessary and actually makes some tasks impossible.

 

Is there a way to do this?

 

Thanks!

12 REPLIES 12
schuprov
7 - Meteor

@tlarsen7572 Hi, I am relatively new to Python and currently trying to see if I can use YXDB files to provide data for my team instead of excel.
am i able to use your library to read in a YXDB file while using PIP? or is this only for using it within Alteryx?

 

Thank you

tlarsen7572
11 - Bolide
11 - Bolide

@schuprov, yes, you can use PIP. My package is published to pypi and is designed specifically to be used outside of Alteryx.

npeddagorla
7 - Meteor

Hello @tlarsen7572, I was able to install the yxdb package. How can we extract the data from the yxdb to a dataframe. Any sample code is appreciated.

 

from yxdb.yxdb_reader import YxdbReader

path = '//test.yxdb'

reader = YxdbReader(path=path)

 

After this what is the step to save the data into a dataframe

Labels
Top Solution Authors