Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The parser fails to parse columns with space in them #238

Open
soujyosen opened this issue Feb 16, 2024 · 1 comment
Open

The parser fails to parse columns with space in them #238

soujyosen opened this issue Feb 16, 2024 · 1 comment
Labels

Comments

@soujyosen
Copy link

DDL:
CREATE EXTERNAL TABLE IF NOT EXISTS competitor_analytics.wtp_weekly_unique_hirer_by_billing_paid_budget_sheet_target
(
week ending string,
dbhk string,
jsmy string,
jssg string,
jsid string,
jsph string,
dbth string,
total string
)
COMMENT 'Active CSV target benchmarking data uploads for Weekly Trading Pack. Updated on a yearly and need-based frequency. Sourced from Microsoft Shared Folder and JobSeeker Dashboard.'
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
LOCATION 's3://demo/path'
TBLPROPERTIES ("skip.header.line.count" = "1");

Parser output:
[{'table_name': 'wtp_weekly_unique_hirer_by_billing_paid_budget_sheet_target', 'schema': 'competitor_analytics', 'primary_key': [], 'columns': [{'name': '`week', 'type': 'ending` string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}, {'name': 'dbhk', 'type': 'string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}, {'name': 'jsmy', 'type': 'string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}, {'name': 'jssg', 'type': 'string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}, {'name': 'jsid', 'type': 'string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}, {'name': 'jsph', 'type': 'string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}, {'name': 'dbth', 'type': 'string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}, {'name': 'total', 'type': 'string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}], 'alter': {}, 'checks': [], 'index': [], 'partitioned_by': [], 'tablespace': None, 'if_not_exists': True, 'comment': "'Active CSV target benchmarking data uploads for Weekly Trading Pack. Updated on a yearly and need-based frequency. Sourced from Microsoft Shared Folder and JobSeeker Dashboard.'", 'stored_as': None, 'row_format': {'serde': True, 'java_class': "'org.apache.hadoop.hive.serde2.OpenCSVSerde'"}, 'location': "'s3://seek-dataplatform-dropin-raw-prod/external/Competitor-Analytics/z_competitor_analytics/wtp_weekly_unique_hirer_by_billing_paid_budget_sheet_target/'", 'fields_terminated_by': None, 'lines_terminated_by': None, 'map_keys_terminated_by': None, 'collection_items_terminated_by': None, 'property_key': None}]

The first column with a space has issues in parsing {'name': 'week', 'type': 'ending string', 'size': None, 'references': None, 'unique': False, 'nullable': True, 'default': None, 'check': None}

@xnuinside
Copy link
Owner

@soujyosen hi, thanks for opening the issue, can you provide link to the documentation - what DB is supports creating column names without quotes and with spaces in names?

@xnuinside xnuinside added the stale label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants