diff --git a/modules/graphstudio/images/download_prebuilt_solution.png b/modules/graphstudio/images/download_prebuilt_solution.png new file mode 100644 index 0000000..bfb0e07 Binary files /dev/null and b/modules/graphstudio/images/download_prebuilt_solution.png differ diff --git a/modules/graphstudio/images/import-options.png b/modules/graphstudio/images/import-options.png new file mode 100644 index 0000000..d54e650 Binary files /dev/null and b/modules/graphstudio/images/import-options.png differ diff --git a/modules/graphstudio/pages/export-and-import-solution.adoc b/modules/graphstudio/pages/export-and-import-solution.adoc index 73d1e03..2f21bb4 100644 --- a/modules/graphstudio/pages/export-and-import-solution.adoc +++ b/modules/graphstudio/pages/export-and-import-solution.adoc @@ -57,9 +57,22 @@ Click btn:[Import an Existing Solution] to upload a previously exported tar file image::import-solution.png[] +After uploading the file, you will see a dialog to customize the import options. + +image::import-options.png[] + +[NOTE] +==== +Enable UDF is optional. If you do not enable UDF, some solutions may fail to install if their queries or loading jobs require UDFs. +If you check the `Enable UDF` option, UDF will be enabled automatically when importing the solution, and will be disabled after the import is complete. +==== + [NOTE] ==== -In order to optimize the time required for import, the imported queries will not be installed but saved as drafts. You need to install them manually. +Install queries is optional. If you do not check the `Install Queries` option, the imported queries will not be installed but saved as drafts. +You can install them manually later. +If you check the `Install Queries` option, the imported queries will be installed automatically. +If you have a large number of queries, this may take a long time. ==== [WARNING] @@ -68,7 +81,107 @@ Please be extra cautious when importing databases as it can overwrite the curren Importing a new solution cannot be undone to restore the previous state, regardless of whether the import succeeds or fails. Therefore, create a complete backup beforehand in case you need to restore the database: xref:{page-component-version}@tigergraph-server:backup-and-restore:backup-cluster.adoc[] - -For security purposes, TigerGraph has two `gadmin` commands, `GSQL.UDF.Policy.Enable` and `GSQL.UDF.Policy.HeaderAllowlist` to prevent malicious code execution during import. -Please refer to the section on xref:{page-component-version}@gsql-ref:querying:func/query-user-defined-functions.adoc#_udf_security[UDF Security] to ensure that UDFs comply with the security specifications. This will help you import the solution successfully. ==== + +=== Install Pre-Built Solution + +==== Step 1: Download Solution + +Download the pre-built solution package by clicking the download button. + +image::download_prebuilt_solution.png[] + +==== Step 2: Enable UDF (Optional) + +If your tigergraph version is 4.2.1 or later, you can skip this step as we provide enable UDF option when import solution. + +By default, TigerGraph does not enable solutions with User-Defined Functions (UDF). You will need to enable UDF manually if required. + +*This step is required only for the following solutions:* + +- Application Fraud +- Entity Resolution + +Enable UDF by running the following commands in command line: + +[source,sh] +---- +gadmin config set GSQL.UDF.Policy.Enable false +gadmin config set GSQL.UDF.EnablePutExpr true +gadmin config set GSQL.UDF.EnablePutTokenBank true +gadmin config set GSQL.UDF.EnablePutTgExpr true +gadmin config apply -y +gadmin restart gsql -y +---- + +After importing the solution, you can disable UDF by running the following command: +[source,sh] +---- +gadmin config set GSQL.UDF.Policy.Enable true +gadmin config set GSQL.UDF.EnablePutExpr false +gadmin config set GSQL.UDF.EnablePutTokenBank false +gadmin config set GSQL.UDF.EnablePutTgExpr false +gadmin config apply -y +gadmin restart gsql -y +---- + +==== Step 3: Import Solution + +Follow the instructions in the <> section above to import the downloaded solution file. + +==== Step 4: Setup Queries for Insights Application (Optional) + +*This step is required for solutions with insights applications:* + +- Transaction Fraud +- Mule Account Detection +- Application Fraud +- Network Infrastructure + +{empty} + +After importing the solution, you may need to configure queries for the insights application to enable proper visualization and functionality. + +Step 4.1: Install Queries + +If your tigergraph version is 4.2.1 or later, we already provider install queries when import solution, so you may skip this step. + +By default, imported queries run in interpreted mode. For optimal performance, install the queries first. +For detailed instructions, see xref:write-queries.adoc#install-all-queries[Install All Queries]. + +Step 4.2: Preprocess Data + +Some solutions require running specific queries to preprocess the data before the insights application can display results properly. + +*This preprocessing step is required only for the following solutions:* + +- Mule Account Detection +- Transaction Fraud + +{empty} + +Use the GSQL web shell or command line to run the corresponding preprocessing queries. + +*Mule Account Detection* + +[source,gsql] +---- +use graph Mule_Account_Detection +run query account_account_with_weights() +run query tg_wcc_account_with_weights() +run query tg_pagerank_wt_account() +run query tg_shortest_path_length_account() +---- + +*Transaction Fraud* + +[source,gsql] +---- +use graph Transaction_Fraud +run query merchant_merchant_with_weights() +run query card_card_with_weights() +run query tg_wcc_card_weight_based() +run query tg_wcc_merchant_weight_based() +run query tg_pagerank_wt_merchant() +run query tg_pagerank_wt_card() +----