From 6dd83398a5cce55cbad1c970614410e5ff22a6db Mon Sep 17 00:00:00 2001 From: "xiaolei.zl" Date: Wed, 19 Jun 2024 03:05:04 +0000 Subject: [PATCH 1/2] add data_source --- flex/interactive/sdk/python/test/test_driver.py | 11 +++++++---- flex/openapi/openapi_interactive.yaml | 10 ++++++++++ flex/tests/hqps/engine_config_test.yaml | 4 ++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/flex/interactive/sdk/python/test/test_driver.py b/flex/interactive/sdk/python/test/test_driver.py index 44884e971761..d0f010d92277 100644 --- a/flex/interactive/sdk/python/test/test_driver.py +++ b/flex/interactive/sdk/python/test/test_driver.py @@ -53,6 +53,9 @@ from gs_interactive.models.schema_mapping_loading_config_format import ( SchemaMappingLoadingConfigFormat, ) +from gs_interactive.models.schema_mapping_loading_config_data_source import ( + SchemaMappingLoadingConfigDataSource, +) from gs_interactive.models.start_service_request import StartServiceRequest from gs_interactive.models.string_type import StringType from gs_interactive.models.string_type_string import StringTypeString @@ -156,13 +159,13 @@ def createGraph(self): def bulkLoading(self): assert os.environ.get("FLEX_DATA_DIR") is not None - person_csv_path = os.path.join(os.environ.get("FLEX_DATA_DIR"), "person.csv") - knows_csv_path = os.path.join( - os.environ.get("FLEX_DATA_DIR"), "person_knows_person.csv" - ) + location = os.environ.get("FLEX_DATA_DIR") + person_csv_path = "person.csv" + knows_csv_path = "person_knows_person.csv" print("test bulk loading: ", self._graph_id) schema_mapping = SchemaMapping( loading_config=SchemaMappingLoadingConfig( + data_source=SchemaMappingLoadingConfigDataSource(scheme="file", location=location), import_option="init", format=SchemaMappingLoadingConfigFormat(type="csv"), ), diff --git a/flex/openapi/openapi_interactive.yaml b/flex/openapi/openapi_interactive.yaml index f12f76c8b4d3..f8f2df293b39 100644 --- a/flex/openapi/openapi_interactive.yaml +++ b/flex/openapi/openapi_interactive.yaml @@ -1568,6 +1568,16 @@ components: loading_config: type: object properties: + data_source: + type: object + properties: + scheme: + type: string + enum: + - odps + - file + location: + type: string import_option: type: string enum: diff --git a/flex/tests/hqps/engine_config_test.yaml b/flex/tests/hqps/engine_config_test.yaml index a5d42fca55f2..b18a02b52570 100644 --- a/flex/tests/hqps/engine_config_test.yaml +++ b/flex/tests/hqps/engine_config_test.yaml @@ -1,11 +1,11 @@ directories: - workspace: /tmp/interactive_workspace + workspace: /tmp/temp_workspace subdirs: data: data logs: logs conf: conf log_level: INFO -default_graph: ldbc +default_graph: modern_graph compute_engine: type: hiactor workers: From 432b22dcb1388f7ff8252243abaacccb7d8d593b Mon Sep 17 00:00:00 2001 From: "xiaolei.zl" Date: Wed, 19 Jun 2024 03:15:26 +0000 Subject: [PATCH 2/2] fix --- flex/tests/hqps/engine_config_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flex/tests/hqps/engine_config_test.yaml b/flex/tests/hqps/engine_config_test.yaml index b18a02b52570..a5d42fca55f2 100644 --- a/flex/tests/hqps/engine_config_test.yaml +++ b/flex/tests/hqps/engine_config_test.yaml @@ -1,11 +1,11 @@ directories: - workspace: /tmp/temp_workspace + workspace: /tmp/interactive_workspace subdirs: data: data logs: logs conf: conf log_level: INFO -default_graph: modern_graph +default_graph: ldbc compute_engine: type: hiactor workers: