Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Source Configuration
Determine the configuration parameters for your File adapter remote source and, if
necessary, use these code samples for creating a remote source using the SQL console.
The parameters available to you during this process may change because they depend on
which options you choose.NoteIf you want to use a DPAgent agent installed on Linux to
connect to the SharePoint site, enable basic authentication on the SharePoint server.
ConnectionInfo Source Options Local File System: Specifies that the source is
a file on a local system.
Target Options The path to the folder that you want to access on the
local file system where the DP Agent is deployed.
Root Directory The root directory for your data files. This is used
for security. No remote source can reach beyond
this directory for data files. The root directory must
exist before you can create a remote
source.NoteDo not use a link directory or
directory shortcut for a value in this parameter.
\\<host_name>\<directory>
Directory of the Location where you store your file format definition
file format files. This directory must exist before you can create
definitions a remote source. Include the full path and file
name.NoteDo not use a linked directory or
directory shortcut for a value in this parameter.
ConnectionInfo Host Name The remote URL to connect to the remote HDFS,
> HDFS usually defined in core-site.xml..
Configuration
Hadoop User The user of the Hadoop system when logging in.
Name This can also be the owner of the file location where
you want to put the copied target files. Make sure
you have the proper permissions to access this
location.
ConnectionInfo Server URL Enter the URL for the server where the SharePoint
> SharePoint source is located.
Server
If you create a new SharePoint site on the server, be
Configuration
sure to include the name of the site at the end of the
URL. For example, if your server name is
http://<server_name>/ and your new site name
is “site1”, your URL would
be “http://<server_name>/site1”
Credentials > AccessToken A password. An access token protects the files from
AccessTokenE access from different agents. Use this password
ntry when creating a remote source.
Credentials > SharePoint User The domain and user name for the SharePoint
SharePoint (Domain\Userna account.
Login me)
The following code samples illustrate how to create a remote source using the SQL
console:
Example
Sample Code
CREATE REMOTE SOURCE "MyFileSource" ADAPTER "FileAdapter" AT LOCATION
AGENT "MyAgent"
CONFIGURATION
<ConnectionProperties>
<PropertyEntry name="rootdir">myrootdir</PropertyEntry>
<PropertyEntry name="fileformatdir">myfileformatdir</PropertyEn
try>
<PropertyEntry name="source_options">local</PropertyEntry>
<PropertyEntry name="target_options">local</PropertyEntry>
</ConnectionProperties>
<password>mytoken</password>
</CredentialEntry>';
Example
Sample Code
CREATE REMOTE SOURCE "MyFileSource" ADAPTER "FileAdapter" AT LOCATION
AGENT "MyAgent"
CONFIGURATION
<ConnectionProperties>
<PropertyEntry name="rootdir">myrootdir</PropertyEntry>
<PropertyEntry name="fileformatdir">myfileformatdir</PropertyEn
try>
<PropertyEntry name="usecdc">true</PropertyEntry>
<PropertyEntry name="source_options">local</PropertyEntry>
<PropertyEntry name="target_options">local</PropertyEntry>
</ConnectionProperties>
'<CredentialEntry name="AccessTokenEntry">
<password>mytoken</password>
</CredentialEntry>';
HDFS as target
Example
Sample Code
CREATE REMOTE SOURCE "MyFileSource" ADAPTER "FileAdapter" AT LOCATION
AGENT "MyAgent"
CONFIGURATION
<ConnectionProperties>
<PropertyEntry name="rootdir">myrootdir</PropertyEntry>
<PropertyEntry name="fileformatdir">myfileformatdir</PropertyEn
try>
<PropertyEntry name="target_options">hdfs</PropertyEntry>
<PropertyEntry name="host">hdfs:/myhost.sap.corp</PropertyEntry
>
<PropertyEntry name="port_number">8020</PropertyEntry>
<PropertyEntry name="target_hdfs_file_location">/user/sap</Prop
ertyEntry>
<PropertyEntry name="hadoop_user_name">myuser</PropertyEntry>
</ConnectionProperties>
'<CredentialEntry name="AccessTokenEntry">
<password>mytoken</password>
</CredentialEntry>';
Sharepoint location
Example
Sample Code
CREATE REMOTE SOURCE "MyFileSource" ADAPTER "FileAdapter" AT LOCATION
AGENT "MyAgent"
CONFIGURATION
<PropertyEntry name="rootdir">myrootdir</PropertyEntry>
<PropertyEntry name="fileformatdir">myfileformatdir</PropertyEn
try>
<PropertyEntry name="source_options">SharePoint</PropertyEntry>
<PropertyEntry name="target_options">local</PropertyEntry>
<PropertyGroup name="SharePoint">
<PropertyEntry name="spurl">http://myhost.sap.corp/mysharepoint
site</PropertyEntry>
<PropertyEntry name="spdir">download/sharepoint</PropertyEntry>
</PropertyGroup>
</ConnectionProperties>
'<CredentialEntry name="AccessTokenEntry">
<password>mytoken</password>
</CredentialEntry>
<CredentialEntry name="sharePointCredential">
<user>mydomain\mysharepointuser</user>
<password>mypassword</password>
</CredentialEntry>';