Expand my Community achievements bar.

SOLVED

how to make flat schema

Avatar

Level 8

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:

Michael_Soprano_0-1725898431109.png

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

image.png

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

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.

image.png

Avatar

Employee

Hello @Michael_Soprano 

 

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

Avatar

Employee

@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.

Avatar

Moderator

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