Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Is there a table i can use instead of a vault to store a small-sized json data?

Hello — we have an extension that displays a set of information to our users, and this information is currently hard-coded. Specifically, it consists of a list of three objects, each with eight (string) attributes. A small size data

In the near future, this information may change (possibly once or twice a year), so we’re looking to move it to a location where it can be updated without requiring a code change.

Would Vault be a good choice for this, or is there a table we could use instead?

Thank you very much in advance and have a great Happy New Year as well.

Votes Newest

Answers


Happy New Year!

For your use case (small, not user specific, non-sensitive data, changes 1-2x/year), I might recommended WEDGE_ADDRESS_CONFIGS.

WEDGE_ADDRESS_CONFIGS stores configuration data in the Q2 database (WedgeAddress table) and is specifically designed for configuration data that may change occasionally. You can define default values in your extension code, and then update them later via the Configuration Editor on Q2Developer.com (available under Self Service) without requiring any code changes or redeployment.

These resources provide excellent explanations of the use cases and reasoning behind WEDGE_ADDRESS_CONFIGS.:
Tutorial: https://docs.q2developer.com/tutorials/online_banking/configuration.html
Video: https://cdn.q2developer.com/sdk/docs/video/Configuration.mp4

Implementation Example:

class YourExtensionHandler(Q2TectonServerRequestHandler):
    WEDGE_ADDRESS_CONFIGS = DbConfigList([
        DbConfig('display_data', json.dumps([
            {"attr1": "value1", "attr2": "value2", ...},
            {"attr1": "value1", "attr2": "value2", ...},
            {"attr1": "value1", "attr2": "value2", ...}
        ]))
    ])
    
    async def default(self):
        data = json.loads(self.wedge_address_configs['display_data'])
        # Use your data in your extension
Posted 9 months ago
0

Thank you very much, Ash! This is perfect

— Edward Kim   9 months ago
121 Views
1 Answer
9 months ago
9 months ago