With the Analyze database function, you can execute your own SQL queries against a connected database and display the result directly in Lucanet Consolidation & Financial Planning, without using a separate database tool. You can also browse the tables of the database, view the column structure and the number of records of each table, and view the technical details of the connection.

Typical use cases for the Analyze database function are:

  • Verifying the correctness of imported data by querying specific values and comparing the values of related tables
  • Analyzing the database of a source ERP system when investigating a data import problem

Access to the databases during the analysis is read-only.

The following databases can be analyzed with the Analyze database function:

DatabaseDescription
Lucanet.Financial WarehouseThe temporary and the persistent Lucanet.Financial Warehouse
Database of a source systemAny database that you can connect in Lucanet Consolidation & Financial Planning, for example the database of an ERP system.

The database can be located in the cloud or in your local network.

In Lucanet Consolidation & Financial Planning, the Analyze database button is displayed in the detail view of the following elements:

In the detail view of an element of type Connection, the button is displayed as follows, for example:

Shows the 'Configuration' tab of a connection in Lucanet Consolidation & Financial Planning with the 'Database' drop-down list. The 'Analyze database' button is outlined in red, next to the 'Test connection' button.
'Analyze database' button in the detail view of a connection

No separate permission is required for the Analyze database function. Access to the workspace that contains the respective element is sufficient.

To open the Analyze database dialog in Lucanet Consolidation & Financial Planning:

1

Click Analyze database.

2

For all database types except Lucanet.Cloud JDBC, Lucanet.Cloud JDBC MSSQL, and Lucanet.Data Lakehouse JDBC, the Connect dialog is displayed as follows, for example:

Shows the 'Connect' dialog of the 'Analyze database' function in Lucanet Consolidation & Financial Planning with the 'User name', 'Password', and 'Application' fields, and the 'Cancel' and 'Connect' buttons.
'Connect' dialog

Specify the following options:

  • User name and Password: the credentials of the database user with which the queries are executed. The user name is taken from the connection and can be changed.
  • Application: Execute on the server (default) for databases that are reachable from Lucanet.Cloud, or the name of a Lucanet.Script Execution Application (SEA) for databases in your local network (see Installing and Updating Lucanet.Script Execution Application).

Then click Connect.

For the database types Lucanet.Cloud JDBC, Lucanet.Cloud JDBC MSSQL, and Lucanet.Data Lakehouse JDBC, the Connect dialog is not displayed. The credentials stored in the connection are used, and the Analyze database dialog opens directly.

3

The Analyze database dialog is displayed as follows, for example:

Shows the 'Analyze database' dialog in Lucanet Consolidation & Financial Planning with the empty 'Catalog' and 'Schema' fields, a refresh icon, and the 'Query' and 'Connection information' buttons. Below them, the 'Tables' area contains the 'Load table information' button, and the 'Details' area displays the text 'Select a database table to view the details here.'.
'Analyze database' dialog

The following table describes the options of the Analyze database dialog in Lucanet Consolidation & Financial Planning:

OptionDescription
CatalogThe catalog of the database to which the table information and the queries are restricted.

The catalog is taken from the connection, if a catalog is configured there, and can be changed.
SchemaThe schema of the database to which the table information and the queries are restricted.

A database can contain several schemas, for example one schema per Lucanet.Financial Warehouse. The schema is taken from the connection, if a schema is configured there, and can be changed.
Refresh iconLoads the table information again with the current values of the Catalog and Schema fields (see Browsing the Tables of a Database)
QueryOpens an empty query window (see Running a Query)
Connection informationDisplays the technical details of the connection (see Viewing Connection Information)
TablesDisplays the tables of the database (see Browsing the Tables of a Database)
DetailsDisplays the structure of the table selected in the Tables area (see Viewing the Details of a Table)

In the Analyze database dialog, you can display all tables of the connected database, so that you can find the table you want to inspect or query without knowing the table names beforehand.

To browse the tables of a database in Lucanet Consolidation & Financial Planning:

1

If necessary, in the Catalog and Schema fields, change the catalog and the schema to which the table information is to be restricted.

2

In the Tables area, click Load table information.

The tables of the database are displayed as a tree in the Tables area: the catalog at the top level, the schemas below it, and the tables below each schema.

The table tree of the Analyze database function in Lucanet Consolidation & Financial Planning has the following characteristics:

  • If a comment is stored for a table in the database, a comment icon is displayed next to the table name.
  • Catalogs and schemas that do not contain any tables are not displayed.
  • If the database does not provide catalog information, the tables are grouped by schema only. If the database provides neither catalog nor schema information, the tables are displayed as a flat list.
  • If the database does not contain any tables, the text No tables found is displayed.

In the Details area of the Analyze database dialog, you can view the column structure and the number of records of a table, for example to understand the data structure before you write a query to verify imported data.

To view the details of a table in Lucanet Consolidation & Financial Planning, click the desired table in the Tables area.

The table is highlighted, and its structure is displayed in the Details area as follows, for example:

Shows the 'Analyze database' dialog in Lucanet Consolidation & Financial Planning. In the 'Tables' area, the tree with 'Catalog: main_lnfwh' and 'Schema: public' is expanded and the table 'Currency' is selected. The 'Details' area displays 'Number of records: 27', the 'Show query results' button, and a table with the columns 'Name', 'Lucanet data type', 'Comments', 'JDBC data type', 'Original data type', 'Length', and 'Number of decimal places' for the columns 'CurrencyCode', 'Name', and 'Description'.
Structure of a table in the 'Details' area

