Table of contents
Official Content
  • This documentation is valid for:

It is possible to use a tool command line to connect to a database and extract the metadata in the necessary format to load it into Chat with Data Assistant. To do this, follow the steps below:

Step 1: DBMS Compatibility Verification

You can use this tool with any of the following DBMS: SQL Server, MySQL, PostgreSQL, Oracle, and SAP Hana.

Step 2: Choice of Connection Method

Select one of the supported connection methods: JDBC or ADO.NET.

  • JDBC is the only one compatible with all DBMS but requires Java installed and JAVA_HOME variable configuration.
  • Connection via ADO.NET is only compatible with SQL Server.

Step 3: Installing the tool

You can download the tool from this link.

Once the download is complete, unzip the .zip file.

Step 4: Table selection

To select certain tables from the database, generate an XML file with the following structure. This file must contain the names of the tables you want to select:

<?xml version="1.0" encoding="utf-8"?>
<Objects>
  <Object>
    <ObjName>TableName1</ObjName>
  </Object>
  <Object>
    <ObjName>TableName2</ObjName>
  </Object>
</Objects>

Once the XML file is generated, you can use the -selection=<filename> argument when invoking the tool, where <filename> is the name of the XML file you created.

Step 5: Running the tool

When running GXqueryDBRET.exe from the Windows Command Prompt without parameters, help is displayed with the arguments that can be passed through the command line.

For example, to run it against SQL Server:

GXqueryDBRET -dbms=1 -db=PruebaGXqueryDBRET -srv=Mysql 
-user=MyUserGX -pass=MyPasswordlGX -jdbc_port=1433 -jdbc_drv=3 
-jdbc_clspath=C:\jdbcdrivers\mysql-jdbc-10.2.0.jar

The tool will connect to the database and, if the connection is successful, it will obtain the metadata of the tables found. Next, it will generate a file with the database name and .export extension. This file is the one to upload to the Chat with Data Assistant.

Last update: February 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant