Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Big Data Management
  3. Mappings
  4. Sources
  5. Targets
  6. Transformations
  7. Data Preview
  8. Cluster Workflows
  9. Profiles
  10. Monitoring
  11. Hierarchical Data Processing
  12. Hierarchical Data Processing Configuration
  13. Hierarchical Data Processing with Schema Changes
  14. Intelligent Structure Models
  15. Stateful Computing
  16. Appendix A: Connections
  17. Appendix B: Data Type Reference
  18. Appendix C: Function Reference

LAG

LAG

The LAG function returns data from preceding rows.
LAG uses the following syntax:
LAG ( Column name, Offset, Default )
LAG returns the value at an offset number of rows before the current row. Use the LAG function to compare values in the current row with values in a previous row. Use the following arguments with the LAG function:
  • Column name. The column name whose value from the prior row is to be returned.
  • Offset. The number of rows preceding the current row from which the data is to be retrieved. For example, an offset of "1" accesses the previous row, and an offset of "3" accesses the row that is three rows before the current row.
  • Default. The default value to be returned if the offset is outside the scope of the partition. If you do not specify a default, the default is NULL.
For more information about the LAG function, see the
Informatica Transformation Language Reference
.


Updated July 10, 2020