Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR datafactory/resource-manager] [Datafactory] Enable SQL DW Copy Command #6247

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions profiles/latest/datafactory/mgmt/datafactory/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,8 @@ type CustomActivityTypeProperties = original.CustomActivityTypeProperties
type CustomDataSourceLinkedService = original.CustomDataSourceLinkedService
type CustomDataset = original.CustomDataset
type CustomSetupBase = original.CustomSetupBase
type DWCopyCommandDefaultValue = original.DWCopyCommandDefaultValue
type DWCopyCommandSettings = original.DWCopyCommandSettings
type DataFlow = original.DataFlow
type DataFlowDebugCommandPayload = original.DataFlowDebugCommandPayload
type DataFlowDebugCommandRequest = original.DataFlowDebugCommandRequest
Expand Down
2 changes: 2 additions & 0 deletions profiles/preview/datafactory/mgmt/datafactory/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,8 @@ type CustomActivityTypeProperties = original.CustomActivityTypeProperties
type CustomDataSourceLinkedService = original.CustomDataSourceLinkedService
type CustomDataset = original.CustomDataset
type CustomSetupBase = original.CustomSetupBase
type DWCopyCommandDefaultValue = original.DWCopyCommandDefaultValue
type DWCopyCommandSettings = original.DWCopyCommandSettings
type DataFlow = original.DataFlow
type DataFlowDebugCommandPayload = original.DataFlowDebugCommandPayload
type DataFlowDebugCommandRequest = original.DataFlowDebugCommandRequest
Expand Down
56 changes: 56 additions & 0 deletions services/datafactory/mgmt/2018-06-01/datafactory/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -75518,6 +75518,34 @@ func (dtd *DrillTableDataset) UnmarshalJSON(body []byte) error {
return nil
}

// DWCopyCommandDefaultValue default value.
type DWCopyCommandDefaultValue struct {
// ColumnName - Column name. Type: object (or Expression with resultType string).
ColumnName interface{} `json:"columnName,omitempty"`
// DefaultValue - The default value of the column. Type: object (or Expression with resultType string).
DefaultValue interface{} `json:"defaultValue,omitempty"`
}

// DWCopyCommandSettings DW Copy Command settings.
type DWCopyCommandSettings struct {
// DefaultValues - Specifies the default values for each target column in SQL DW. The default values in the property overwrite the DEFAULT constraint set in the DB, and identity column cannot have a default value. Type: array of objects (or Expression with resultType array of objects).
DefaultValues *[]DWCopyCommandDefaultValue `json:"defaultValues,omitempty"`
// AdditionalOptions - Additional options directly passed to SQL DW in Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalOptions": { "MAXERRORS": "1000", "DATEFORMAT": "'ymd'" }
AdditionalOptions map[string]*string `json:"additionalOptions"`
}

// MarshalJSON is the custom marshaler for DWCopyCommandSettings.
func (dccs DWCopyCommandSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if dccs.DefaultValues != nil {
objectMap["defaultValues"] = dccs.DefaultValues
}
if dccs.AdditionalOptions != nil {
objectMap["additionalOptions"] = dccs.AdditionalOptions
}
return json.Marshal(objectMap)
}

// DynamicsAXLinkedService dynamics AX linked service.
type DynamicsAXLinkedService struct {
// DynamicsAXLinkedServiceTypeProperties - Dynamics AX linked service properties.
Expand Down Expand Up @@ -194996,6 +195024,10 @@ type SQLDWSink struct {
AllowPolyBase interface{} `json:"allowPolyBase,omitempty"`
// PolyBaseSettings - Specifies PolyBase-related settings when allowPolyBase is true.
PolyBaseSettings *PolybaseSettings `json:"polyBaseSettings,omitempty"`
// AllowCopyCommand - Indicates to use Copy Command to copy data into SQL Data Warehouse. Type: boolean (or Expression with resultType boolean).
AllowCopyCommand interface{} `json:"allowCopyCommand,omitempty"`
// CopyCommandSettings - Specifies Copy Command related settings when allowCopyCommand is true.
CopyCommandSettings *DWCopyCommandSettings `json:"copyCommandSettings,omitempty"`
// TableOption - The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string).
TableOption interface{} `json:"tableOption,omitempty"`
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
Expand Down Expand Up @@ -195027,6 +195059,12 @@ func (sds SQLDWSink) MarshalJSON() ([]byte, error) {
if sds.PolyBaseSettings != nil {
objectMap["polyBaseSettings"] = sds.PolyBaseSettings
}
if sds.AllowCopyCommand != nil {
objectMap["allowCopyCommand"] = sds.AllowCopyCommand
}
if sds.CopyCommandSettings != nil {
objectMap["copyCommandSettings"] = sds.CopyCommandSettings
}
if sds.TableOption != nil {
objectMap["tableOption"] = sds.TableOption
}
Expand Down Expand Up @@ -195270,6 +195308,24 @@ func (sds *SQLDWSink) UnmarshalJSON(body []byte) error {
}
sds.PolyBaseSettings = &polyBaseSettings
}
case "allowCopyCommand":
if v != nil {
var allowCopyCommand interface{}
err = json.Unmarshal(*v, &allowCopyCommand)
if err != nil {
return err
}
sds.AllowCopyCommand = allowCopyCommand
}
case "copyCommandSettings":
if v != nil {
var copyCommandSettings DWCopyCommandSettings
err = json.Unmarshal(*v, &copyCommandSettings)
if err != nil {
return err
}
sds.CopyCommandSettings = &copyCommandSettings
}
case "tableOption":
if v != nil {
var tableOption interface{}
Expand Down