Hi All, Is there a documentation explaining what t...
# troubleshooting
n
Hi All, Is there a documentation explaining what to expect (in terms of datatypes, tables) in postgres db after loading the data into it? I am trying to load data from google sheets to postgres and I'm seeing that all columns with integer/number datatype are not shown in the postgres table.
r
A tap defines a catalog schema that describes the data structure of incoming records. This is used by the target to map out how to represent that data. It's up to the target to process any schema type information and map to respective data types, if the technology supports it (e.g. a CSV target will not support typing, but a Postgres target can). A Google Sheets tap has to be able to handle all sorts of sheets in a generic way, so the schema usually has to be passed in manually by the user, or generated dynamically, on a sheet-by-sheet basis. Your best bet would be to have a look into the docs for the Google Sheets tap you are using. @daniel_walker may be able to offer more help, as he built our SDK-based
tap-google-sheets
, which does support dynamic schema generation. https://github.com/Matatika/tap-google-sheets
i
I had this issue using singer.io tap. My data looks like
Copy code
Source   | Country   | Date         | Amount   |
Upwork   | Finland   |   2022-08-01 |   212.21 |
The way I got around this looks like this in my tap-google-sheets extractor yaml:
Copy code
schema:
      Content:
        Date:
          type:
          - string
          - 'null'
          format: date
        Amount:
          type:
          - number
          - string
          - 'null'
          format: number
Not sure if everything here is absolutely necessary, but the end result is now that the columns actually have the right type.