I have searched on tap-spreadsheets-anywhere but d...
# plugins-general
j
I have searched on tap-spreadsheets-anywhere but did not find exactly the answer i was looking for. I wanted to run it outside of meltano first just to minimize number of things that can fail and to get more comfortable with singer. I am running the tap by passing in a path to a config file (e.g. python -m tap_spreadsheets_anywhere --config config.json . The log suggests it was able to connect to the SFTP server i provided in the config and even lists a dict with key and file name that matches the start date that i provided in config. My error message is unable to write Catalog entry for ‘<TableName from Config>’ - it will be skipped due to error nothing to repeate at position 0. I am trying to tap an excel sheet that is sitting on the SFTP server. I have declared that format is excel, i provided the sheet name, and finally declared a key property. Do i need to explicitly define the schema of columns in the excel worksheet? Is there anywhere to get more clues from the error message?
d
“nothing to repeate at position 0” suggests that one of the regular expressions is invalid. Can you please share your config?
j
Copy code
{
  "tables": [
    {
      "path": "<sftp://username:password@serverip//folder_name//>",
      "name": "file_schema",
      "pattern": "*appname_*",
      "start_date": "2021-08-09T00:00:00Z",
      "key_properties": [
        "CUSTOMER"
      ],
      "format": "excel",
      "worksheet_name": "Sheet1"
    }
  ]
}
d
@jon_brasher OK, so
pattern
should be a regular expression, not a glob pattern. That means
*
is not interpreted as “any string of characters” but rather “zero or more of the preceding character”, and since there’s no preceding character, you get the “nothing to repeat at position 0” error
You want
"pattern": ".*appname_.*",
, where
.
represents “any character” and
.*
therefore means “zero or more of any character”
j
Ohhh, thank you so much for the help
@douwe_maan Even after the change i still see the unable to write catalog. Is it because I am not running it with a target? Is the expected action of running the tap outside of meltano in python to see the steam of the excel data just printed to stdout?
d
Yeah, that should work. Can you share the error you see when running discovery mode?
j
Sorry for ignorance, but what is discovery mode?
d
That’s running the tap with “--discover” to generate/discover a catalog. Can you share how you’re running the tap, which arguments you’re passing, and what error output you’re seeing?
j
python -m tap_spreadsheets_anywhere --config config.json --discover > catalog.json
message has been deleted
d
You’re still seeing “nothing to repeat at position 0”?
j
Yes, i am going to try to see if I can get this working to a local file first, then i may try another sftp server not this one because intermittently it will not connect. It just could be another symptom and this would be working.