Closed Swarnitha-eluru closed 4 years ago
@Swarnitha-eluru can you give more details of what the db looks like and what your desired output is.
this is the data in my postgrsql i should read only id,name,phnno columns from the table and write to .csv file or whatever it is.
So your bug is that it is writing all the columns?
yes i need to write only selected columns i.e among id,name,address,age,phnno of my table i want to read and write only id,name,phnno
@roll any thoughts?
Hi @Swarnitha-eluru,
The data discovery API (skip/pick/etc) is quite new and experimental. I was able to find a similar problem in it for keyed resources (like SQL) and now it's fixed with tabulator@1.52.3
.
Please let me know if your problem still exists
ok thanks for the update
@roll I installed the version suggested by you.
I wrote code to skip some columns from the postgresql table.
The issue I found was when I need 4 columns out of 5 as per my example, its is showing the list of selected columns when I used stream.headers,but when i read them I am seeing only data of 3 columns for all the rows. This is what i find in my testing.
@Swarnitha-eluru thanks for reporting! I'll investigate tomorrow
@roll thankyou
Hi @Swarnitha-eluru,
Sorry for the delay with the answer but I wasn't able to reproduce your problem. Could please share the table dump and the code you run as a text?
Also could you please ensure that
print(tabulator.__version__)
# 1.52.3
hi @roll Its okay.I tested the version by including your print statement I got the version as 1.38.2 .I was really shocked as I installed 1.52.3 few days back when you suggested .So I uninstalled the tabulator its showed me that i uninstalled 1.52.3.
After uninstalling I again installed 1.52.3 .Then I ran my code snippet It worked me well. Thanks for solving and helping in this issue.
I need to specify particular columns and read them(as like select statement) from the postgresql database . I tried using pick_columns and skip_columns but it didnot worked it displayed only few columns out of specified ones. this is the code written
This is the output I got it is not able to show all when I read its only showing in selected headers.
![image](https://user-images.githubusercontent.com/46745717/84773651-5a4e7f00-affa-11ea-833b-064ea1ab091a.png)
So please suggest on this