For each column of the selected table, the Details area displays the following information:

ColumnDescription
NameThe name of the column in the database
Lucanet data typeThe data type of the column in Lucanet, for example VarChar (3)
CommentsThe comment that is stored for the column in the database. The field is empty if no comment exists.
JDBC data typeThe data type of the column according to the JDBC driver, for example VARCHAR
Original data typeThe data type of the column in the database, for example varchar
LengthThe maximum length of the column values
Number of decimal placesThe number of decimal places of numeric columns

If you want to view the data of the table, click Show query results.

A query window opens with a SELECT * FROM statement for the selected table, and the query is run immediately (see Running a Query).

The connection information displays the technical details of the database connection that the Analyze database function uses, for example to confirm the driver and database versions when you investigate a connection problem.

To view the connection information in Lucanet Consolidation & Financial Planning, click Connection information in the Analyze database dialog.

The Connection information pop-up window is displayed as follows, for example:

Shows the 'Connection information' pop-up window of the 'Analyze database' function in Lucanet Consolidation & Financial Planning with the values 'Driver: PostgreSQL JDBC Driver', 'Driver version: 42.7.12', 'Database: PostgreSQL', and 'Database version: 16.11'.
'Connection information' pop-up window

The following table describes the information in the Connection information pop-up window in Lucanet Consolidation & Financial Planning:

InformationDescription
DriverThe name of the JDBC driver that is used for the connection
Driver versionThe version of the JDBC driver
DatabaseThe name of the database system
Database versionThe version of the database system

If the connection information cannot be retrieved, an error message is displayed instead.

You run SQL queries of the Analyze database function in a query window. The query window opens in a separate browser window. You can open the query window in one of the following ways:

  • Click Query in the Analyze database dialog to open an empty query window.
  • Click Show query results in the Details area to open a query window with a SELECT * FROM statement for the selected table. The query is run immediately (see Viewing the Details of a Table).

An empty query window is displayed as follows, for example:

Shows the empty query window of the 'Analyze database' function in Lucanet Consolidation & Financial Planning with the 'URL' line, the 'Records limit' field with the value 500, the empty 'SQL query' field, the disabled 'Run query' button, the 'Query history' button, and two arrow buttons. The 'Results' area displays the text 'Run a query to see result records here.'.
Query window before the first query

Under URL, the database against which your queries are executed is displayed. The Records limit field contains the maximum number of records that are displayed in the Results area: 500.

To run a query in Lucanet Consolidation & Financial Planning:

1

Specify the desired statement in the SQL query field.

Lucanet does not restrict the SQL statements. Which tables and data you can query does not depend on your permissions in Lucanet, but on the permissions of the database user that is configured in the connection.

For sample queries, see SQL Queries for Lucanet.Financial Warehouse.

2

Click Run query.

The result is displayed in the Results area below the field as follows, for example:

Shows the query window of the 'Analyze database' function in Lucanet Consolidation & Financial Planning with the statement 'SELECT * FROM "public"."Currency"' in the 'SQL query' field and the result below it. In the upper right, the 'Records limit' field with the value 500 is displayed. Above the result table, the text 'Finished. In total, 27 records were read.' is displayed. The row below the column headers 'CurrencyCode', 'Name', and 'Description' displays the data type 'VarChar' of each column.
Query window with the result of a statement

Above the result, the total number of records read is displayed. Below the column headers, the data type of each column is displayed.

The Records limit applies to the display only and cannot be changed. The query itself always runs to completion on the database, which is why the total number of records read can be higher than the number of records displayed.

If the statement cannot be executed, an error message is displayed in the Results area. The message comes from the database and can be a technical message.

Queries on very large tables can return several million records. Restrict the result set in the statement itself using the syntax of the target database, for example LIMIT in PostgreSQL or TOP in MS SQL Server.

The query history lists the statements that you have run in a query window of the Analyze database function, so that you can repeat a query without typing it again. Each statement is added to the query history automatically when you click Run query.

To reuse a query from the query history in Lucanet Consolidation & Financial Planning:

1

In the query window, click Query history.

The Query history dialog is displayed as follows, for example:

Shows the 'Query history' dialog of the 'Analyze database' function in Lucanet Consolidation & Financial Planning with two SQL statements, the most recent at the top. Each entry has a copy icon and a delete icon on the right. Below the entries, the 'Delete history' button is displayed.
'Query history' dialog

The statements are listed with the most recently run statement at the top.

2

Click the desired statement.

The statement is inserted into the SQL query field, and the Query history dialog closes.

3

Click Run query.

The following table describes the further options for working with the query history of the Analyze database function in Lucanet Consolidation & Financial Planning:

OptionDescription
Copy query iconInserts the statement into the SQL query field. The Query history dialog remains open.
Delete query iconDeletes the statement from the query history
Delete historyDeletes all statements from the query history
Previous query and Next queryThe arrow buttons next to Query history insert the previous or the next statement of the query history into the SQL query field, without opening the Query history dialog.

The query history belongs to the query window in which the statements were run. The query history is deleted when you close the query window or the Analyze database dialog, and it is not kept between sessions.

In Lucanet Consolidation & Financial Planning, you can open multiple query windows at the same time and position them next to each other, so that you can compare the data of related tables side by side. Each window keeps its own connection, statement, result, and query history. Opening a new window does not affect the windows that are already open.

This content was generated using AI and reviewed by Lucanet subject matter experts before publication.