0

Trying to get email content using ymail tables

I have the following query in YQL
SELECT messages FROM ymail.msgcontent WHERE ( fid, mids ) IN ( SELECT folder.folderInfo.fid, mid FROM ymail.messages WHERE numMid-100 )
When executed I get a JSON string as follows (abbreviated for space) 
 
{
    messages:{
		part:[
			0:{},
			1:{},
			...
		]
    }
}
This is good and expected, count of return is 67.  However, when I try to break out the select statement rather than a *

SELECT folder.unread, folder.folderInfo.fid, message.part
FROM ymail.msgcontent
WHERE ( fid, mids ) IN ( SELECT folder.folderInfo.fid, mid
			FROM ymail.messages
			WHERE numMid-100 )
I receive the following result back

 
{
	messages:{
		part:{}
	}
},
{
	messages:{
		part:{}
	}
},
{
	messages:{
		part:{}
	}
}
count of results: 257;
Note that all the parts are broken out in to their own message object, this is quite sloppy.  Any way around this without using *?

Thank you in advance!

-Andrew


The 2 queries can be found here:
Using * in SELECT
Using message.part in SELECT

by
2 Replies

Recent Posts

in YQL