Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 10:18 AM
Hi,
This might be a silly question to ask but is it possible to enforce schema on a table created from external location, I am trying to create a table from a s3 location and my command looks like this
query = """CREATE TABLE IF NOT EXISTS {}
USING PARQUET
LOCATION '{}'""".format(raw_table,s3_bucket_location)
but I am not happy with the schema it infers from the parquet, Is there a way I can enforce schema on this table by changing some column types ? I tried by add the
options ( schema = <schema_definition> ) to the create command, that didnt work.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 07:33 PM - edited 02-02-2024 07:33 PM
define columns when create table