1

I have this code that works as expected in chrome browser window. This is Amazon Web Services create table statement in Athena.

CREATE EXTERNAL TABLE IF NOT EXISTS default.sh_code (
  `shcode` string,
  `mob` bigint,
  `c_id` int,
  `o_series` int,
  `c_at` timestamp,
  `archive` int 
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
  'field.delim' = '\t'
) LOCATION 's3://testme16234/short_unique_codes/'
TBLPROPERTIES ('has_encrypted_data'='false');

If I copy-paste the code in gmail compose window, then it is very difficult to get the same code back. I can copy-paste from gmail window back to AWS window, but I get an error when I execute it. Is there some extra code added to the text when I paste the code in gmail compose window?

shantanuo
  • 3,579
  • 8
  • 49
  • 66

1 Answers1

1

If I save the text from gmail compose window, it gets saved as utf-8 while the text from AWS tab gets saved as ASCII. I need to convert the file from utf to ascii in order to use it again in AWS.

# file t1.tt
t1.tt: UTF-8 Unicode text

# iconv -f UTF-8 -t ASCII//TRANSLIT//IGNORE t1.tt > t1.tt.txt

# cat t1.tt.txt
shantanuo
  • 3,579
  • 8
  • 49
  • 66