https://slingdata.io logo
is there any details on how the
# sling-help
m
is there any details on how the transforms applied if combined with custom sql? Is the transform skipped, or applied after the sql? I am trying to figure out why this isnt working:
Copy code
disabled: false
        update_key: order_id
        transforms:
            - s_street2: 'is_null(value) ? "" : value'
        sql: |
            SELECT * FROM db.orders WHERE
              {incremental_where_cond} AND
              placed_at IS NOT NULL AND placed_at != '0000-00-00 00:00:00' AND
              in_quickbooks IS NOT NULL AND in_quickbooks != '0000-00-00 00:00:00'
The replication errors:
orders                                       | Error 1048 (23000): Column 's_street2' cannot be null
I tried changing this able to "direct_insert: true" and that made the
cannot be null
error go away. Must be something about the way the _tmp table is created that set that column to not null when the actual target table doesnt have that?
2 Views