---
title: "export(to:metadata:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/tabulartransformer/export(to:metadata:)"
---

# export(to:metadata:)

Exports this tabular transformer as a CoreML model with userInfo.

## Declaration

```swift
func export(to url: URL, metadata: ModelMetadata) throws
```

## Parameters

- `url`: The location to write the model into.
- `metadata`: Contextual user-provided information.

## Discussion

Discussion note: By default this method exports .mlpackage files. You can export a .mlmodel file by specifying that as the URL file extension. But if you specify .mlmodel and the transformer doesn’t support it, this method will throw an error.

## See Also

### Exporting

- [export(to:)](createmlcomponents/tabulartransformer/export(to:).md)
