Hi, I have a case where the source table has a `JS...
# troubleshooting
r
Hi, I have a case where the source table has a 
JSON
 column and Meltano unpacks it into multiple columns, not even loading the source column itself. I tried getting it by only specifying that single column to load, ran 
meltano elt
 and I cannot seem to be able to load that column into my schema. I only get the unpacked version (meaning all the columns that derive from that, according to Meltano). Example:
Copy code
source: my_source_table
Copy code
specification in meltano.yml:
select:
-source.specific_json_col
Copy code
run command: 
meltano elt tap-bla target-bla-bla
Copy code
what I see when loaded:

my_source_table:
specific_json_col__derived_col_1
specifi_json_col__derived_col_2
..
I did not look at the source code yet, but is this how it is meant to work? 🤔 Thanks in advance 🙂
e
Hi @rigerta! To answer your question, yes this it is normally meant to work simple smile. If you want the target not to unpack the json object into multiple columns, you'd have to remove any
properties
from the schema of the field in the source. Like
Copy code
"specific_json_col": {
  "type": "object",
  "properties": {
    "derived_col_1": {...},
    "derived_col_2": {...}
  }
}
into
Copy code
"specific_json_col": {
  "type": "object",
  "properties": {}
}
Depending on the target, it may have a setting option to disable flattening of json fields
r
I see, thanks @edgar_ramirez_mondragon!
e
np!