cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP ADAPTER VIRTUAL PROCEDURES

former_member585658
Participant
0 Kudos

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)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Gabriel,

Was your HANA instance provided with SDI? The mentioned adapter is only available in SDI.

Best regards,
Ivan

former_member585658
Participant
0 Kudos

Yes , it is .

Accepted Solutions (1)

Accepted Solutions (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Gabriel,

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

Regards,
Ivan

Answers (0)