table.bulk_fetch() with meta attributes?

Daniel Manocchio
Daniel Manocchio Member Posts: 10
Photogenic First Comment

Hi Guys,

is there any way to have meta-attributes populated using the table.bulk_fetch() function without passing all their attribute definitions?

Calling bulk_fetch() with a list of (string) names only populates the attribute values, but not the meta-attribute values. Hence, I create a list of table attribute definitions containing both attributes and meta-attributes. When this list is used for calling bulk_fetch(), also the named meta-attributes are populated.

Now, I'm working on a project in which I generally need all the meta-attributes of a set of attributes. Building this list by table attribute definitiones is quite inconvenient. Hence I'm wondering whether there is a more elegant solution for this use case.

Ideas, anyone? :-)

Thanks in advance,
Daniel

Best Answer

  • Andy_Grigg
    Andy_Grigg Member, Employee Posts: 16
    First Answer First Comment First Anniversary 5 Likes
    Answer ✓

    Understood. I'll add the enhancement to the development backlog. We'll try to get to it (or something that satisfies the same use case) before the next release.

Answers

  • Andy_Grigg
    Andy_Grigg Member, Employee Posts: 16
    First Answer First Comment First Anniversary 5 Likes

    If you call Table.bulk_fetch() without any attributes specified, the scripting toolkit will fetch data for all attributes, meta-attributes, and pseudoattributes. If you need all attributes and meta-attributes, then this might be a good option.

    If not, we can look at an enhancement to be able to specify that all meta-attributes are included for the specified attributes in a bulk_fetch operation. This would probably be via an additional optional keyword argument on the bulk_fetch method.

    Please let me know what you think about the two options above.

  • Daniel Manocchio
    Daniel Manocchio Member Posts: 10
    Photogenic First Comment

    Hi Andy,
    thanks for your quick reply. Yeah, I've already used bulk_fetch() that way. However, for tables with a huge number of attributes and/or a higher number of records being processed, this becomes quite imperformant - at least on our system. So an additional argument like a boolean "include_metas=True" would be really great in some use cases :)

  • Daniel Manocchio
    Daniel Manocchio Member Posts: 10
    Photogenic First Comment

    Cool, thanks a lot! :)