源具有Unicode数据,但是我正在使用MySQL 64位ODBC ANSI驱动程序,该驱动程序在部分加载后抛出错误(在遇到一些特殊字符后出错)。
是否有其他解决方法(除了切换到Unicode驱动程序之外)?
答案 0 :(得分:0)
SSIS对元数据要求非常严格。您有两种选择:切换驱动程序或将源数据重新编码为ANSI。
还有第三种选择:将UNICODE数据提取到CSV文件中,然后通过平面文件连接加载该文件。从那里,您可以指示连接管理器使用ANSI或UNICODE。
我允许通过PowerShell脚本(当然是数字签名)转换.NET支持的任何编码,从而通过平面文件导入实现了更具可扩展性的方法。在这种情况下,数据提供者可以向我扔任何东西,并且可以在加载之前将其编码为ANSI。
解决方案实际上取决于当前和潜在的未来数据需求。希望有帮助。
更新:
我不是MySQL专家,因为我没有对此进行开发。如果要在服务器中使用本机转换功能,则可能需要完全了解从UNICODE到ANSI时,它如何处理varchar和nvarchar字符串的转换。再次,我将重新编码转换为.NET,而不是服务器功能。
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: active (running) since Wed 2018-08-01 12:49:48 EDT; 3min 47s ago
Docs: http://kubernetes.io/docs/
Main PID: 18344 (kubelet)
Tasks: 13 (limit: 4915)
Memory: 39.4M
CPU: 4.091s
CGroup: /system.slice/kubelet.service
└─18344 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --cni-bin-dir=/opt/cni/bin --cn
Aug 01 12:53:33 master kubelet[18344]: E0801 12:53:33.522282 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:455: Failed to list *v1.Service: Get https://192.168.0.33:6443/api/v1/services?limit=500&resourceVersion=0
Aug 01 12:53:33 master kubelet[18344]: E0801 12:53:33.527787 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:464: Failed to list *v1.Node: Get https://192.168.0.33:6443/api/v1/nodes?fieldSelector=metadata.name%3Dmas
Aug 01 12:53:33 master kubelet[18344]: E0801 12:53:33.537549 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get https://192.168.0.33:6443/api/v1/pods?fieldSelector=spec.nodeName
Aug 01 12:53:34 master kubelet[18344]: I0801 12:53:34.051830 18344 kubelet_node_status.go:269] Setting node annotation to enable volume controller attach/detach
Aug 01 12:53:34 master kubelet[18344]: E0801 12:53:34.523429 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:455: Failed to list *v1.Service: Get https://192.168.0.33:6443/api/v1/services?limit=500&resourceVersion=0
Aug 01 12:53:34 master kubelet[18344]: E0801 12:53:34.530208 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:464: Failed to list *v1.Node: Get https://192.168.0.33:6443/api/v1/nodes?fieldSelector=metadata.name%3Dmas
Aug 01 12:53:34 master kubelet[18344]: E0801 12:53:34.538744 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get https://192.168.0.33:6443/api/v1/pods?fieldSelector=spec.nodeName
Aug 01 12:53:35 master kubelet[18344]: E0801 12:53:35.524380 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:455: Failed to list *v1.Service: Get https://192.168.0.33:6443/api/v1/services?limit=500&resourceVersion=0
Aug 01 12:53:35 master kubelet[18344]: E0801 12:53:35.531218 18344 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:464: Failed to list *v1.Node: Get https://192.168.0.33:6443/api/v1/nodes?fieldSelecto
答案 1 :(得分:0)
此方法有效:将CONVERT(columnName使用ASCII)作为columnName