VENTES: 1-800-867-1389

 none
is there a way to list all partitionkey from a table?

    Question

  • if i have a table... have a lots of partition...

    is there a way i can perform a query to LIST all partition key (unique) from a table?

    Thanks

    vendredi 27 avril 2012 07:08

Réponses

  • No. You can enumerate all entities (and figure out the set of partition keys from there), but there's no way to just enumerate the partition keys.

    I'd recommend keeping track of them yourself (at the time you write the entities) if you're going to need this.

    • Marqué comme réponse shrimpy vendredi 27 avril 2012 08:05
    vendredi 27 avril 2012 07:35
  • Adding to Steve's response: As Steve mentioned that you would need to enumerate all entities and then figure out unique PartitionKeys. However if you use query projection and only fetch just the PartitionKeys ($select=PartitionKey), your response size will be much more smaller than fetching all attributes of your entities. Not sure about the performance when you fetch only few attributes though.

    • Marqué comme réponse shrimpy vendredi 27 avril 2012 08:05
    vendredi 27 avril 2012 07:47

Toutes les réponses

  • No. You can enumerate all entities (and figure out the set of partition keys from there), but there's no way to just enumerate the partition keys.

    I'd recommend keeping track of them yourself (at the time you write the entities) if you're going to need this.

    • Marqué comme réponse shrimpy vendredi 27 avril 2012 08:05
    vendredi 27 avril 2012 07:35
  • Adding to Steve's response: As Steve mentioned that you would need to enumerate all entities and then figure out unique PartitionKeys. However if you use query projection and only fetch just the PartitionKeys ($select=PartitionKey), your response size will be much more smaller than fetching all attributes of your entities. Not sure about the performance when you fetch only few attributes though.

    • Marqué comme réponse shrimpy vendredi 27 avril 2012 08:05
    vendredi 27 avril 2012 07:47