2016-11-14 3 views
0

私はTeradataのAsterで作業しており、pdf(またはhtml)ファイルをAsterのBeehiveデータベースのテーブルに挿入するように解析しようとしています。 pdf全体は、表内の1行のデータに対応する必要があります。Teradata AsterのdocumentParser関数を使用

これは、documentParserと呼ばれるAsterのSQL-MR機能の1つを使用して行われます。これにより、pdfファイルのすべての章を解析して生成された単一の行を含むテキストファイル(.rtf)が生成され、このファイルがBeehiveのテーブルにロードされます。

私はこのdocumentParserの使用を示しスクリプトと、この解析プロセスに関与する他のステップを与えられている - があるように見えるので、しかし、私は、スクリプトの最後のステップに引っかかってい

/* SHELL INSTRUCTIONS */ 
--transform file in b64 (change file names to your relevant file) 

base64 pp.pdf>pp.b64 

--prepare a loadfile 
rm my_load_file.txt 


-- get the content of the file 
var=$(cat pp.b64) 

-- put in file 
echo \""pp.b64"\"","\""$var"\" >> "my_load_file.txt" 


-- create staging table 
act -U db_superuser -w db_superuser -d beehive -c "drop table if exists public.cf_load_file;" 
act -U db_superuser -w db_superuser -d beehive -c "create dimension table public.cf_load_file(file_name varchar, content varchar);" 


-- load into staging table 
ncluster_loader -U db_superuser -w db_superuser -d beehive --csv --verbose public.cf_load_file my_load_file.txt 


-- use document parser to load the clean text (you will need to create the table beforehand) 

act -U db_superuser -w db_superuser -d beehive -c "INSERT INTO got_data.cf_got_text_data (file_name, content) SELECT * FROM documentParser (ON public.cf_load_file documentCol ('content') mode ('text'));" 

--done 

Asterで利用可能な関数のリストにdocumentParserという関数はありません。私は、コマンド\dFと、この機能のために、数回の検索を試みたが、いずれの試合を取得していない

ERROR: function "documentparser" does not exist 

- これは私が取得エラーです。

私は何をしようとしているかの要点を示す画像を添付しました。

SQL-MR Document Parser

いずれかがこれでどんな経験を持っている場合、私は任意の助けをいただければ幸いです。何が起こった

答えて

0

は、誰かがこの機能documentParserについてあなたに話したが、アスターにインストールするように機能アーカイブファイル(documentParser.zip)を与えたことはないということです。この関数は存在しますが、公式のAster Analytics Foundation(AAF)の一部ではありません。この情報をお寄せいただいた方にお問い合わせください。

documentParserは、Asterフィールドチームのみが開発し使用する、いわゆるフィールド機能に属します。あなたはそれを使用することはできませんが、あなたを助けてくれるとは思っていません。

連絡先がない場合は、次の操作方法をお伝えしたい場合は、Aster Community Networkにアクセスして質問してください。

関連する問題