Querying Data

Using one of your models that you have created you can query across your database.

Querying Relational Data

An example of querying the relational data in the industry model. This query pattern is available after you have mapped and standardized your data.

DEFINE industry_model = '{your_model_schema}';

SELECT * FROM "&industry_model".PERSON;

Querying JSON Data Based on Change Events

An example of querying the JSON data in the industry model. This query pattern is available after you have mapped and standardized your data.

DEFINE industry_model = '{your_model_schema}';

SELECT      PJ.JSON 
FROM        "&industry_model".DE_CHANGE_EVENT_BATCH             CEB
INNER JOIN  "&industry_model".DE_CHANGE_EVENT                   CE
 ON CEB.BATCH_ID = CE.BATCH_ID
INNER JOIN  "&industry_model".PERSON#JSON                       PJ
 ON CE.RECORD_UUID = PJ.RECORD_UUID
WHERE       CEB.LATEST_STATUS_TIMESTAMP > TO_TIMESTAMP('2000-01-01','YYYY-MM-DD');

Querying Language Data for AI

An example of querying the relational data in the industry model. This query pattern is available after you have mapped and standardized your data and gone through the steps for refining your data.

DEFINE industry_model = '{your_model_schema}';

SELECT      AL.SEMANTIC_SENTENCE
FROM        "&industry_model".UTILITY_ACCOUNT                   AC
INNER JOIN  "&industry_model".DYNAMIC_RELATED_ENTITIES          DRE
 ON AC.RECORD_UUID = DRE.ROOT_RECORD_UUID
INNER JOIN  "&industry_model".ALL#LANGUAGE                      AL
 ON DRE.RELATED_RECORD_UUID = AL.RECORD_UUID 
WHERE       AC.UTILITY_ACCOUNT_ID = '3066882735'