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{:});
This code is pretty much straight out of the matlab documentation found here
Any ideas how this could be going wrong?

9 Comments

What version of MATLAB?
What is class of tt and classUnderlying(tt)?
class(tt) = table classUnderlying(tt) = tall
Got it figured out. I was using parallel computing toolbox, and hadn't restarted my matlab. For some reason, tt was being overwritten as an evaluated MXM table instead of the true Mx24 tall table. Thanks for the help
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
Have you tried using
tds = databaseDatastore(conn, query);
instead of
tds = datastore(conn,query);
From my understanding, datastore loads a file from a specified location on your machine, or more specifically points to a file so you don't need to load it into your workspace. See help page for datastore here
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!
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.

Sign in to comment.

Answers (0)

Products

Release

R2018a

Asked:

on 18 Jul 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!