This tutorial will help you select and configure an SQL client for accessing the database schemas used by Semarchy xDM.
This tutorial is the first unit within the Data Publishing & Consumption track, which is composed of SQL-based and REST-based tutorials.
The current unit is a prerequisite for the next SQL-based units of the Data Publishing & Consumption track.
The sample customer data in this tutorial is modeled after the customers of a bicycle retailer that sells high-end bikes and cycling accessories.
Before beginning this unit, you must have set up Semarchy xDM and completed the Customer B2C demo tutorial. If you have not yet, follow the Quick Install and Demo Applications tracks from the main Tutorials menu.
Otherwise, enjoy this tutorial!
If you have completed the Install Semarchy xDM on-premises tutorial, then you already have successfully installed a client and used it to run the schema creation statements:
In that case, you can use this client to connect to the xDM repository and data location schemas. Simply follow the instructions in the section associated with this client.
If you have not installed any SQL client yet, you can install one of those or use DBeaver, a free universal client. Download DBeaver Community Edition, which is sufficient to follow the Data Publishing & Consumption tutorial track.
Now that you have selected an SQL client, you are ready to connect to the database.
If you have installed xDM using the AWS or Azure Quickstart virtual machine:
If you have installed xDM on a local machine, connect to the database using the default or universal client:
Amazon Web Services (AWS) and Microsoft Azure apply default security practices to lock down access to your virtual machine and the PostgreSQL database that is installed on it.
However, to access the PostgreSQL database and perform tasks such as querying and loading data via the SQL API, you need to:
This section describes how to configure inbound rules on AWS and Azure. The activation of the SSH tunnel is described in the sections dedicated to pgAdmin and DBeaver configuration.
In the case of AWS, connecting remotely requires adding two inbound rules to your AWS security group to allow SSH and PostgreSQL access:
22
(pre-selected)Skip ahead to ⓸ Connect to PostgreSQL with pgAdmin or ⓻ Connect to any database with DBeaver, depending on the SQL client you are using.
In the case of Azure, connection through the SSH port (22) is enabled by default. In this section, you will check that SSH connections have not been restricted, and enable them if needed only.
{your IP address or range of IP you want to grant access to}
22
SSH
You have successfully enabled remote connections to PostgreSQL.
Next, you will connect to the database using pgAdmin. If you want to connect using DBeaver instead, go to ⑦ Connect to any database with DBeaver.
In this section, you will add two connections in pgAdmin to access the repository and data location schemas for PostgreSQL.
Adding a connection for semarchy_repository
lets you access xDM metadata.
semarchy_repository
).{hostname or IP address of the database server}
127.0.0.1
if you have it installed on your local machine).127.0.0.1
. You will configure an SSH tunnel into the virtual machine.{port for the database instance}
(5432
by default)semarchy_repository
{your password as per your database setup}
(by default: same as username)22
ubuntu
{your password for semarchy_repository}
(by default: same as username)Repeat the same operations to add a connection for semarchy_customer_b2c_mdm
. This lets you access the data location where business data is stored.
semarchy_customer_b2c_mdm
).{same host as for the
semarchy_repository
connection}
{same port as for the
semarchy_repository
connection}
semarchy_customer_b2c_mdm
{your password as per your database setup}
(by default: same as username){IP address or DNS name of remote server}
22
ubuntu
{your password for semarchy_customer_b2c_mdm}
(by default: same as username)Now that you have successfully established connections to PostgreSQL schemas, jump to ⑧ Browse the database objects.
In this section, you will add two connections in SQL Developer to access the repository and data location schemas for Oracle, in addition to the SYSTEM connection.
SYSTEM
system
{your password as per your database setup}
(by default: same as username){hostname or IP address of the database server}
(use 127.0.0.1
if you have it installed on your local machine) {port for the database instance}
(1521
by default){SID for your database instance}
(entered during the initial setup)SEMARCHY_REPOSITORY
.SEMARCHY_REPOSITORY
SEMARCHY_REPOSITORY
{your password as per your database setup}
(by default: same as username){same hostname as for the
SYSTEM
connection}
{same port as for the
SYSTEM
connection}
{same SID as for the
SYSTEM
connection}
This lets you access xDM metadata.
SEMARCHY_CUSTOMER_B2C_MDM
.SEMARCHY_CUSTOMER_B2C_MDM
SEMARCHY_CUSTOMER_B2C_MDM
{your password as per your database setup}
(by default: same as username){same hostname as for the
SYSTEM
connection}
{same port as for the
SYSTEM
connection}
{same SID as for the
SYSTEM
connection}
This lets you access the data location where business data is stored.
Now that you have successfully established connections to Oracle schemas, jump to ⑧ Browse the database objects.
In this section, you will add two connections in SQL Server Management Studio to access the repository and data location schemas.
{hostname or IP address of the database server}
(use 127.0.0.1
if you have it installed on your local machine)SEMARCHY_REPOSITORY
{your password as per your database setup}
(by default: same as login){same server name as for the
SEMARCHY_REPOSITORY
connection}
SEMARCHY_CUSTOMER_B2C_MDM
{your password as per your database setup}
(by default: same as login)Now that you have successfully established connections to SQL Server schemas, jump to ⓼ Browse the database objects.
DBeaver allows you to connect to any database (PostgreSQL, Oracle, SQL Server, etc.). The following screenshots are showing PostgreSQL but can be easily adapted to other databases.
In this section, you will add two connections:
semarchy_repository
to access xDM metadata.semarchy_customer_b2c_mdm
to access data locations where business data is stored.{hostname or IP address of the database server}
127.0.0.1
if you have it installed on your local machine) 127.0.0.1
. You will configure an SSH tunnel into the virtual machine.{port for the database instance}
(by default, 5432
for PostgreSQL, 1521
for Oracle, and 1433
for SQL Server)semarchy_repository
{your password as per your database setup}
(by default: same as username){IP address or DNS name of the remote server}
22
ubuntu
{your password for semarchy_repository}
(by default: same as username)semarchy_repository
). Repeat the same operations to add a connection for semarchy_customer_b2c_mdm
:
{same hostname as for the
semarchy_repository
connection}
{same port as for the
semarchy_repository
connection}
semarchy_customer_b2c_mdm
{your password as per your database setup}
(by default: same as username){IP address or DNS name of the remote server}
22
ubuntu
{your password for semarchy_customer_b2c}
(by default: same as username)semarchy_customer_b2c_mdm
).Now that you have successfully established connections to the database schemas, you are ready to have a look at the database objects.
semarchy_repository
connection and go to databases > postgres > schemas in the left navigation panel.semarchy_repository
schema and unfold the Tables element.customer_b2c_mdm
connection, the customer_b2c_mdm
schema contains all tables of the data location used by the Customer B2C demo application.SD_xxx
: source dataSA_xxx
: source authoring dataMD_xxx
: master dataGD_xxx
: golden dataWell done! In this first unit of the Data Publishing & Consumption track, you have learned how to configure an SQL client for Semarchy xDM. You are now ready to query and load data using the SQL API.
In the next unit of the Data Publishing & Consumption track, Query data via the SQL API, you will learn how to query data in xDM via the SQL API. You will learn basic and advanced queries as well as integration concepts, such as the difference between fuzzy-matching and basic entities.
To explore other resources, return to the Tutorials menu.
Thank you for completing this tutorial.