Dot Indexing not supported for Tall Array
이전 댓글 표시
Using Code:
dbds = databaseDatastore(conn,sqlquery);
tt = tall(dbds);
minPrice = min(tt.Price);
I receive the code
Error using matlab.io.datastore.internal/FrameworkDatastore/partition (line 144)
Failed to call matlab.io.datastore.DatabaseDatastore/partition. The error was:
Dot indexing is not supported for variables of this type.
Learn more about errors encountered during GATHER.
Error in tall/gather (line 50)
[varargout{:}] = iGather(varargin{:});
Any ideas how this could be going wrong?
댓글 수: 9
Sean de Wolski
2018년 7월 18일
What version of MATLAB?
Logan Riddick
2018년 7월 18일
Sean de Wolski
2018년 7월 18일
편집: Sean de Wolski
2018년 7월 18일
What is class of tt and classUnderlying(tt)?
Logan Riddick
2018년 7월 18일
Logan Riddick
2018년 7월 18일
Alexandre Laborde
2018년 10월 1일
Hello,
I am trying to connect matlab and a postgres db. I have a code very similar to yours and I get the same error.
con = database('postgres','postgres','zebrafish','Vendor','PostgreSQL');
query = 'SELECT * FROM public."TEST"';
tds = datastore(con,query);
talltable = tall(tds);
t1 = gather(talltable);
Evaluating tall expression using the Parallel Pool 'local': - Pass 1 of 1: 0% complete Evaluation 0% complete
Error using matlab.io.datastore.internal.FrameworkDatastore/partition (line 144)
Failed to call matlab.io.datastore.DatabaseDatastore/partition. The error was:
Dot indexing is not supported for variables of this type.
Learn more about errors encountered during GATHER.
Error in tall/gather (line 50)
[varargout{:}] = iGather(varargin{:});
How did you manage to fix this? I have reset MATLAB and the parallel cluster several times but it doesn't seem to fix anything.
Running the test Sean de Wolski ask you to do and I have this result.
>> class(talltable) = 'tall'
>> classUnderlying(talltable) = 'table'
Thanks in advance
Logan Riddick
2018년 10월 2일
편집: Logan Riddick
2018년 10월 2일
Alexandre Laborde
2018년 10월 2일
Thanks for you suggestion!
I have just tried what you suggested and I get the exact same error message. ?
I forgot to mention that the error occurs in the gather command.
Not sure if this helps but I tracked the error and it seems to be coming from a function called iGather inside gather at line 67 where iGather calls gather again.
[gatheredTalls{1:sum(isArgTall)}] = gather(tallArgs{:});
I am also sure this is not problem with memory or something like that since this is just a toy example and by database as 9 rows and 3 columns.
Since we are running the same version of matlab (R2018a) can you tell me what versions of postgres and the driver are you using so that I can check if I am running the same versions?
Thanks for the help!
Alexandre Laborde
2018년 10월 2일
Hey I think I got it!
In the fine print of the databaseDatastore documentation you can read that there is one limitation regarding the Parallel Computing Toolbox.
> The DatabaseDatastore object does not support using a parallel pool with Parallel Computing Toolbox™ installed. To analyze data using tall arrays or to run MapReduce algorithms, set the global execution environment to be the local MATLAB session by using mapreducer.
And after that it says to run mapreducer(0) to do that. That seems to solve this issue. now I get :
Evaluating tall expression using the Local MATLAB Session:
- Pass 1 of 1: Completed in 0 sec
Evaluation completed in 0 sec
instead of MATLAB trying to start the parallel pool.
I guess problem solved ?. Thanks for the databaseDatastore tip.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!