This message was deleted.
# ask-ai
s
This message was deleted.
k
Based on the information provided in the knowledge sources and your detailed description of the issue, I can offer some insights and suggestions: 1. The error you're encountering seems to be related to how PyAirbyte is handling the primary key and index creation for the Convex destination. The error message suggests that Convex doesn't allow index names starting with an underscore. 2. As noted in the [Convex documentation](https://docs.airbyte.com/integrations/destinations/convex#convex), Convex's table naming rules apply, and table names can only contain letters, digits, and underscores and may not start with an underscore. It's possible that this rule also applies to index names. 3. The issue might be arising because PyAirbyte is attempting to create an index named "_by_airbyte_primary_key" even when no primary key is specified in the source data. This behavior seems to differ from the Airbyte OSS implementation. 4. In your debug output, you mentioned that
primary_key: None
is shown, which indicates that no primary key is detected in your source data. However, PyAirbyte still seems to be attempting to create an index for it. 5. The Convex destination connector code you shared shows that indexes are only added for streams with
DestinationSyncMode.append_dedup
and when a primary key is present. However, it's possible that PyAirbyte is not correctly interpreting or passing this information. To troubleshoot this issue, you could try the following: 1. Ensure that your PyAirbyte version is up to date, as there might have been fixes for this issue in newer versions. 2. Try explicitly setting a primary key in your source data or configuration, if possible. This might help PyAirbyte correctly identify and handle the primary key. 3. If you have control over the PyAirbyte code or can modify the Convex destination connector, you could add a check to prevent index creation when the primary key is None:
Copy code
python    if configured_stream.destination_sync_mode == DestinationSyncMode.append_dedup and configured_stream.primary_key and len(configured_stream.primary_key) > 0:        indexes_to_add[configured_stream.stream.name] = configured_stream.primary_key
4. You could also try to modify the index naming convention in the Convex destination connector to avoid using underscores at the beginning of index names. 5. If possible, compare the exact configuration and data flow between your working Airbyte OSS setup and the PyAirbyte setup to identify any differences in how the primary key and sync modes are being handled. If these suggestions don't resolve the issue, it might be worth raising this as a potential bug with the PyAirbyte maintainers, as it seems to be a discrepancy between the PyAirbyte and Airbyte OSS implementations.