how to make flat schema | Community
Skip to main content
Michael_Soprano
September 9, 2024
Solved

how to make flat schema

  • September 9, 2024
  • 3 replies
  • 817 views

Is it possible to make flat Schema? I would like to move the data from that dataset into Accelerated Store and that's why I am asking about flat schemas:

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ankit_Chaudhary

Hi @michael_soprano 
You have to custom define all the fields which you can attach to a schema but it will still appear under your tenant ID to avoid conflict with other standard fields.

3 replies

Ankit_Chaudhary
Community Advisor
Ankit_ChaudharyCommunity AdvisorAccepted solution
Community Advisor
September 10, 2024

Hi @michael_soprano 
You have to custom define all the fields which you can attach to a schema but it will still appear under your tenant ID to avoid conflict with other standard fields.

brekrut
Adobe Employee
Adobe Employee
September 10, 2024

Hello @michael_soprano 

 

As noted above, any modifications to a schema will result in a fields being placed under the tenant object. 

brekrut
Adobe Employee
Adobe Employee
September 10, 2024

@michael_soprano 

 

What objects fields are you attempting to move from into a new dataSet.  You can use query service via selects with structs to insert data into object related fields.

arijitg
Adobe Employee
Adobe Employee
September 10, 2024

Hi @michael_soprano 

 

I'm not very sure what your end goals are but when you use accelerated store you can create your database, schema, table directly from query panel and that can be of a flat structure. Below is a sample code snippet if it helps -->

 

/* 

CREATE database my_database_name WITH (TYPE=QSACCEL, ACCOUNT=acp_query_batch);
CREATE schema my_database_name.my_model_name;
 
CREATE TABLE IF NOT exists my_database_name.my_model_name.my_table_name WITH ( DISTRIBUTION = REPLICATE ) AS
SELECT cast(null as int) buy_price,
cast(null as string) buy_product,
cast(null as string) buy_location,
cast(null as timestamp) buy_date
WHERE false;
*/
 
 
Regards,
Arijit Ghosh