1

How to find inside Gemfire region, what column defined as key during data load ?

List and describe is not giving required info

Example i am.looking something smiler to oracke "ALL_CONSTRAINTS" where you can run following sql to find primary key

        SELECT a.COLUMN_NAME
                FROM all_cons_columns a INNER JOIN 
               all_constraints c 
              ON a.constraint_name = c.constraint_name 
                    WHERE c.table_name = 'TBL'
                     AND c.constraint_type = 'P'
vaquar khan
  • 10,864
  • 5
  • 72
  • 96

2 Answers2

2

I have found , please find correct solution here

         query --query="select * from /region_name.keySet()"
vaquar khan
  • 10,864
  • 5
  • 72
  • 96
1

I'm not entirely sure about what you mean by find inside Region, but my guess is that you're trying to find wether a particular entry exists within a given GemFire region.

If that's the case, then you can use the get method from the Region class. If you want to use GemFire SHell directly instead of a custom Java application, on the other hand, you can use the get command. Last, but not least, you could also execute a OQL query with the query command, as an example: query --query="SELECT e.value FROM /MyRegion.entries e WHERE e.key='myKey'"

Hope this helps. Cheers.

Juan Ramos
  • 1,421
  • 1
  • 8
  • 13
  • GemFire is an in-memory data store, not a RDBMS system. That said, keep in mind that there are no "columns" within a GemFire region, just plain old java objects with different attributes. It's entirely your choice what to use as the region `key`, sometimes the actual `key` doesn't even belong to the object used as the value. In summary, the answer to your question would be no. – Juan Ramos Nov 07 '19 at 09:54