From 89b98aea91108a1d0d244baf15b154bf8cd2601f Mon Sep 17 00:00:00 2001 From: Andrew Nepogoda Date: Fri, 29 Sep 2023 14:45:43 +0200 Subject: [PATCH] Add bound for import config (#29) --- cli-e2e-test/rel/city.rel | 3 --- cli-e2e-test/rel/device.rel | 3 --- cli-e2e-test/rel/device_seen.rel | 3 --- cli/README.md | 2 +- workflow/__init__.py | 2 +- workflow/query.py | 2 ++ 6 files changed, 4 insertions(+), 11 deletions(-) diff --git a/cli-e2e-test/rel/city.rel b/cli-e2e-test/rel/city.rel index 2922ead..b9deb1f 100644 --- a/cli-e2e-test/rel/city.rel +++ b/cli-e2e-test/rel/city.rel @@ -1,6 +1,3 @@ -bound import_config:city_data:schema -bound syntax:header - module city_data def CITY_NAME[idx, row] = source_catalog:city_data[idx, :city, row] end diff --git a/cli-e2e-test/rel/device.rel b/cli-e2e-test/rel/device.rel index c49b36b..08116c6 100644 --- a/cli-e2e-test/rel/device.rel +++ b/cli-e2e-test/rel/device.rel @@ -1,6 +1,3 @@ -bound import_config:device_data:schema -bound syntax:header - module device_data def DEVICE_NAME[idx, row] = source_catalog:device_data[idx, :device, row] end diff --git a/cli-e2e-test/rel/device_seen.rel b/cli-e2e-test/rel/device_seen.rel index 7b873f3..8f84abb 100644 --- a/cli-e2e-test/rel/device_seen.rel +++ b/cli-e2e-test/rel/device_seen.rel @@ -1,6 +1,3 @@ -bound import_config:device_seen_snapshot:schema -bound syntax:header - module device_seen_snapshot def DEVICE_NAME[idx, row] = source_catalog:device_seen_snapshot[idx, :device, row] def LAST_SEEN[idx, row] = source_catalog:device_seen_snapshot[idx, :last_seen, row] diff --git a/cli/README.md b/cli/README.md index 8b1a9d8..54ebf5b 100644 --- a/cli/README.md +++ b/cli/README.md @@ -6,7 +6,7 @@ This Command-Line Interface (CLI) is designed to provide an easy and interactive 1. Create a batch configuration (ex. `poc.json`) file using the syntax and structure outlined in the [RAI Workflow Framework README](../workflow/README.md). 2. Add `rai-workflow-manager` as dependency to your `requirements.txt` file: ```txt -rai-workflow-manager==0.0.16 +rai-workflow-manager==0.0.17 ``` 3. Build the project: ```bash diff --git a/workflow/__init__.py b/workflow/__init__.py index 71919d8..9a98cd7 100644 --- a/workflow/__init__.py +++ b/workflow/__init__.py @@ -12,5 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version_info__ = (0, 0, 16) +__version_info__ = (0, 0, 17) __version__ = ".".join(map(str, __version_info__)) diff --git a/workflow/query.py b/workflow/query.py index b570532..bb5428b 100644 --- a/workflow/query.py +++ b/workflow/query.py @@ -314,6 +314,8 @@ def _multi_part_load_config_query(rel_name: str, file_type: FileType, config_int f"def syntax:header = {IMPORT_CONFIG_REL}:{rel_name}:syntax:header" return f""" +bound {IMPORT_CONFIG_REL}:{rel_name}:schema +bound {IMPORT_CONFIG_REL}:{rel_name}:syntax:header module {_config_rel_name(rel_name)}[i in part_indexes] {schema} {config_integration}