pirzada-ahmadfaraz opened a new pull request, #37303:
URL: https://github.com/apache/beam/pull/37303

    PR Description to use:
     ## Summary
   
     This PR adds documentation and examples for using 
`calcite_connection_properties` in YAML SQL transforms, addressing issue #36614.
   
     **Changes:**
     - Added new example file `sql/sql_calcite_connection_properties.yaml` 
demonstrating how to configure PostgreSQL-specific SQL functions in YAML 
pipelines
     - Added test case in `tests/sql.yaml` to verify the 
`calcite_connection_properties` option works correctly with PostgreSQL 
functions like `INITCAP`
   
     **Example Usage:**
     ```yaml
     pipeline:
       transforms:
         - type: Create
           name: CreateSampleData
           config:
             elements:
               - {id: 1, tags: "java python go"}
         - type: Sql
           name: TransformWithPostgresFunction
           input: CreateSampleData
           config:
             query: "SELECT id, STRING_TO_ARRAY(tags, ' ') as tag_list FROM 
PCOLLECTION"
   
     options:
       calcite_connection_properties: {"fun": "postgresql"}
   
     Fixes #36614
   
     Test plan
   
     - Added test case in tests/sql.yaml that uses INITCAP function with 
calcite_connection_properties
     - Verified YAML syntax is valid for both example and test files
     - CI tests will verify the functionality
   
     **Files changed:**
     - 
`sdks/python/apache_beam/yaml/examples/transforms/sql/sql_calcite_connection_properties.yaml`
 (new)
     - `sdks/python/apache_beam/yaml/tests/sql.yaml` (modified - added test 
case)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to