PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, August 29, 2022

[FIXED] How to Insert empty string in amazon redhsift without getting converteed to NULL?

 August 29, 2022     amazon-redshift, amazon-s3, amazon-web-services, bigdata, csv     No comments   

Issue

I am tryig to load data using copy command in redshift using pipe delimeter csv file, while loading || empty is getting converted to NULL as i wanted but |""| this also getting converted to NULL. how can i handel this situation please respond.


Solution

\copy (select * from schema.table) to 'path/filename.csv' NULL 'NULL' DELIMETER '|' CSV HEADER; for exporting. In redshift I used NULL as 'NULL' option in the copy command it worked



Answered By - Surya Appana
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing