Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-42750

Support INSERT INTO by name

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0
    • SQL

    Description

      In some use cases, users have incoming dataframes with fixed column names which might differ from the canonical order. Currently there's no way to handle this easily through the INSERT INTO API - the user has to make sure the columns are in the right order as they would when inserting a tuple. We should add an optional BY NAME clause, such that:

      INSERT INTO tgt BY NAME <query>

      takes each column of <query> and inserts it into the column in `tgt` which has the same name according to the configured `resolver` logic.

      Attachments

        Activity

          People

            fanjia Jia Fan
            joseph.torres Jose Torres
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: