Skip to content

Instantly share code, notes, and snippets.

@tuxdna
Last active December 12, 2015 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxdna/4706528 to your computer and use it in GitHub Desktop.
Save tuxdna/4706528 to your computer and use it in GitHub Desktop.
Data Source configuration for Data Import
<dataConfig>
<dataSource name="binary_files_db"
convertType="false"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/binary_files"
user="binary_user" password="binary_password"
/>
<dataSource name="fieldReader"
type="FieldStreamDataSource" />
<document name="items">
<entity name="root"
query="SELECT * from tbl_files"
transformer="TemplateTransformer"
dataSource="binary_files_db">
<field column="data_source_type" template="Jdbc"/>
<field column="data_source_name" template="MySQL"/>
<field column="id_files" name="id" />
<field column="description" name="description" />
<field column="filename" name="filename" />
<field column="filesize" name="filesize" />
<field column="filetype" name="filetype" />
<entity dataSource="fieldReader"
processor="TikaEntityProcessor"
dataField="root.bin_data" format="text">
<field column="text" name="body" />
</entity>
<entity dataSource="fieldReader"
processor="TikaEntityProcessor"
dataField="root.bin_data" format="text">
<field column="text2" name="body" />
</entity>
</entity>
</document>
</dataConfig>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment