Alter External File format Question

AzDevAd1 1 Reputation point
2020-06-21T19:57:13.293+00:00

This question is regarding external file formats. There are options to create and drop but we don't see an option for Alter external file format. There are options for external tables, external data sources but just not for external file formats.

Even the documentation doesn't mention that. Reference : https://learn.microsoft.com/en-us/sql/t-sql/statements/create-external-file-format-transact-sql?view=sql-server-ver15

We have external tables already defined that are using a defined external file format. We are trying to avoid changes to the external tables if the file format to include a string delimiter can be added at a global level.

Can you please suggest options or syntax if there is such an option ? Your help is appreciated.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,662 questions
{count} votes

1 answer

Sort by: Most helpful
  1. m 4,271 Reputation points
    2020-08-04T01:44:05.417+00:00

    Hi @AzDevAd1 ,

    Syntax:
    ALTER FILE FORMAT [ IF EXISTS ] <name> RENAME TO <new_name>

    ALTER FILE FORMAT [ IF EXISTS ] <name> SET { [ formatTypeOptions ] [ COMMENT = '<string_literal>' ] }

    You can reference : alter-file-format.html And there are examples in the doc.

    BR,
    Mia