<@U04SE163WC8> I'm trying to create a connection w...
# ask-ai
r
@kapa.ai I'm trying to create a connection where Redshift is the source. When I define the schema optional field with the schema public, everything works. But when I define a different schema, I get the following error: Internal message: java.lang.NullPointerException: null value in entry: isNullable=null. Why is that? Do I need to grant e specific permission for the schema?
u
Yes, you're correct. The error you're encountering might be due to insufficient permissions. When setting up a connection with Redshift as the source, you need to ensure that the user has the necessary permissions to access the schema you're trying to connect to. You can grant the necessary permissions by executing the following SQL statements:
Copy code
sql GRANT CREATE ON DATABASE database_name TO airbyte_user; -- add create schema permission   GRANT usage, create on schema my_schema TO airbyte_user; -- add create table permission   GRANT SELECT ON TABLE SVV_TABLE_INFO TO airbyte_user; -- add select permission for svv_table_info
Replace
database_name
with the name of your database,
my_schema
with the name of your schema, and
airbyte_user
with the name of your Airbyte user. Also, it's worth noting that there are known issues with the Redshift source when the schema contains at least one view "with no schema binding". The precondition scan fails with a NullPointerException in such cases. A workaround for this issue is to only use Airbyte on schemas which don't contain any views with no schema binding. Sources: - [Airbyte Documentation](https://docs.airbyte.com/integrations/destinations/redshift#step-1-set-up-redshift) - [Github Issue 25825](https://github.com/airbytehq/airbyte/issues/25825)
r
@kapa.ai Didn't work. same error.
u
A message from kapa.ai
u
Hmm, I don't know enough to give you a confident answer yet. The information provided in the knowledge sources doesn't seem to directly address the specific error you're encountering. It might be helpful to check the logs for more detailed error messages or clues as to what might be causing the issue. You could also try reaching out to the Airbyte community on their [discussion forum](https://discuss.airbyte.io/) or [Github](https://github.com/airbytehq/airbyte) for more specific assistance. In the meantime, you might find it helpful to review the [Airbyte documentation](https://docs.airbyte.com/) for more information on setting up and troubleshooting connections.
r
@kapa.ai how do I know how much time each stream of a connection took to sync?
u
A message from kapa.ai
u
You can find the sync duration for each stream in the logs of the sync job. The logs provide detailed information about the sync process, including the time taken to sync each stream. Here's an example of what you might see in the logs:
Copy code
Syncing stream blocks 0:00:00.454835 Syncing stream bounces 0:00:00.484302 Syncing stream global_suppressions 0:00:00.465494 Syncing stream invalid_emails 0:00:00.423696 Syncing stream segments 0:00:00.714763 Syncing stream spam_reports 0:00:00.453491 Syncing stream stats_automations 0:00:00.491029 Syncing stream suppression_group_members 0:00:25.141263 Syncing stream suppression_groups 0:00:00.295982 Syncing stream templates 0:00:00.753334
In this example, the time taken to sync each stream is displayed next to the stream name. For instance, the
blocks
stream took approximately 0.454835 seconds to sync, while the
suppression_group_members
stream took approximately 25.141263 seconds. You can access the logs for a sync job from the Airbyte dashboard by navigating to the connection and clicking on the specific sync job you're interested in. Source: [Github Issue 37349](https://github.com/airbytehq/airbyte/issues/37349)
r
@kapa.ai can I access it in the destination database?
u
A message from kapa.ai
u
No, the sync duration for each stream is not directly stored in the destination database by Airbyte. The destination database contains the data synced from the source, but it does not include metadata about the sync process such as the duration for each stream. However, you can access this information from the logs of the sync job in the Airbyte dashboard. If you need this information to be stored in the destination database, you would need to manually extract it from the logs and insert it into the database. Source: [Github Issue 37349](https://github.com/airbytehq/airbyte/issues/37349)