Hello Team I’m exploring <Rest.li>. looking for wa...
# all-things-deployment
b
Hello Team I’m exploring Rest.li. looking for way to get schema’s all tables and there columns. any advice is appreciated e.g
Copy code
curl --location --request POST '<http://localhost:8080/entities?action=list>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "entity": "dataset",
    "filter": {
        "criteria": [
            {
                "condition": "CONTAIN",
                "field": "name",
                "value": "hive"
            }
        ]
    },
    "start": 0,
    "count": 10000
}'
e
Hey! Try to use action=filter
and use the following filter!
Copy code
"filter": {
        "or": [
            {
                "and": [
                    {
                        "field": "platform",
                        "value": "hive"
                    }
                ]
            }
        ]
    }
If you want it for a specific schema, that is a different container, use
Copy code
"filter": {
        "or": [
            {
                "and": [
                    {
                        "field": "container",
                        "value": "<<container-name>>"
                    }
                ]
            }
        ]
    }
b
I tried but no result
Copy code
"filter": {
        "or": [
            {
                "and": [
                    {
                        "field": "container",
                        "value": "fct_users_created"
                    }
                ]
            }
        ]
    }
e
is container information ingested? i.e. do you see containers in the filter panel when you search?
oh wait ah
i realize why containers might not work here
So after discussion, realized this is not going to work bc container urns are GUID based and doesn’t contain any information about the container within. In your use case, would you be able to first fetch the container urn for the given value by doing another filter (or search) query? so step 1: fetch the container urn for fct_users_created. then do the above query with “field”: “container.keyword”, “value”: “<<fetched-urn>>”
b
No luck do you have working sample?
e
so first
Copy code
{
  "entity": "container",
  "start": 0,
  "count": 1000,
  "filter": {
    "or": [
      {
        "and": [
          {
            "field": "name",
            "value": "demo_pipeline"
          }
        ]
      }
    ]
  }
}
this returns me a list of entities. if you fetch values.entities.[].entity you will be able to get the urn of container matching the name
Let’s say the urn is “urnlicontainer:2acc705b53c7b4f2f9a04390a72e22fb” run filter action with below body
Copy code
{
  "entity": "dataset",
  "start": 0,
  "count": 1000,
  "filter": {
    "or": [
      {
        "and": [
          {
            "field": "container.keyword",
            "value": "urn:li:container:2acc705b53c7b4f2f9a04390a72e22fb"
          }
        ]
      }
    ]
  }
}
b
Thank you