In my S3, I have a csv file that looks like this:
id created_at description priority status
Now, one the description column’s row looks like this:
but they did not explain why the following request is not working. We get an Unauthorized error. Is it because of the API key, advertisementId or wrong data? Can we please receive what is needed for this request including the test data?
{
"errors": [
"Unauthorized"
],
"result": null,
"status": 401
}
curl -X POST "https://xx/v1/prefill/eWR1iNBnG8Wj" -H "accept: application/json" -H "Authorization: Bearer 2e05581e8b" -H "Content-Type: application/json" -d "{"data":{"externalId":"string","subId":"string","common":{"amount":20000,"term":84,"purpose":"REFINANCING","payoutAccount":{"iban":"string"},"payoutAccountHolder":"PRIMARY",
This has normal text but also some special characters. Now I use such a command to load it into MYSQL:
LOAD DATA FROM S3 's3://{s3_bucket_name}/{s3_key}'
REPLACE
INTO TABLE {schema_name}.stg_tickets
CHARACTER SET utf8mb4
FIELDS
TERMINATED BY ','
ENCLOSED BY '"'
IGNORE 1 LINES
(id, url, @created_at, @updated_at, @external_id, @type, subject,
description, priority, status, recipient, requester_id,
submitter_id, assignee_id, @organization_id, @group_id,
collaborator_ids, follower_ids, @forum_topic_id, @problem_id,
@has_incidents)
But this messes up the columns because it cannot distinguish the description properly. For example, it adds this to the priority column
"""subId"":""string""
Which is not true because this is still a part of the description column.
I want to handle it using the MySQL command itself. Pre-processing the S3 files wouldn’t be an option at the moment.