Hi <@U04SE163WC8> I can't see anything in the Tra...
# ask-ai
v
Hi @kapa.ai I can't see anything in the Transformation section of my airbyte UI. I have the following error why syncing from sql server to postgres and need to fix it. Error messages: [$.dateadded: 2015-10-22T075700.000000 is an invalid date-time].
k
Hi, It looks like you're encountering an issue with date-time formatting while syncing from SQL Server to Postgres. This is a known issue where date/time related data types are converted into strings, which can cause errors during synchronization. ### Steps to Fix the Issue 1. Check Basic Normalization Settings: Ensure that basic normalization is enabled in your Airbyte connection settings. You can toggle it on or off in the "Normalization and Transformation" section when setting up your connection. For more details, refer to the [Airbyte documentation on Basic Normalization](https://docs.airbyte.com/using-airbyte/core-concepts/basic-normalization#ui-configurations). 2. Update the Catalog: As a temporary fix, you can update the catalog and change the problematic date-time fields to strings. Here’s how you can do it: - Use the Airbyte API to get the connection details, including the sync catalog. - Change the type for the date-time fields to string. - Update the catalog and try running the sync again. Here’s a brief outline of the steps: 1. Get the connection details using the API:
Copy code
POST /v1/connections/get
2. Modify the sync catalog to change the type of the date-time fields to string. 3. Update the connection with the modified catalog and run the sync again. 3. Consider Downgrading the Connector Version: If the issue persists, you might want to consider downgrading your source SQL Server connector version. This has been suggested in similar cases where a bug was introduced in a specific version. For example, downgrading the Postgres connector version to
0.4.18
was suggested in a similar context. ### Example of a Similar Issue In a similar case, a user faced an issue with date-time formatting and resolved it by updating the catalog and changing the date-time fields to strings. You can refer to the detailed steps in this [forum post](https://discuss.airbyte.io/t/1989). If you continue to face issues, please share your sync logs and a sample of the raw data to get more specific assistance. I hope this helps! If you have any further questions, feel free to ask. ### References - [Basic Normalization Documentation](https://docs.airbyte.com/using-airbyte/core-concepts/basic-normalization#ui-configurations) - [Forum Post on Date-Time Issue](https://discuss.airbyte.io/t/1989)
v
@kapa.ai, how do I change the datatype from the UI
k
A message from kapa.ai
To change the datatype from the Airbyte UI, you can use the "Cast Record Fields to Schema Types" feature. This allows you to specify the desired data types for fields in your schema. Here’s how you can do it: ### Steps to Change Data Type from the UI 1. Navigate to the Connection Settings: - Go to the Airbyte UI and navigate to the connection for which you want to change the data type. 2. Access the Schema Settings: - In the connection settings, find the schema settings for the source stream you are working with. 3. Disable Automatic Schema Detection: - In the "Declared Schema" tab, disable the
Automatically import detected schema
option. This allows you to manually specify the schema. 4. Modify the Field Types: - Change the type of the fields you want to modify. For example, if you have a date-time field that is currently a string, you can change it to a
timestamp
or
date
type. 5. Enable Casting: - Enable the
Cast Record Fields to Schema Types
option in the Record Selector component. This will ensure that the fields in the output records are cast to the types declared in the schema. ### Example Suppose you have a field
dateadded
that is currently a string but should be a
timestamp
. Here’s how you can change it: 1. Disable Automatic Schema Detection: - Uncheck the
Automatically import detected schema
option. 2. Change Field Type: - Locate the
dateadded
field in the schema and change its type from
string
to
timestamp
. 3. Enable Casting: - Enable the
Cast Record Fields to Schema Types
option. ### Example JSON Schema Here’s an example of what the schema might look like after the changes:
Copy code
json {   "type": "object",   "properties": {     "dateadded": {       "type": "string",       "format": "date-time"     }   } }
### Additional Information For more detailed instructions, you can refer to the [Airbyte documentation on casting record fields to schema types](https://docs.airbyte.com/connector-development/connector-builder-ui/record-processing#cast-record-fields-to-schema-types). By following these steps, you should be able to change the data type of fields directly from the Airbyte UI. If you have any further questions or run into issues, feel free to ask!
v
@kapa.ai You made a mistake. My field is already a datetime field from sql server. But I want it to be a strung to enable me load to postgres.
k
A message from kapa.ai
To change a
datetime
field from SQL Server to a
string
in order to load it into Postgres, you can follow these steps in the Airbyte UI: ### Steps to Change
datetime
to
string
in Airbyte UI 1. Navigate to the Connection Settings: - Go to the Airbyte UI and navigate to the connection for which you want to change the data type. 2. Access the Schema Settings: - In the connection settings, find the schema settings for the source stream you are working with. 3. Disable Automatic Schema Detection: - In the "Declared Schema" tab, disable the
Automatically import detected schema
option. This allows you to manually specify the schema. 4. Modify the Field Types: - Change the type of the
datetime
fields to
string
. This will ensure that the fields are treated as strings during the sync process. ### Example Suppose you have a field
dateadded
that is currently a
datetime
but should be a
string
. Here’s how you can change it: 1. Disable Automatic Schema Detection: - Uncheck the
Automatically import detected schema
option. 2. Change Field Type: - Locate the
dateadded
field in the schema and change its type from
datetime
to
string
. ### Example JSON Schema Here’s an example of what the schema might look like after the changes:
Copy code
json {   "type": "object",   "properties": {     "dateadded": {       "type": "string"     }   } }
### Additional Information For more detailed instructions, you can refer to the [Airbyte documentation on casting record fields to schema types](https://docs.airbyte.com/connector-development/connector-builder-ui/record-processing#cast-record-fields-to-schema-types). By following these steps, you should be able to change the data type of fields directly from the Airbyte UI to ensure that your
datetime
fields are treated as
string
during the sync process. If you have any further questions or run into issues, feel free to ask!