Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0710

D toc

D s transforms

Excerpt

Uses one row from the dataset sample as the header row for the table. Each value in this row becomes the name of the column in which it is located. 

This transform might be automatically applied as one of the first steps of your recipe. See Initial Parsing Steps.

Info

NOTE: If source row number information is not available due to changes in the dataset, this transform may not be available.



Info

NOTE: Each column in any row that is part of a column header in a dataset with parameters should have a valid value that is consistent with corresponding values across all files in the dataset. If your files have missing or empty values in rows that are used as headers in your recipe, these rows may be treated as data rows during the import process, which may result in unexpected or missing column values. For more information, see Create Dataset with Parameters.


D s
snippetBasic

D code
header sourcerownumber: 4

Output: The values from Row #4 of the original dataset are used, if available, as the names for each column. If the row is not available, the specified row data can be retrieved, and the transform fails.

D s
snippetParameters

D code

header sourcerownumber: row_num

TokenRequired?Data TypeDescription
headerYtransformName of the transform
sourcerownumberYinteger (positive)Row number from the original data to use as the header.

D s lang notes

sourcerownumber

Include Page
sourcerownumber Parameter
sourcerownumber Parameter

Example:

D code

header sourcerownumber: 4

Output: Uses row #4 from the source row numbers of the sample as the header the columns. 

D s
snippetusage

Required?Data Type
Yesinteger (positive)

 

D s
snippetExamples

Example - Header from row that is not the first one

Include Page
EXAMPLE - SOURCEROWNUMBER Function
EXAMPLE - SOURCEROWNUMBER Function

D s also
labelwrangle_transform_header