User Guide > Targets in a Streaming Mapping > Relational Data Objects
  

Relational Data Objects

Create a relational data object to write to Hive tables or JDBC-compliant database. To write to Hive tables, create a relational data object with a Hive connection. To write to a JDBC-compliant database, create a relational data object with a JDBC connection.
To use the relational data object as a target in streaming mappings, configure the relational data object write operation properties. You can select the mapping environment and run the mappings on the Spark engine of the Hadoop environment.

Hive targets

When you write to a Hive target in a streaming mapping, you write to a Hive table. You can write to the following types of tables:
Truncation of tables happens only once in the beginning when you write data.

JDBC targets

You can include a JDBC-compliant database as a target in an Informatica mapping. Use the Sqoop arguments in the JDBC connection to configure the JDBC parameters. Sqoop uses the values that you configure in the User Name and Password fields of the JDBC connection. If you configure the --username or --password argument in a JDBC connection or mapping, Sqoop ignores the arguments. If you create a password file to access a database, Sqoop ignores the password file.

Relational Data Object Overview Properties

The Data Integration Service uses overview properties when it writes data to a relational data object.
The Overview properties include general properties that apply to the relational data object. They also include column properties that apply to the resources in the relational data object.

General Properties

The following table describes the general properties that you configure for relational data objects:
Property
Description
Name
Name of the relational data object.
Description
Description of the relational data object.

Column Properties

The following table describes the column properties that you can view for relational data objects:
Property
Description
Name
Name of the column.
Native Type
Native data type of the column.
Precision
Maximum number of significant digits for numeric data types, or maximum number of characters for string data types. For numeric data types, precision includes scale.
Scale
Maximum number of digits after the decimal point for numeric values.
Description
Description of the column.

Advanced Properties

Advanced properties include run-time and other properties that apply to the relational data object. The Developer tool displays advanced properties for relational data object in the Advanced view.
Property
Description
Connection
Name of the Hive connection.
Owner
Name of the resource owner.
This property is not applicable for Hive sources and targets.
Resource
Name of the resource.
Database Type
Type of the source.
This property is read-only.
Resource Type
Type of the resource.
This property is read-only.

Relational Data Object Write Operation Properties

The Data Integration Service uses write operation properties to write data to Hive or JDBC-compliant database.
The data object write operation properties include general, ports, run-time, target, and advanced properties.

General Properties

The general properties include the properties for name, description, and metadata synchronization.
The following table describes the general properties that you configure for the relational data object:
Property
Description
Name
Name of the relational data object.
You can edit the name in the Overview view. When you use the relational file as a source in a mapping, you can edit the name within the mapping.
Description
Description of the relational data object.
When column metadata changes
Indicates whether object metadata is synchronized with the source. Select one of the following options:
  • - Synchronize output ports. The Developer tool reimports the object metadata from the source.
  • - Do not synchronize. Object metadata may vary from the source.

Data Object Properties

On the Data Object tab, you can specify or change the target, and make relational and customized data object targets dynamic.
The following table describes the data object properties that you configure for Hive targets in a streaming mapping:
Property
Description
Specify By
To specify target columns and metadata, select one of the following options:
  • - Value. The write operation uses the associated data object to specify target columns and metadata.
  • - Parameter. The write operation uses a parameter to specify target columns and metadata.
  • Default is the Value option.
Data Object
If you created the target from an existing data object, the field displays the name of the object. Click Browse to change the data object to associate with the data object.
Parameter
Choose or create a parameter to associate with the target.
At runtime, get data object columns from data source
When you enable this option, the Data Integration Service fetches metadata and data definition changes from target tables to the data object.

Ports Properties

Ports properties include column names and column attributes such as data type and precision.
The following table describes the ports properties that you configure for relational targets:
Property
Description
Name
Name of the column.
Type
Native data type of the column.
Precision
Maximum number of significant digits for numeric data types, or maximum number of characters for string data types. For numeric data types, precision includes scale.
Scale
Maximum number of digits after the decimal point for numeric values.
Description
Description of the column.
Column
Name of the column in the resource.
Resource
Name of the resource.

Run-time Properties

The following table describes the run-time properties that you configure for Hive targets:
Property
Description
Connection
Name of the Hive connection.
Owner
Name of the Hive database.
Resource
Name of the resource.

Advanced Properties

The following table describes the advanced properties that you configure for Hive targets in streaming mappings:
Property
Description
Tracing level
Controls the amount of detail in the mapping log file.
Create or replace table at run time
The Data Integration Service drops the target table at run time and replaces it with a table based on a target table that you identify.
Note: When you write to a JDBC target and the target does not have a table, Spark creates a table even if you do not select this option. Spark creates columns in the table with appropriate target data type and default precision for the data type irrespective of the the precision you specify in the target properties.
DDL Query
The DDL query based on which the Data Integration Service creates or replace the target table at run time.
You cannot create a custom DDL query that creates or replaces a Hive table at run time in streaming mappings.
Truncate target table
Truncates the target before loading data.
Note: If the mapping target is a Hive partition table, you can choose to truncate the target table only with Hive version 0.11.
Truncate Hive Target Partition
Truncates the external table before loading data.
Streaming mappings do not support this property. The property is ignored.
PreSQL
The SQL command the Data Integration Service runs against the target database before it reads the source.
The Developer tool does not validate the SQL.
PostSQL
The SQL command that the Data Integration Service runs against the target database after it writes to the target.
The Developer tool does not validate the SQL.
Streaming mappings do not support Post-SQL queries. Post-SQL queries in streaming mappings are ignored.
Maintain Row Order
Maintain row order while writing data to the target. Select this option if the Data Integration Service should not perform any optimization that can change the row order.
When the Data Integration Service performs optimizations, it might lose the row order that was established earlier in the mapping. You can establish row order in a mapping with a sorted flat file source, a sorted relational source, or a Sorter transformation. When you configure a target to maintain row order, the Data Integration Service does not perform optimizations for the target.