Skip to Content

SFTP ADAPTER VIRTUAL PROCEDURES

Hello Experts,

I tried to run this procedure in HANA NEO Licensed version but it returns me an error stating that invalid remote destination. what could be the issue?.

I am doing this because currently in the corresponding SFTP server is my Excel exports from LMS System . i wanted to expose it as tables.

CREATE VIRTUAL PROCEDURE procedures_sftp (IN METHOD NVARCHAR(1024), IN USERID NVARCHAR(1024), IN PASSWORD NVARCHAR(1024), IN SERVERADDR NVARCHAR(1024), IN SERVERPORT INTEGER, IN REMOTEFILE NVARCHAR(1024), IN LOCALFILE NVARCHAR(1024), OUT param_7 TABLE (RESULT NVARCHAR(1024)))

CONFIGURATION '{

 "__DP_UNIQUE_NAME__": "SFTP", 

"__DP_HAS_NESTED_PARAMETERS__": false,

 "__DP_USER_DEFINED_PROPERTIES__": {},

 "__DP_INPUT_PARAMETER_PROPERTIES_": [], 

"__DP_RETURN_PARAMETER_PROPERTIES_": [], 

"__DP_VIRTUAL_PROCEDURE__": true, 

"__DP_HAS_INTERNAL_OUTPUT_PARMETER__": false, 

"__DP_DEFAULT_OUTPUT_PARAMETER_INDEX__": 0}' AT "File_adapter"


3:34:41 PM (SQL Editor) Could not execute 'CREATE VIRTUAL PROCEDURE procedures_sftp (IN METHOD NVARCHAR(1024), IN USERID NVARCHAR(1024), IN ...'Error: (dberror) 471 - invalid data source name: Invalid Remote Destination. FileAdapter: line 11 col 6 (at pos 619)

Also i tried the adapter script too

CREATE REMOTE SOURCE "SFTPAdapterDSTest" ADAPTER "SFTPAdapterDatastore" AT LOCATION agent "MyAgent"
 CONFIGURATION '<?xml version="1.0" encoding="UTF-8"?>
<ConnectionProperties name="configuration">
    <PropertyGroup name="fileformatconfiguration">
        <PropertyEntry name="format">flatfiles</PropertyEntry>
        <PropertyEntry name="errorHandling">false</PropertyEntry>
    </PropertyGroup>
    <PropertyGroup name="errorHandlingConfiguration">
        <PropertyEntry name="logDataConversionWarnings">true</PropertyEntry>
        <PropertyEntry name="maximumWarningsToLog"></PropertyEntry>
        <PropertyEntry name="captureDataConversionErrors">false</PropertyEntry>
        <PropertyEntry name="captureRowFormatErrors">true</PropertyEntry>
        <PropertyEntry name="captureStringTruncationErrors">false</PropertyEntry>
        <PropertyEntry name="maximumErrosToStopJob"></PropertyEntry>
        <PropertyEntry name="writeErrorRowsToFile">false</PropertyEntry>
        <PropertyEntry name="errorFileRootDirectory"></PropertyEntry>
        <PropertyEntry name="errorFileName"></PropertyEntry>
    </PropertyGroup>
    <PropertyGroup name="sftp_location">
        <PropertyEntry name="host">https://sftp*.sapsf.com</PropertyEntry>
        <PropertyEntry name="port">22</PropertyEntry>
        <PropertyEntry name="hostKeyFingerprint">How to get it and is it required ?</PropertyEntry>
        <PropertyEntry name="authType">password</PropertyEntry>
        <PropertyEntry name="connectionRetryCount">10</PropertyEntry>
        <PropertyEntry name="connectionRetryInterval">10</PropertyEntry>
        <PropertyEntry name="sftp_remote_directory">/AIEP/AIEP Outgoing/</PropertyEntry>
    </PropertyGroup>
</ConnectionProperties>'
WITH CREDENTIAL TYPE 'PASSWORD' USING
 '<CredentialEntry name="AccessTokenEntry">
      <password><password></password>//I didnt add anything here
 </CredentialEntry>'
 '<CredentialEntry name="SFTP_CREDENTIAL">
      <user>1***4T</user>
      <password>MYPASSWORD</password>
</CredentialEntry>';

4:00:39 PM (SQL Editor) Could not execute 'CREATE REMOTE SOURCE "SFTPAdapterDSTest" ADAPTER "SFTPAdapterDatastore" AT LOCATION agent "MyAgent" ...'
Error: (dberror) 474 - invalid adapter name: SFTPAdapterDatastore: line 1 col 21 (at pos 21)

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 20, 2018 at 02:02 PM

    Hi Gabriel,

    Since your are note using Hana Trial, I would suggest you to open a support ticket for that.

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded