Panoply's data sources automatically create columns based on incoming data. If the source data has no values for a specific column, then Panoply won't create it. Likewise, if all the data in a column is nested data (objects or arrays). Instead of creating a column, Panoply's default behavior for dealing with nested data is to generate subtables.
Changing Panoply's behavior for dealing with nested data is the main reason you need to manually add a column to a table. Instead of allowing Panoply to create subtables, you configure it to flatten the nested data. And by choosing this behavior, a new column must be added to support it. The "How do I flatten my data" topic in the Panoply Community explains and provides the steps on how to do the nested data flattening in Panoply.
Now, to manually add a column to a table:
- Execute an
ALTER TABLE
statement that adds a new column. Customize the sample provided below. Replaceschema_name
,table_name
, andcolumn_name
with your own values.
ALTER TABLE "schema_name"."table_name" ADD COLUMN "column_name" bigint;
- Know the data type of the column you're adding. It must be one of these types:
- bigint
- boolean
- double precision
- timestamp without timezone
- varchar
If you use any other type, future collections might fail to ingest data properly.
A few notes to keep in mind:
- You can only add a column if you are the owner of the table/relation.
- If you expect to see a specific column in a table, but it's not there, manually adding one will not cause the data source to ingest data to it.
Comments
0 comments
Please sign in to leave a comment.