PUT_LINE procedure

Translation reference for UTL_FILE.PUT_LINE.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Description

This procedure writes the text string stored in the buffer parameter to the open file identified by the file handle. (Oracle PL/SQL UTL_FILE.PUT_LINE)

This procedure requires to be used in conjunction with:

Syntax

UTL_FILE.PUT_LINE(
    FILE VARCHAR,
    BUFFER VARCHAR,
    );

Setup data

  • The UTL_FILE schema must be created.

Custom UDF

UTL_FILE.PUT_LINE(VARCHAR, VARCHAR)

Parameters

  • FILE: Active file handler returned from the call to UTL_FILE.FOPEN

  • BUFFER: Text buffer that contains the text to be written to the file**.**

Functionality

This procedure uses the FOPEN_TABLES_LINES table created in the UTL_FILE.FOPEN procedure.

If the OPEN_MODE of the file is write (w) or append (a), it inserts the buffer into FOPEN_TABLES_LINES, but if the OPEN_MODE is read (r), it throws the File_is_read_only exception.

Usage example

Oracle

Snowflake

Known Issues

1. AUTOFLUSH parameter is not used.

The Oracle Built-in package UTL_FILE.PUT_LINE procedure has the AUTOFLUSH parameter, but in the Snowscripting procedure it is removed because it is not used.

  1. SSC-FDM-0015: Data Type Not Recognized.

  2. SSC-FDM-OR0036: Unnecessary built-in packages parameters.

Last updated