Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Select only some columns from a Phonograph2 table in Palantir Foundry Slate

My Foundry Slate app has a query to Phonograph2 using Table Search Service, endpoint Search. The Phonograph table has 50+ columns. The functioning query below would get all columns of rows fulfilling the filter condition object_id = the 2 values

{
  "tableRids": [
    "table_phonograph_rid_12344567"
  ],
  "filter": {
    "type": "terms",
    "terms": {
      "field": "object_id",
      "terms": ["abcd_1234", "efgh_8765"]
    }
  },
  "sort": {
    "year": {
      "order": "asc"
    }
  }
}
}

Instead of getting all the columns, is there a way to collect only 3 columns? I did some research on ElasticSearch query and tried things like adding a "columns": ["object_id", "year","name"] but it did not work. There is no info about this in Foundry documentation. Did anyone solve this problem?

{
  "tableRids": [
    "table_phonograph_rid_12344567"
  ],
  "columns": [
    "object_id", 
    "year",
    "name"
  ],
  "filter": {
    "type": "terms",
    "terms": {
      "field": "object_id",
      "terms": ["abcd_1234", "efgh_8765"]
    }
  },
  "sort": {
    "year": {
      "order": "asc"
    }
  }
}

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can add

"columnSelector": {"columnWhitelist": ["COL1", ...]}

to the query to select columns

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading