Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-6133

[SQL] Add support for TableMacro UDF

Details

    • New Feature
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.10.0
    • dsl-sql
    • None

    Description

      Now we support only ScalarFunction UDFs. In Calcite, there are other kinds of UDFs. With TableMacro UDFs users can connect external data sources in a similar way as in TableProvider, but without specifying a schema, or enumerating a list of existing tables in advance.

      An example use case is connecting external metadata service and querying range of partitions.

      SELECT COUNT(*) FROM table(my_udf('dataset', start = '2017-01-01', end = '2018-01-01'))
      

      Where the implementation of `my_udf` will connect to this service, get file locations for a range of partitions, and translate to PTransform reading it.

      Attachments

        Issue Links

          Activity

            People

              kanterov Gleb Kanterov
              kanterov Gleb Kanterov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m