Redaguoti

Bendrinti naudojant


Mirroring policy

The mirroring policy commands allow you to view, change, partition, and delete your table mirroring policy. They also provide a way to check the mirroring latency by reviewing the operations mirroring status.

Management commands

The policy object

The mirroring policy includes the following properties:

Property Description Values Default
Format The format of your mirrored files. Valid value is parquet. parquet
ConnectionStrings An array of connection strings that help configure and establish connections. This value is autopopulated.
IsEnabled Determines whether the mirroring policy is enabled. When the mirroring policy is disabled and set to false, the underlying mirroring data is retained in the database. true, false, null. null
Partitions A comma-separated list of columns used to divide the data into smaller partitions. See Partitions formatting.

Warning

Deleting or dropping the table mirroring policy will permanently delete the delta table in OneLake.

Partitions formatting

The partitions list is any combination of partition columns, specified using one of the forms shown in the following table.

Partition Type Syntax Notes
Virtual column PartitionName : (datetime | string) Read more on Virtual columns.
String column value PartitionName : string = ColumnName
String column value hash() PartitionName : long = hash(ColumnName, Number) The hash is modulo Number.
Truncated datetime column (value) PartitionName : datetime = (startofyear | startofmonth | startofweek | startofday) ( ColumnName ) See documentation on startofyear, startofmonth, startofweek, or startofday functions.
Truncated Datetime Column Value = bin ( ColumnName , TimeSpan ) Read more about the bin function.

Note

Each partition is represented as a separate column using the PartitionName listed in the Partitions list. PartitionName must be a case insensitive unique string, both among other partition names and the column names of the mirrored table.

Data types mapping

To ensure compatibility and optimize queries, ensure that your data types are properly mapped to the parquet data types.

Event house to Delta parquet data types mapping

Event house data types are mapped to Delta Parquet data types using the following rules:

Event house data type Delta data type
bool boolean
datetime timestamp OR date (for date-bound partition definitions)
dynamic string
guid string
int integer
long long
real double
string string
timespan long
decimal decimal(38,18)

For more information on Event house data types, see Scalar data types.

Example policy

{
  "Format": "parquet",
  "IsEnabled": true,
  "Partitions": null,
}

This feature isn't supported.