rm_db_name: Remove Database Names from Columns Names.

View source: R/rm_db_name.R

rm_db_nameR Documentation

Remove Database Names from Columns Names.

Description

Remove the database column extensions that are created when query databases such as Hive. In other words, when pulling data into R from HIVE, the name of the HIVE database is prefixed to all the column names. For example, if you HIVE table is called FOO, then your columns in R would be of the form FOO.variable1 FOO.variable2 ... etc.

Usage

rm_db_name(df, db_name)

Arguments

df

Dataframe

db_name

string The name of the table in the database that you want removed from the column names.

Details

Removes database extensions from column/fields/variable names.

Value

A dataframe is returned with the prefix database name of the column names removed. In the example above the new dataframe would have column names variable1, variable2...etc.


Fredo-XVII/RToolShed documentation built on March 17, 2024, 12:15 p.m.