-
1. Re: Is it possible for Teiid to not return columns with null value?
shawkins Aug 8, 2014 7:42 AM (in response to madhurika_sharma)If you exclude those columns from the source metadata, then it will be as if they don't exist and won't be returned.
-
2. Re: Is it possible for Teiid to not return columns with null value?
madhurika_sharma Aug 11, 2014 2:00 AM (in response to shawkins)Hello Steven,
From your statement,"If you exclude those columns from the source metadata"- I concluded that the column with null values need to be removed from the Source Model itself.
Am i correct?
I have a column, say col A , which may have value or may be null. So at runtime , i want the output to not have col A in the odata output .
Example :
odata output :
{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "http://localhost:8080/odata/VDB/table(10)", "type" : "ModelName.tablename"
}, "A" : "val1", "B" : "val2","C":"val3",},
{
__metadata" : {
"uri" : "http://localhost:8080/odata/VDB/table(11)", "type" : "ModelName.tablename"
}, "A" : "null", "B" : "val2","C":"val3",},
Expected output:
{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "http://localhost:8080/odata/VDB/table(10)", "type" : "ModelName.tablename"
}, "A" : "val1", "B" : "val2","C":"val3",},
{
__metadata" : {
"uri" : "http://localhost:8080/odata/VDB/table(11)", "type" : "ModelName.tablename"
}, "B" : "val2","C":"val3",},
-
3. Re: Is it possible for Teiid to not return columns with null value?
rareddy Aug 11, 2014 10:06 AM (in response to madhurika_sharma)Why can't you issue query like
select a, b, c where a != null
then you get all the values where a is not null? unless you are asking for ODATA response document be just ignoring all the document fields that are null, that is separate issue.
Ramesh..
-
4. Re: Is it possible for Teiid to not return columns with null value?
madhurika_sharma Aug 12, 2014 1:55 AM (in response to rareddy)Using select a,b,c where a is not null will not return null value but it will also not return column b,c which have values.I want to return b and c values.
Yes, i want ODATA response to ignore the null column and the value null.
-
5. Re: Is it possible for Teiid to not return columns with null value?
rareddy Aug 12, 2014 11:13 AM (in response to madhurika_sharma)You can log an enhancement request for that.