Microsoft Fabric OneLake Connector > Mappings for Microsoft Fabric OneLake > Microsoft Fabric OneLake targets in mappings
  

Microsoft Fabric OneLake targets in mappings

In a mapping, you can use a Microsoft Fabric OneLake object as a target.
When you use Microsoft Fabric OneLake target objects, you can select a Microsoft Fabric OneLake collection as target. You can configure Microsoft Fabric OneLake target properties on the Target page of the Mapping wizard. When you write data to Microsoft Fabric OneLake, you can use the create target field to create a target at run time. When you create a new target based on the source, you must remove all the binary fields from the field mapping.
The following table describes the Microsoft Fabric OneLake target properties that you can configure in a Target transformation:
Property
Description
Connection
Name of the target connection. Select a target connection or click New Parameter to define a new parameter for the target connection.
If you want to overwrite the parameter at runtime, select the Allow parameter to be overridden at run time option when you create a parameter. When the task runs, the agent uses the parameters from the file that you specify in the task advanced session properties.
When you switch between a non-parameterized and a parameterized Microsoft Fabric OneLake connection, the advanced property values are retained.
Target Type
Select Single Object or Parameter.
Object
Name of the target object. You can select an existing object or create a new target at runtime.
When you select Create New at Runtime, enter a name for the target object and select the source fields that you want to use. By default, all source fields are used.
The target name can contain alphanumeric characters. You can use only a period (.), an underscore (_), an at the rate sign (@), a dollar sign ($), and a percentage sign (%) special characters in the file name.
Ensure that the headers or file data does not contain special characters.
You can use parameters defined in a parameter file in the target name. When you select the Create Target option, you cannot parameterize the target at runtime.
Note: When you write data to a flat file created at runtime, the target flat file contains a blank line at the end of the file.
Parameter
Select an existing parameter for the target object or click New Parameter to define a new parameter for the target object.
The Parameter property appears only if you select Parameter as the target type.
When you parameterize the target object, specify the complete object path including the file system in the default value of the parameter.
If you want to overwrite the parameter at runtime, select the Allow parameter to be overridden at run time option when you create a parameter. When the task runs, the agent uses the parameters from the file that you specify in the task advanced session properties. Ensure that the parameter file is in the correct format.
Format
Specifies the file format that the Microsoft Fabric OneLake Connector uses to write data to Microsoft Fabric OneLake.
Select one of the following file formats:
  • - Avro
  • - JSON
  • - ORC
  • - Flat
  • - Parquet
Default is None.
If you select None as the format type, Microsoft Fabric OneLake Connector writes data to Microsoft Fabric OneLake files in binary format.
For more information, see File formatting options.
Operation
The target operation. You can insert data to a Microsoft Fabric OneLake target.
Note: When you use the Create Target option and specify an object name with extension that does not match the Format Type under Formatting Options, the Secure Agent ignores the format type you specified under Formatting Options.
The following table describes the advanced target properties for Microsoft Fabric OneLake:
Advanced Target Property
Description
Workspace Override
Overrides the workspace specified in the connection.
Lakehouse Override
Overrides the lakehouse specified in the connection.
File Name Override
Overrides the source object at run time.
Write Strategy
Determines how you write to the target object.
Select Overwrite or Append write strategy.
In a mapping, you can use the overwrite and append write strategy for flat files. However, you can use only the overwrite strategy for complex files.
In a mapping in advanced mode, you can use the overwrite and append write strategy for both flat files and complex files.
When you create a new target at runtime and use the append strategy, the mapping creates a new target file and writes the data to the file. The mapping appends data in subsequent runs.
When you append data for mappings in advanced mode, the data is appended as a new part file in the existing target directory.
The maximum size of data that you can append is 450 MB.
Default is overwrite.
Compression Format
Compresses and writes data to the target based on the format you specify.
Select one of the following options:
  • - None. To write data to uncompressed files.
  • - Gzip. To write data to flat files and Parquet files that use Gzip compression.
  • - Snappy. To write data to Parquet files in Snappy compression format that uses the Snappy compression algorithm.
When the task runs, the file extensions .gz or .snappy do not appear in target object name.
Forward Rejected Rows
Configure the transformation to either pass rejected rows to the next transformation or drop them.

Target time stamps

When you create a target at run time in a mapping, you can add time stamp information to the file name to show when the file is created.
When you specify the file name for the target file, include special characters based on Linux STRFTIME function formats that the mapping task uses to include time stamp information in the file name. The time stamp is based on the organization's time zone.
You cannot append time stamp information to the file name for mappings in advanced mode.
The following table describes some common STRFTIME function formats that you might use in a mapping or mapping task:
Special Character
Description
%d
Day as a two-decimal number, with a range of 01-31.
%m
Month as a two-decimal number, with a range of 01-12.
%y
Year as a two-decimal number without the century, with range of 00-99.
%Y
Year including the century, for example 2015.
%T
Applicable only to flat files. Time in 24-hour notation, equivalent to %H:%:M:%S.
%H
Hour in 24-hour clock notation, with a range of 00-24.
%l
Hour in 12-hour clock notation, with a range of 01-12.
%M
Minute as a decimal, with a range of 00-59.
%S
Second as a decimal, with a range of 00-60.
%p
Either AM or PM.
Note: For complex files, instead of %T you can use the equivalent %H_%M_%S.

Target partitioning

You can configure partitioning to optimize the mapping performance at run time when you write data to Microsoft Fabric OneLake. You can configure target partitioning only in mappings.
The partition type controls how the agent distributes data among partitions at partition points. With partitioning, the Secure Agent distributes rows of target data based on the number of threads that you define as partition.
For example, if there are three partitions in the source, the Secure Agent writes separate files for each partition in the Microsoft Fabric OneLake target in the following format:
<target>
<target_1>
<target_2>
Consider the following rules and guidelines for target partitioning: