greg_vaslo
04/30/2022, 8:37 PMedgar_ramirez_mondragon
05/01/2022, 4:48 AMmeltano.yml
look like?greg_vaslo
05/04/2022, 2:26 AMgreg_vaslo
05/04/2022, 2:26 AMversion: 1
send_anonymous_usage_stats: true
project_id: 774e6b3c-feb6-48f8-b6f4-dcea9ccf3fc7
plugins:
extractors:
- name: tap-spreadsheets-anywhere
variant: ets
pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
config:
tables:
- path: file:///mnt/c/Users/gxv383/Documents/postgresql_tables/ledger/extract
name: accounts
pattern: "accounts.csv"
start_date: "2017-05-01T00:00:00Z"
key_properties: [acct_number]
format: csv
# you will need to add a forced data type for text columns that appear to be numbers since SA forces it to a number and breaks target postgres
# schema_overrides:
# acct_number:
# type: [string]
schema:
accounts:
created_at:
type: ["string", "null"]
format: string
greg_vaslo
05/04/2022, 2:28 AMedgar_ramirez_mondragon
05/04/2022, 3:23 PMAny thought as to why it won't force "acct_number" to a text string?well you're not currently overriding the schema for that field. What you're doing with
created_at
is the way to go.
You can check what the produced catalog will look like with meltano invoke --dump=catalog tap-spreadsheets-anywhere
. Those schema overrides should be applied there.greg_vaslo
05/04/2022, 6:18 PMgreg_vaslo
05/04/2022, 6:30 PMgreg_vaslo
05/04/2022, 6:30 PMgreg_vaslo
05/04/2022, 6:37 PMgreg_vaslo
05/04/2022, 6:37 PM{
"tap_stream_id": "accounts",
"key_properties": [
"acct_number"
],
"schema": {
"properties": {
"acct_number": {
"type": [
"null",
"integer"
]
greg_vaslo
05/04/2022, 6:37 PMgreg_vaslo
05/04/2022, 6:38 PM"created_at": {
"type": [
"string",
"null"
],
"format": "string"
}
edgar_ramirez_mondragon
05/04/2022, 7:11 PMmeltano.yml
above is missing the schema override for acct_number
I think:
extractors:
- name: tap-spreadsheets-anywhere
variant: ets
pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
config:
tables:
- path: file:///mnt/c/Users/gxv383/Documents/postgresql_tables/ledger/extract
name: accounts
pattern: "accounts.csv"
start_date: "2017-05-01T00:00:00Z"
key_properties: [acct_number]
format: csv
schema:
accounts:
created_at:
type: ["string", "null"]
format: date-time
acct_number:
type: ["integer", "null"]
greg_vaslo
05/04/2022, 7:54 PMgreg_vaslo
05/04/2022, 7:54 PMplugins:
extractors:
- name: tap-spreadsheets-anywhere
variant: ets
pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
config:
tables:
- path: file:///mnt/c/Users/gxv383/Documents/postgresql_tables/ledger/extract
name: accounts
pattern: "accounts*.csv"
start_date: "2017-05-01T00:00:00Z"
key_properties: [acct_number]
format: csv
# # you will need to add a forced data type for text columns that appear to be numbers since SA forces it to a number and breaks target postgres
# schema_overrides:
# acct_number:
# type: [st ring]
schema:
accounts:
created_at:
type: ["string", "null"]
format: string
acct_number:
type: ["string","null"]
edgar_ramirez_mondragon
05/04/2022, 7:55 PMgreg_vaslo
05/04/2022, 7:55 PMedgar_ramirez_mondragon
05/04/2022, 7:57 PMcreated_at
from the docs, I thought you'd added that yourself, lol. It's just an example, i.e. if the table had a created_at
field whose schema you wanted to override. You can remove it from your meltano.yml
greg_vaslo
05/04/2022, 7:58 PMgreg_vaslo
05/04/2022, 7:58 PMedgar_ramirez_mondragon
05/04/2022, 7:59 PM