%3CLINGO-SUB%20id%3D%22lingo-sub-1317937%22%20slang%3D%22en-US%22%3ERe%3A%20Simple%2C%20flexible%2C%20and%20fast%20data%20ingestion%20with%20the%20COPY%20statement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1317937%22%20slang%3D%22en-US%22%3E%3CP%3EHI%20Kevin%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20please%20provide%20a%20rough%20comparison%20on%20performance%20between%20.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1%3A%20ADF%20POLYBASE%20vs%20EXTERNAL%20TABLE%20CTAS%20vs%20COPY%20INTO%26nbsp%3B%20%26nbsp%3B--PARQUET%3C%2FP%3E%3CP%3E2%3A%26nbsp%3BADF%20POLYBASE%20vs%20EXTERNAL%20TABLE%20CTAS%20vs%20COPY%20INTO%26nbsp%3B%20%26nbsp%3B--CSV%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E--Bhaskar%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-998862%22%20slang%3D%22en-US%22%3ESimple%2C%20flexible%2C%20and%20fast%20data%20ingestion%20with%20the%20COPY%20statement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-998862%22%20slang%3D%22en-US%22%3E%3CP%3EData%20ingestion%20is%20one%20of%20the%20first%20tasks%20data%20engineers%20go%20through%20before%20being%20able%20to%20leverage%20SQL%20analytics%20capabilities%20within%20Azure%20Synapse%20Analytics.%20We%20are%20thrilled%20to%20announce%20a%20new%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fcopydocumentation%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ECOPY%20statement%3C%2FA%3E%20which%20will%20enable%20you%20to%20seamlessly%20load%20data%20in%20a%20simple%20and%20flexible%20fashion%20without%20any%20compromise%20to%20performance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPreviously%2C%20the%20bulk%20loading%20experience%20with%20SQL%20DW%20using%20external%20tables%20was%20oftentimes%20cumbersome%20and%20error%20prone%20given%20the%20number%20of%20steps%20required%20to%20set%20up%20the%20process.%20Data%20engineers%20had%20to%20create%20and%20manage%205%20separate%20database%20objects%20for%20high%20throughput%20data%20ingestion.%20In%20addition%20to%20this%20complex%20process%2C%20using%20external%20tables%20for%20data%20ingestion%20also%20presented%20a%20few%20limitations%20which%20include%20the%20lack%20of%20standard%20CSV%20parsing%20and%20requiring%20high%20privileged%20users%20to%20load%20data%20posing%20security%20concerns%20for%20many%20enterprise%20customers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20the%20new%20COPY%20statement%2C%20loading%20limitations%20are%20removed%20so%20that%20you%20can%20immediately%20ingest%20data%20and%20quickly%20begin%20deriving%20insights%20from%20your%20data.%20The%20COPY%20statement%20enables%20you%20to%20seamlessly%20and%20flexibly%20load%20data%20by%20providing%20functionality%20to%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAllow%20lower%20privileged%20users%20to%20load%20without%20needing%20strict%20CONTROL%20permissions%20on%20the%20data%20warehouse%3C%2FLI%3E%0A%3CLI%3ELeverage%20only%20a%20single%20T-SQL%20statement%20without%20having%20to%20create%20any%20additional%20database%20objects%3C%2FLI%3E%0A%3CLI%3ELeverage%20a%20finer%20permission%20model%20without%20exposing%20storage%20account%20keys%20using%20Share%20Access%20Signatures%20(SAS)%3C%2FLI%3E%0A%3CLI%3ESpecify%20a%20different%20storage%20account%20for%20the%20ERRORFILE%20location%20(REJECTED_ROW_LOCATION)%3C%2FLI%3E%0A%3CLI%3ECustomize%20default%20values%20for%20each%20target%20column%20and%20specify%20source%20data%20fields%20to%20load%20into%20specific%20target%20columns%3C%2FLI%3E%0A%3CLI%3ESpecify%20a%20custom%20row%20terminator%20for%20CSV%20files%3C%2FLI%3E%0A%3CLI%3EEscape%20string%2C%20field%2C%20and%20row%20delimiters%20for%20CSV%20files%3C%2FLI%3E%0A%3CLI%3ELeverage%20SQL%20Server%20Date%20formats%20for%20CSV%20files%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EHere%20is%20the%20COPY%20statement%20in%20its%20simplest%20form%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3ECOPY%20INTO%20dbo.%5BFactOnlineSales%5D%20FROM%20%E2%80%98https%3A%2F%2Fcontosoretaildw.blob.core.windows.net%2Fcontosoretaildw-tables%2FFactOnlineSales%2F%E2%80%99%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20COPY%20statement%20is%20currently%20public%20preview%20-%20learn%20more%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fcopydocumentation%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-998862%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LoadingWithCopy.png%22%20style%3D%22width%3A%20311px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F156066iBBCE14F8412C4D80%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22LoadingWithCopy.png%22%20alt%3D%22LoadingWithCopy.png%22%20%2F%3E%3C%2FSPAN%3EIntroducing%20enhanced%20data%20loading%20capabilities%20for%20SQL%20Analytics%20within%20Azure%20Synapse%20Analytics%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-998862%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESynapse%20Pipelines%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESynapse%20SQL%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Data ingestion is one of the first tasks data engineers go through before being able to leverage SQL analytics capabilities within Azure Synapse Analytics. We are thrilled to announce a new COPY statement which will enable you to seamlessly load data in a simple and flexible fashion without any compromise to performance.

 

Previously, the bulk loading experience with SQL DW using external tables was oftentimes cumbersome and error prone given the number of steps required to set up the process. Data engineers had to create and manage 5 separate database objects for high throughput data ingestion. In addition to this complex process, using external tables for data ingestion also presented a few limitations which include the lack of standard CSV parsing and requiring high privileged users to load data posing security concerns for many enterprise customers.

 

With the new COPY statement, loading limitations are removed so that you can immediately ingest data and quickly begin deriving insights from your data. The COPY statement enables you to seamlessly and flexibly load data by providing functionality to:

 

  • Allow lower privileged users to load without needing strict CONTROL permissions on the data warehouse
  • Leverage only a single T-SQL statement without having to create any additional database objects
  • Leverage a finer permission model without exposing storage account keys using Share Access Signatures (SAS)
  • Specify a different storage account for the ERRORFILE location (REJECTED_ROW_LOCATION)
  • Customize default values for each target column and specify source data fields to load into specific target columns
  • Specify a custom row terminator for CSV files
  • Escape string, field, and row delimiters for CSV files
  • Leverage SQL Server Date formats for CSV files

Here is the COPY statement in its simplest form:

 

 

 

 

COPY INTO dbo.[FactOnlineSales] FROM ‘https://contosoretaildw.blob.core.windows.net/contosoretaildw-tables/FactOnlineSales/’

 

 

 

 

The COPY statement is currently public preview - learn more here.

1 Comment
Senior Member

HI Kevin,

 

Can you please provide a rough comparison on performance between .

 

1: ADF POLYBASE vs EXTERNAL TABLE CTAS vs COPY INTO   --PARQUET

2: ADF POLYBASE vs EXTERNAL TABLE CTAS vs COPY INTO   --CSV

 

--Bhaskar