What is the difference between 'schema name' and 'schema suffix'?

#1

And what are the use cases of each?

0 Likes

#2

When you have deeply nested included types/arrys/mapps, the physical name of the column using ‘schema name’ will concatenate all schema names with underscores between them. So, for example, if you have a 4 level nesting in included fields you will get column names like:

<l1Name>_<l2Name>_<l3Name>_<l4Name>

For a 4 level nested arry/mapp this will be like:

<rootTableName>_<l1Name>_<l2Name>_<l3Name>_<l4Name>

Given that we enforce a 30 character limit on table/column names this will easily blow up.

Using 'schema suffix the names become:

<l1Suffix><l2Suffix><l3Suffix><l4Suffix>
<rootTableName>_<l1Suffix><l2Suffix><l3Suffix><l4Suffix>

without the underscores. When you are using suffixes, the intention is that they be much shorter as they are intended to be part of a large name which will yield a reasonable unique name. So combining shorter suffixes and using ‘schema suffix’ gives you the ability to create names which make sense and don’t waste space on underscores.

When deciding whether to use schema name or schema suffix, schema name makes sense when nesting isn’t involved and schema suffix is better when nesting is involved.

1 Like