cockroachdb / cockroachdb/cockroach
IMPORT INTO CSV DATA will execute decode() function inside CSV
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
We are trying to migrate (via import) binary data from a source system that is base64 encoded.
**Describe the solution you'd like**
For example this CSV with pipe delimiter='|'
`value1 | value 2| decode( 'ZW5jb2RlZF9kYXRh', 'base64') | value 4`
On import will be decoded to a bytes value of '\x656e636f6465645f64617461'
**Describe alternatives you've considered**
Computed columns.
Staging tables.
**Additional context**
I'm aware some functions work on import, such as gen_random_uuid() and now()
https://github.com/cockroachdb/cockroach/blob/v22.2.2/pkg/sql/row/expr_walker.go
Jira issue: CRDB-23135
Epic CRDB-23802
Contributor guide
Assessment
This issue has not been assessed yet.