This message was deleted.
# community-help
s
This message was deleted.
j
The Typesense API would have returned any errors in the API response... may be the AirByte logs have the actual response from Typesense?
j
Thanks for prompt response. I checked and you are right, probably these:
Copy code
2023-09-29 21:56:16 replication-orchestrator > Schema validation errors found for stream xxxx. Error messages: [$.has_profile: null found, string expected, $.have_dependent_children: null found, string expected, $.country_of_residence: null found, string expected, $.meta_noc: null found, string expected, ........]
a bunch more of the exact same messaging as above. Now I wonder why that is. Why not accept
null
and expecting
string
. Any immediate thoughts?
j
If fields can be null, they'd need to be defined as
optional: true
in the collection schema
That particular error message though is not from Typesense... unless the connector is reading the typesense error and is rewording it
đź‘€ 1
j
This is what I have:
Copy code
{
      "facet": false,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "has_profile",
      "optional": true,
      "sort": false,
      "type": "string"
    },
j
May be there's another schema validation that's happening in the connector
j
It is of type string in BigQuery and Airbyte is detecting it as string too. Typesense as well, shows it as string. Strange.
Actually this happened after we changed 3 of our fields from string to record data type in bigquery. Just sharing, in case somehow helps.
j
I see, I wonder if the AirByte connector stores state about the record types and excepts them to be the same
May be try creating a new collection in Typesense, and new AirByte connector instance and then try syncing the full dataset again?
j
Sure, can do that. Appreciate the help. Will write back here.
Okay, before I do that, I excluded all the above 3
record
type fields and now all 50K records are synced. Definitely something about them.
I still see the same validation errors I pasted above, but records came as complete. That doesn’t look like the source of the issue. Any guesses on if the issue is with Airbyte or Typesense?
j
That particular phrasing of the error is not from Typesense... So I would start by looking into any additional detailed logs in AirByte
j
Hi @Jason Bosco there is no errors on the Airbyte logs. We didn’t have any issues two weeks ago. Were there any changes on the Cloud that may caused this? as we haven’t seen any changes on the Airbyte side.
j
Were there any changes on the Cloud that may caused this?
We do not change Typesense versions automatically, except in very rare cases to restore cluster stability.
j
@Jason Bosco I just tried that through a new connection and with a different collection. It is still the same. I also downgraded my typesense version back to 0.25.1 and back to 0.25.0, and forth to the current rc versions, nothing changed. Again, if I do not include the object fields, I get all the data on the typesense side. Object fields shows-up like this on the typesense side:
Copy code
{
  "created_at": 1696283162,
  "default_sorting_field": "",
  "enable_nested_fields": true,
  "fields": [
    {
        "facet": false,
        "index": true,
        "infix": false,
        "locale": "",
        "name": "work",
        "optional": true,
        "sort": false,
        "type": "object[]"
      },
      {
        "facet": false,
        "index": true,
        "infix": false,
        "locale": "",
        "name": "work.to",
        "optional": true,
        "sort": false,
        "type": "string[]"
      },
      {
        "facet": false,
        "index": true,
        "infix": false,
        "locale": "",
        "name": "work.job_title",
        "optional": true,
        "sort": false,
        "type": "string[]"
      },
  .....
  .....
}
which looks okay to me.
j
I see ok... Since that error message you shared is not from Typesense, it's hard to debug this further from our side. May be AirByte can offer insights into what that error exactly is?
j
Thanks. @Jason Bosco that feels like it is an issue with the BigQuery connector on Airbyte. Found two related issues: 1. https://github.com/airbytehq/airbyte/issues/30179 2. https://github.com/airbytehq/airbyte/issues/4487 It looks the connector can’t handle the repeated fields really well. I can confirm that’s the case for me. To avoid that error, we can save the Array of objects as string. Doing that though, we lose the ability to access those objects, as our
"enable_nested_fields": true,
will be useless. I wonder if there is a way to change the data type after the sync happens to typesense from
string
to
object[]
or if there is any alternative solutions.
j
> way to change the data type after the sync happens to typesense from string to object[] This is not possible to do in Typesense...
One thing you could do is, once the data is synced into Typesense with a string datatype, then create a new collection in Typesense directly via the API with the correct schema, then export the docs from the airbyte-created collection and import the docs into the collection you created
Oh although that won't help with on-going sync - it will just be a one-time thing
Side note: have you considered building your own simple sync script that reads from BigQuery and ingests into Typesense directly via the API, considering these issues that you've run into?
j
Thanks! these are all very helpful. In terms of building a sync script, we haven’t thought about it yet. Have you seen that to be an easier process? we are a small team and dealing with a variety of sources and tasks and thought to delegate most of our work to the tools (of course when they work).
j
Building your own sync process is easier, if the alternatives don't work I guess!
And you have complete control over the data transformations.