Hi, I am using tap-sftp to extract CSV files from ...
# troubleshooting
s
Hi, I am using tap-sftp to extract CSV files from server, I need to skip few rows and specify that header and data starts from 6th row in CSV, Does anyone experienced the same issue and was able to resolve this?
p
@sumit_singh theres an open issue in the repo related to this feature https://github.com/MeltanoLabs/tap-sftp/issues/12. I dont know if @Henning Holgersen has had a chance to build it yet though
It looks like Henning implemented it in his fork https://github.com/radbrt/tap-sftp/pull/3 so you can try using his fork until we get it merged into the main meltanolabs repo
h
Yeah sorry @sumit_singh, I was supposed to add it to the main repo but attention drifted elsewhere once I got it working. We are using this fork in production today (and have been for a while), so it’s safe to use. I’ll get the PR to the main repo going and let you know.
s
@Henning Holgersen thank you, any expected timeline to merge it in main repo ?
@pat_nadolny Can you please let me know how to use fork ?
h
@sumit_singh I’ll try to get a PR in by the end of the week. In the meantime, here is an example of using my fork:
Copy code
extractors:
  - name: tap-sftp
    namespace: tap_sftp
    pip_url: git+<https://github.com/radbrt/tap-sftp.git>
    executable: tap-sftp
    capabilities:
    - state
    - catalog
    - discover
    settings:
    - name: username
    - name: password
      kind: password
    - name: start_date
      value: '2010-01-01T00:00:00Z'
    config:
      username: ftpuser
      host: <http://ftp.example.com|ftp.example.com>
      password: mySuperSecretPassword
      port: 22
      start_date: 2021-01-28
      tables:
      - table_name: test_table
        search_prefix: ''
        search_pattern: test_.*\.*
        key_properties: []
        delimiter: ','
        encoding: utf-8
s
Thank you @Henning Holgersen, so changing jsut the pip_url would work ?
h
That should work, yes.
Added a PR, @pat_nadolny: https://github.com/MeltanoLabs/tap-sftp/pull/15. Ran afoul of the semantic PR test, I fixed the title but couldn’t make the test rerun. @sumit_singh: I see there is a difference in the “clean_colnames” option between the fork and main repo, it might be better for you to use the skip-rows branch than my fork.
s
@Henning Holgersen how can I use skip-rows branch ? What needs to be changed in pip_url ?
h
@sumit_singh you can use
pip_url: git+<https://github.com/meltanolabs/tap-sftp.git@skip-rows>
in the config.
p
@sumit_singh you'll need to run a clean reinstall once you update the pip url like
meltano install extractor tap-sftp --clean
@Henning Holgersen thanks for opening that PR, I left a few comment 😄
h
PR is now merged (and a bug fixed), you should be able to use the main branch now @sumit_singh . If you tried to get the skip-rows branch to work without luck, it might be because Pat spotted a typo. Should work now anyways. Let me know when it is safe to delete the skip-rows branch.
s
@Henning Holgersen I got it working with skip-rows branch as well, now tested with main branch as well and its working as expected. Thank you so much for your efforts and guidancemelty bouncymelty bouncy
@Henning Holgersen Is there any option that if the file shows error so it should skip the file and update the state ??