[
https://issues.apache.org/jira/browse/MADLIB-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16525302#comment-16525302
]
ASF GitHub Bot commented on MADLIB-1241:
----------------------------------------
GitHub user iyerr3 opened a pull request:
https://github.com/apache/madlib/pull/282
Utilites: Add CTAS while dropping some columns
JIRA: MADLIB-1241
This commit adds function to create a new table from existing table
while dropping some of the columns of the source table.
Closes #282
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/madlib/madlib feature/drop_columns
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/madlib/pull/282.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #282
----
commit 3b5310c07c2092059cd116c82457d026f968cd7a
Author: Rahul Iyer <riyer@...>
Date: 2018-06-27T00:36:39Z
Utilites: Add CTAS while dropping some columns
JIRA: MADLIB-1241
This commit adds function to create a new table from existing table
while dropping some of the columns of the source table.
Closes #282
----
> Drop columns
> ------------
>
> Key: MADLIB-1241
> URL: https://issues.apache.org/jira/browse/MADLIB-1241
> Project: Apache MADlib
> Issue Type: New Feature
> Components: Module: Utilities
> Reporter: Frank McQuillan
> Assignee: Rahul Iyer
> Priority: Major
> Fix For: v1.15
>
>
> Drop Columns
> Drops columns of a table.
> {code}
> dropcols(
> source_table,
> out_table,
> cols_to_drop
> )
> source_table
> TEXT. Name of the table containing the source data.
> out_table
> TEXT. Name of the generated table containing the output. If a table with the
> same name already exists, an error will be returned.
> cols_to_drop
> TEXT, default NULL. Comma-separated string of column names from the source
> table to drop. Not all columns of the source table can be dropped.
> Output
> The output table produced by the dropcols function contains the following
> columns:
> <...>
> Columns from source table, depending on which ones are kept.
> {code}
> Notes
> (1)
> The function
> http://pivotalsoftware.github.io/PDLTools/group__ArrayUtilities.html
> is similar. To do the equivalent of the PDL Tools one in MADlib, you would
> do:
> {code}
> dropcols(
> table_name,
> output_table,
> drop_columns
> )
> {code}
> (2)
> Please maintain the column order of the source table, minus the dropped
> column(s) of course.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)