Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-21454 FLIP-163: SQL Client Improvements
  3. FLINK-20320

Support start SQL Client with an initialization SQL file

    XMLWordPrintableJSON

    Details

    • Release Note:
      Hide
      The `sql-client-defaults.yaml` YAML file is deprecated and not provided in the release package. To be compatible, it's still supported to initialize the SQL Client with the YAML file if manually provided. But it's recommend to use the new introduced `-i` startup option to execute an initialization SQL file to setup the SQL Client session. The so-called initialization SQL file can use Flink DDLs to define available catalogs, table sources and sinks, user-defined functions, and other properties required for execution and deployment. The support of legacy SQL Client YAML file will be totally dropped in Flink 1.14.
      Show
      The `sql-client-defaults.yaml` YAML file is deprecated and not provided in the release package. To be compatible, it's still supported to initialize the SQL Client with the YAML file if manually provided. But it's recommend to use the new introduced `-i` startup option to execute an initialization SQL file to setup the SQL Client session. The so-called initialization SQL file can use Flink DDLs to define available catalogs, table sources and sinks, user-defined functions, and other properties required for execution and deployment. The support of legacy SQL Client YAML file will be totally dropped in Flink 1.14.

      Description

      As discussed in FLINK-20260, it would be helpful to predefine some meta information when starting SQL CLI. This can be a replacement of YAML file which defines meta informations.

      Hive supports start with an initialization SQL file "hive -i init.sql": https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Cli

      I think we can also support that.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fsk119 Shengkai Fang
                Reporter:
                jark Jark Wu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: