thanat_varathon
03/20/2023, 8:21 AMHenning Holgersen
03/20/2023, 8:35 AMthanat_varathon
03/20/2023, 8:47 AMHenning Holgersen
03/20/2023, 3:09 PMthanat_varathon
03/21/2023, 2:47 AMtap-spreadsheets-anywhere to insert into target-oracle . The tap tries to add columns _smart_source_bucket, _smart_source_file , _smart_source_lineno .
This generates the sql query
INSERT INTO sample_data_temp (id, name, _smart_source_bucket, _smart_source_file, _smart_source_lineno)
VALUES (1, 'Test', 'filepath', 'SAMPLEDATA.xlsx', 3)
;
which will generate error
SQL Error: ORA-00911: invalid character
00911. 00000 - "invalid character"
*Cause: The identifier name started with an ASCII character other than a
letter or a number. After the first character of the identifier
name, ASCII characters are allowed including "$", "#" and "_".
Identifiers enclosed in double quotation marks may contain any
character other than a double quotation. Alternate quotation
marks (q'#...#') cannot use spaces, tabs, or carriage returns as
delimiters. For all other contexts, consult the SQL Language
Reference Manual.
*Action: Check the Oracle identifier naming convention. If you are
attempting to provide a password in the IDENTIFIED BY clause of
a CREATE USER or ALTER USER statement, then it is recommended to
always enclose the password in double quotation marks because
characters other than the double quotation are then allowed.
because the column name starts with _ is not wrapped in double quote.
I tried to check the config of tap-spreadsheets-anywhere to turn off the column insertion but not found one. Could you help check this?Henning Holgersen
03/21/2023, 7:04 AMHenning Holgersen
03/21/2023, 6:01 PMmeltano.yaml :
- name: target-oracle
variant: radbrt
pip_url: git+<https://github.com/radbrt/target-oracle.git@illegal_colnames>
This should move leading underscores to trailing underscores, and handle a few edge cases involving periods etc. For normal column names it should not matter at all.thanat_varathon
03/22/2023, 5:48 AMtarget-oracle with your branch and it works fine. Now these columns can be inserted. Thanks.
I have another issue regarding the column discovery. It seems that the target-oracle will create the column type of Number(38,0) for the integer columns and Number(22,16) for the float columns. The Number(22,16) means there are 16 decimals and only 6 digits for numbers so I cannot insert the data higher than 1 million into that column. Could you please check? (it will return ORA-01438: value larger than specified precision allowed for this column). Maybe make it (38,16)?
One more question, is there a way to possible force all columns to be created as string column?Henning Holgersen
03/22/2023, 6:21 AMHenning Holgersen
03/22/2023, 6:25 AMthanat_varathon
03/22/2023, 6:40 AMHenning Holgersen
03/22/2023, 6:52 PMnumber_datatypes with some changes to number types:
• By default, NUMBER(38,10) is used
• A new config prefer_float_over_numeric is false by default, but can be set to true so that it uses FLOAT datatypes for numerics.
I strongly suspect numbers are converted to floats at some point during the ingest process anyways, so that using float in the DB is actually the most accurate representation of the data type at that point.
Let me know how it works in reality.thanat_varathon
03/23/2023, 3:06 AMnumber_datatypes seems to work. I managed to EL the first excel file into Oracle db. Let me test the remaining excel files and will get back to you.thanat_varathon
03/24/2023, 7:59 AMHenning Holgersen
03/24/2023, 8:48 AMHenning Holgersen
03/24/2023, 9:26 AMmeltano install --clean .thanat_varathon
03/24/2023, 10:24 AMHenning Holgersen
03/24/2023, 10:40 AM