nerdexam
SnowflakeSnowflake

DEA-C02 · Question #134

DEA-C02 Question #134: Real Exam Question with Answer & Explanation

Sign in or unlock DEA-C02 to reveal the answer and full explanation for question #134. The question stem and answer options stay visible for context.

Data Transformation

Question

A Data Engineer needs to share customer data using an API with a partner application. The API will accept the JSON payload using this structure: All information can be found in table, CUSTOMER. There may be multiple rows for a single customer with different contact details. Which query will prepare the JSON payload in the required format? A. B. C. D.

Options

  • Aselect object_construct( 'username', username, 'contactDetails', object_construct( 'email', email, 'address', object_construct( 'City', city_name, 'Street', street_name, 'House_no', house_no, 'ZIP', zip_code ) ) ) ) as API_PAYLOAD from CUSTOMER;
  • Bwith customerSummary as ( select object_construct( 'email', email, 'address', object_construct( 'City', city_name, 'Street', street_name, 'House_no', house_no, 'ZIP', zip_code ) ) contacts, username from CUSTOMER ) select object_construct( 'username', username, 'contactDetails', array_agg(contacts) over (partition by username) ) as API_PAYLOAD from customerSummary;
  • Cselect array_agg(object_construct( 'email', email, 'address', object_construct( 'City', city_name, 'Street', street_name, 'House_no', house_no, 'ZIP', zip_code ) )) over (partition by username) as ContactDetails, username from CUSTOMER;

Unlock DEA-C02 to see the answer

You've previewed enough free DEA-C02 questions. Unlock DEA-C02 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#JSON#SQL Functions#Data Transformation#API Data Preparation
Full DEA-C02 PracticeBrowse All DEA-C02 Questions