如何阅读雅典娜的逃脱角色

时间:2017-09-11 11:36:15

标签: amazon-web-services amazon-s3 amazon-athena

您好我已经在Athena中创建了一个表,其中包含以下查询,该表将读取S3的csv文件。

CREATE EXTERNAL TABLE IF NOT EXISTS axlargetable.AEGIntJnlTblStaging (
  `filename` string,
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES (
   'separatorChar' = ',',
   'quoteChar' = '\"'
   ) 
LOCATION 's3://ax-large-table/AEGIntJnlTblStaging/'
TBLPROPERTIES ('has_encrypted_data'='false');

但文件名中的值如"\\emdc1fas\HR_UK\ADPFreedom_Employee_20141114_11.04.00.csv"

当我阅读此表时,我的值显示为

"\emdc1fasHR_UKADPFreedom_Employee_20141114_11.04.00.csv"

我从值中缺少所有转义字符(反斜杠)。

如何读取将使用转义字符显示实际值的值。

由于

1 个答案:

答案 0 :(得分:2)

只要您不需要转义,就可以将转义字符设置为不相关的字符(例如public class FooterLine implements IEventListener { private PdfPage pdfPage = null; private double footerLineY = Double.MAX_VALUE; public FooterLine(PdfPage pdfPage) { this.pdfPage = pdfPage; process(); } public double getFooterLineY() { return footerLineY; } private void process() { PdfCanvasProcessor processor = new PdfCanvasProcessor(this); processor.processPageContent(pdfPage); } @Override public void eventOccurred(IEventData iEventData, EventType eventType) { if(eventType == EventType.RENDER_PATH) processPath((PathRenderInfo) iEventData); } private void processPath(PathRenderInfo pri) { for(Subpath subpath : pri.getPath().getSubpaths()) { Point p0 = subpath.getStartPoint(); Point p1 = subpath.getLastPoint(); // only horizontal lines are allowed if(p0.getY() != p1.getY()) continue; footerLineY = java.lang.Math.min(footerLineY, p0.getY()); } } @Override public Set<EventType> getSupportedEvents() { return null; } } )。

"|"