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
MissingStoredProcError

Using the SDK CLI, I get the following error:

$ q2 get_installed_forms
2019-05-28T08:47:37.554 q2_sdk.general  ERROR    Error: Query for sdk_GetInstalledForms returned 0 records
Traceback (most recent call last):
  File "/Users/bmego/Code/sdk/antilles/.env/bin/q2", line 11, in <module>
    load_entry_point('q2-sdk', 'console_scripts', 'q2')()
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/core/q2.py", line 37, in main
    entrypoint_runner.execute()
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/core/cli/entrypoint_runner.py", line 135, in execute
    LOOP.run_until_complete(handle_coro)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/entrypoints/get_installed_forms.py", line 113, in handle
    installed_forms = await get_installed_forms(self.logger, self.hq_credentials)
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/entrypoints/get_installed_forms.py", line 10, in get_installed_forms
    return await Form(logger, hq_credentials).get()
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/hq/db/form.py", line 60, in get
    response = await self.call_hq('sdk_GetInstalledForms')
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/hq/db/db_object.py", line 39, in call_hq
    self.hq_response = await self._call_execute_stored_procedure(stored_proc_short_name, sql_parameters)
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/hq/db/db_object.py", line 58, in _call_execute_stored_procedure
    use_json=True
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/hq/hq_api/q2_api/ExecuteStoredProcedure.py", line 173, in execute
    return await get_json(params_obj)
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/hq/hq_api/q2_api/ExecuteStoredProcedure.py", line 192, in get_json
    response = await http.call_hq(body, url, params_obj.logger)
  File "/Users/bmego/Code/sdk/antilles/sdk/q2_sdk/hq/http.py", line 360, in call_hq
    missing_sproc_match.group(1)
q2_sdk.hq.exceptions.MissingStoredProcError: Stored Procedure sdk_GetInstalledForms not installed in the database
Posted 5 years ago
Mark Ostroth
309 × 5 Administrator
Votes Newest

Answers


Run the following from the command line:

q2 setup_db

The SDK does not run raw SQL against the database, instead relying on stored procedures installed at setup time. If the Stored Procedures have been removed or updated (perhaps you took an SDK upgrade or the SDK team has rebuilt your stack recently) they need to be reinstalled. The one liner above will take care of that for you.

Posted 5 years ago
Mark Ostroth
309 × 5 Administrator
127 Views
1 Answer
5 years ago
5 years ago
Tags