Description
Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it
Can you add support for order hints for bulk copy operations? I am going to add order hints for spark-mssql-connector but there is no implementation of order hints for SQLServerBulkCopy.class, SQLServerBulkCopyOptions.class
Describe the preferred solution
Describe alternatives you've considered
Additional context
Reference Documentations/Specifications
BULK INSERT allow to specify if data already has a specific order so that Azure SQL / SQL Server can avoid sorting it again if inserting data into a clustered index.
ORDER ( { column [ ASC | DESC ] } [ ,... n ] ) Specifies how the data in the data file is sorted. Bulk import performance is improved if the data being imported is sorted according to the clustered index on the table, if any. If the data file is sorted in a different order, that is other than the order of a clustered index key or if there is no clustered index on the table, the ORDER clause is ignored. The column names supplied must be valid column names in the destination table. By default, the bulk insert operation assumes the data file is unordered. For optimized bulk import, SQL Server also validates that the imported data is sorted.
https://docs.microsoft.com/en-us/sql/connect/ado-net/sql/bulk-copy-order-hints?view=sql-server-ver15
Reference Implementation
Metadata
Metadata
Assignees
Type
Projects
Status