Embedded DQL deployment

Read(243) Label: embedded, jdbc,

When the metadata file is stored locally, you can use the embedded method to quickly integrate DQL into your project without specifically deploying the DQL Server. Do that according to the following directions:

1. Loding necessary jar files

Add theses jar files to the project’s lib directory, and load them through the path [esProc installation root directory]/esProc/lib:

esproc-bin-***.jar  DQL computing engine and DQL JDBC driver

esproc-ext-***.jar  DQL computing engine and DQL JDBC driver

esproc-ent-***.jar  DQL computing engine and DQL JDBC driver

json-20240303.jar  For parsing JSON strings

lz4-1.3.0.jar  For compressing ctx files

  1. Configuration file

When the path of composite table file configured in the metadata file is a relative one, it is relative to the main directory. Configure the main directory under <mainPath> node in the raqsoftConfig.xml file, whose contents are as follows:

<?xml version="1.0" encoding="UTF-8"?><Config Version="3">

<Runtime>

<esProc>

<mainPath>D:\ctxFile</mainPath>

<!— Set serial number for Professional Edition / Enterprise Edition -->

<serialNo>ACTAYQQPWIQOU</serialNo>

</esProc>

</Runtime>

</Config>

  1. Connecting to DQL JDBC

Driver — com.esproc.dql.jdbc.DQLDriver

URL — jdbc:esproc:dql://?config=[]&glmd=[]&gdct=[]&querymode=[]

Parameters:

config: The xml format configuration file mentioned in step 2. You can define your own file name. This parameter can be absent and its default is raqsoftConfig.xml in the class path.

glmd: The metadata file.

gdct: The dictionary file.

gvsb: The visibility file.

macro: Macro deployment file.

user: Character name, which is used to read the macro corresponding to the user in the macro file. If multiple characters are configured in macro, you need to specify a character through this parameter. If only one character is configured, this parameter can be omitted.

querymodeSpecify the query mode. Its value can be dql, which is default, or sql. Value sql means using the SQL syntax, which will be automatically translated to DQL syntax for execution. This parameter is used in scenarios where SQL statements need to be manually edited, such as JAVA invocation.

Note: A file path configured in any of the parameters can be an absolute path or a classpath. A relative path is not supported for the time being.