a month ago - last edited a month ago
I'm importing some datasets to SAP HANA Cloud, using IMPORT FROM.
Here's the maneuver:
CREATE TABLE "FOO"."BAR" (
id VARCHAR(256) PRIMARY KEY
name NVARCHAR(5000) NOT NULL
ts TIMESTAMP NOT NULL
);
IMPORT FROM PARQUET FILE
'gs://foo/bar/000000000000.parquet'
INTO "FOO"."BAR"
WITH
FAIL ON INVALID DATA
CREDENTIAL 'GCS'
COLUMN LIST (id, name, ts)
FILE COLUMN LIST (1,2,3);
If there's an issue with the file, like a NULL, the import fails with a generic some of rows have failed to be imported error.
For on prem, I can use the ERROR LOG option to get a error log. But in Hana Cloud, this options makes the import fail immediately. It makes sense; I don't think there's a filesystem I would even be able access even if the ERROR LOG file option did work, right?
So, how can I get file import error details, when importing into a HANA Cloud instance?
Request clarification before answering.
I believe the IMPORT FROM SQL statement has an option named ERROR LOG that specifies the name of the file to record the additional details in. It is saved in the same location as the file that is being imported. Additional details can be found at https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/i...
Hope that helps,
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case it helps anyone, my current workaround is to create a sql-on-files external table, and doing an upsert instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.