This field is used along with the _SL_PRECISION field for setting the precision and scale of a DECIMAL or NUMERIC field. _SL_SCALE - Contains the result of the getScale() method. This field is used along with the _SL_SCALE field for setting the precision and scale of a DECIMAL or NUMERIC field. _SL_PRECISION - Contains the result of the getPrecision() method. If you want to explicitly set a type for a column, set the DATA_TYPE field. If this type is not known to the database, the DATA_TYPE field will be used as a fallback. TYPE_NAME - The type to use for the column. The other fields of interest in the column definition are: You can also drop a column by setting the COLUMN_NAME value to null or the empty string. Changing the COLUMN_NAME value will change the name of the column in the created table. Note that if you change a column name, you do not need to change the name of the field in the row input documents. The Snap will automatically translate from the original name to the new name. For example, when changing from name to full _name, the name field in the input document will be put into the " full_name" column. The document contains the following fields:Ĭolumns - Contains the result of the getColumns() method with each column as a separate field in the object. The table metadata document that is read in by the second input view contains a dump of the JDBC DatabaseMetaData class. The document can be manipulated to affect the CREATE TABLE statement that is generated by this Snap. For example, to rename the name column to full_name, you can use a Mapper (Data) Snap that sets the path $._NAME to full_name. The extra view in the Select and Bulk Load Snaps are used to pass metadata about the table, effectively allowing you to replicate a table from one database to another. If you would like the table to be created with the same schema as a source table, you can connect the second output view of a Select Snap to the second input view of this Snap. If the table does not exist when the Snap tries to do the insert, and the Create table property is set, the table will be created with the columns and data types required to hold the values in the first input document. This Snap executes a SQL Insert statement using the document's keys as the columns to insert to and the document's values as the values to insert into the columns.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |