Dot Indexing not supported for Tall Array
Show older comments
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 Comments
Sean de Wolski
on 18 Jul 2018
What version of MATLAB?
Logan Riddick
on 18 Jul 2018
Sean de Wolski
on 18 Jul 2018
Edited: Sean de Wolski
on 18 Jul 2018
What is class of tt and classUnderlying(tt)?
Logan Riddick
on 18 Jul 2018
Logan Riddick
on 18 Jul 2018
Alexandre Laborde
on 1 Oct 2018
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
on 2 Oct 2018
Edited: Logan Riddick
on 2 Oct 2018
Alexandre Laborde
on 2 Oct 2018
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
on 2 Oct 2018
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.
Answers (0)
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!