This topic explains how to validate your data model using ad hoc queries, ensuring that the derived metric accurately computes the total order amount for the West Lake Longjing category over the past day.
Procedure
Navigate to the Dataphin home page and select Development from the top menu bar.
Proceed as follows to access the New Ad Hoc Query dialog box.

In the New Ad Hoc Query dialog box, set the following parameters:
Parameter
Description
Name
Specify as Data Validation.
Description
Provide a concise description, such as Getting Started Data Validation.
Select Directory
Choose the Default Configuration.
Click OK to confirm.
On the Code Writing page, input the necessary code to determine if the data aligns with expectations.
Enter the following command and click Run to check the synchronization of the Product Table Data Integration.
SELECT * FROM dataphin_tutorial.product WHERE product_id IS NOT NULL;Enter the following command and click Run to validate the Product Logical Dimension Table data.
SELECT * FROM LD_dataphin_tutorial.dim_products WHERE ds IS NOT NULL;Enter the following command and click Run to assess the Order Purchase Logical Fact Table data.
SELECT * FROM LD_dataphin_tutorial.fct_order_buy_di WHERE ds IS NOT NULL;Enter the following command and click Run to confirm the Logical Aggregate Table data integrity.
SELECT * FROM LD_dataphin_tutorial.dws_all WHERE ds IS NOT NULL ;