How can I rename several columns in dataprep?










0















I have more than 100 columns in dataprep whose names are like:



my column name 1



my column name 2



I would like to rename the name of the columns to be:



my_column_name_1



my_column_name_2



I have tried to do a rename, changing " " by "_". However, dataprep only changes the first whitespace! Is there any way to change all the whitespaces?



Another question, when I do a function like rename, it is done just for a column. I can add more columns writing the name of de column. Is there any way to select all columns without writing all the names?



thank you so much!










share|improve this question






















  • Following the steps in the documentation also results in only the first occurrence being changed. I reported the issue to Dataprep. You can subscribe to updates by clicking the star at the top of the page. For the time being, although inconvenient, repeating the rename column step 3 times will properly change the column name.

    – Ali T
    Nov 18 '18 at 22:02















0















I have more than 100 columns in dataprep whose names are like:



my column name 1



my column name 2



I would like to rename the name of the columns to be:



my_column_name_1



my_column_name_2



I have tried to do a rename, changing " " by "_". However, dataprep only changes the first whitespace! Is there any way to change all the whitespaces?



Another question, when I do a function like rename, it is done just for a column. I can add more columns writing the name of de column. Is there any way to select all columns without writing all the names?



thank you so much!










share|improve this question






















  • Following the steps in the documentation also results in only the first occurrence being changed. I reported the issue to Dataprep. You can subscribe to updates by clicking the star at the top of the page. For the time being, although inconvenient, repeating the rename column step 3 times will properly change the column name.

    – Ali T
    Nov 18 '18 at 22:02













0












0








0








I have more than 100 columns in dataprep whose names are like:



my column name 1



my column name 2



I would like to rename the name of the columns to be:



my_column_name_1



my_column_name_2



I have tried to do a rename, changing " " by "_". However, dataprep only changes the first whitespace! Is there any way to change all the whitespaces?



Another question, when I do a function like rename, it is done just for a column. I can add more columns writing the name of de column. Is there any way to select all columns without writing all the names?



thank you so much!










share|improve this question














I have more than 100 columns in dataprep whose names are like:



my column name 1



my column name 2



I would like to rename the name of the columns to be:



my_column_name_1



my_column_name_2



I have tried to do a rename, changing " " by "_". However, dataprep only changes the first whitespace! Is there any way to change all the whitespaces?



Another question, when I do a function like rename, it is done just for a column. I can add more columns writing the name of de column. Is there any way to select all columns without writing all the names?



thank you so much!







google-cloud-dataprep






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 9:50









jonaetnjonaetn

42




42












  • Following the steps in the documentation also results in only the first occurrence being changed. I reported the issue to Dataprep. You can subscribe to updates by clicking the star at the top of the page. For the time being, although inconvenient, repeating the rename column step 3 times will properly change the column name.

    – Ali T
    Nov 18 '18 at 22:02

















  • Following the steps in the documentation also results in only the first occurrence being changed. I reported the issue to Dataprep. You can subscribe to updates by clicking the star at the top of the page. For the time being, although inconvenient, repeating the rename column step 3 times will properly change the column name.

    – Ali T
    Nov 18 '18 at 22:02
















Following the steps in the documentation also results in only the first occurrence being changed. I reported the issue to Dataprep. You can subscribe to updates by clicking the star at the top of the page. For the time being, although inconvenient, repeating the rename column step 3 times will properly change the column name.

– Ali T
Nov 18 '18 at 22:02





Following the steps in the documentation also results in only the first occurrence being changed. I reported the issue to Dataprep. You can subscribe to updates by clicking the star at the top of the page. For the time being, although inconvenient, repeating the rename column step 3 times will properly change the column name.

– Ali T
Nov 18 '18 at 22:02












2 Answers
2






active

oldest

votes


















1














You can shift-select multiple columns to Transform when the data is in column view mode.



Column Browser



Select the columns to apply to and then choose the transformation.






share|improve this answer

























  • In the Trifacta wrangle language, there is the possibility to specify a range of columns by name, but this doesn't appear to be available in Dataprep. If I find later this is not the case I'll update this answer

    – JSDBroughton
    Nov 16 '18 at 14:06


















1














JSDBroughton answer did the trick for me although it's not so clear how to do it. Change your view to Columns (second icon from the left on the toolbar). Select the first column, then hold Shift and select the last column. You should now have all columns selected. Then right clock and select Rename. A new Recipe step will be added with all your columns already added. Then set the Option to "Find and replace".



In terms removing all the spaces I couldn't find any Cloud Dataprep pattern or Regular Expression which let me replace all my spaces in my columns. Having said that my columns had a maximum of 4 spaces so I simply added the same step multiple times. I used the Regular Expression s to match spaces and I replaced them underscores.



enter image description here






share|improve this answer

























  • This information about the regex replace in column names is correct. I have submitted a feature request to allow for multiple replacements as per the field replace text function. +1

    – JSDBroughton
    yesterday











  • Renaming columns using Find and Replace and Regular Expressions

    – JSDBroughton
    yesterday







  • 1





    Nice one, thanks JSDBroughton!

    – Turribeach
    yesterday










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53278192%2fhow-can-i-rename-several-columns-in-dataprep%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You can shift-select multiple columns to Transform when the data is in column view mode.



Column Browser



Select the columns to apply to and then choose the transformation.






share|improve this answer

























  • In the Trifacta wrangle language, there is the possibility to specify a range of columns by name, but this doesn't appear to be available in Dataprep. If I find later this is not the case I'll update this answer

    – JSDBroughton
    Nov 16 '18 at 14:06















1














You can shift-select multiple columns to Transform when the data is in column view mode.



Column Browser



Select the columns to apply to and then choose the transformation.






share|improve this answer

























  • In the Trifacta wrangle language, there is the possibility to specify a range of columns by name, but this doesn't appear to be available in Dataprep. If I find later this is not the case I'll update this answer

    – JSDBroughton
    Nov 16 '18 at 14:06













1












1








1







You can shift-select multiple columns to Transform when the data is in column view mode.



Column Browser



Select the columns to apply to and then choose the transformation.






share|improve this answer















You can shift-select multiple columns to Transform when the data is in column view mode.



Column Browser



Select the columns to apply to and then choose the transformation.







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered Nov 16 '18 at 14:06









JSDBroughtonJSDBroughton

3,06832145




3,06832145












  • In the Trifacta wrangle language, there is the possibility to specify a range of columns by name, but this doesn't appear to be available in Dataprep. If I find later this is not the case I'll update this answer

    – JSDBroughton
    Nov 16 '18 at 14:06

















  • In the Trifacta wrangle language, there is the possibility to specify a range of columns by name, but this doesn't appear to be available in Dataprep. If I find later this is not the case I'll update this answer

    – JSDBroughton
    Nov 16 '18 at 14:06
















In the Trifacta wrangle language, there is the possibility to specify a range of columns by name, but this doesn't appear to be available in Dataprep. If I find later this is not the case I'll update this answer

– JSDBroughton
Nov 16 '18 at 14:06





In the Trifacta wrangle language, there is the possibility to specify a range of columns by name, but this doesn't appear to be available in Dataprep. If I find later this is not the case I'll update this answer

– JSDBroughton
Nov 16 '18 at 14:06













1














JSDBroughton answer did the trick for me although it's not so clear how to do it. Change your view to Columns (second icon from the left on the toolbar). Select the first column, then hold Shift and select the last column. You should now have all columns selected. Then right clock and select Rename. A new Recipe step will be added with all your columns already added. Then set the Option to "Find and replace".



In terms removing all the spaces I couldn't find any Cloud Dataprep pattern or Regular Expression which let me replace all my spaces in my columns. Having said that my columns had a maximum of 4 spaces so I simply added the same step multiple times. I used the Regular Expression s to match spaces and I replaced them underscores.



enter image description here






share|improve this answer

























  • This information about the regex replace in column names is correct. I have submitted a feature request to allow for multiple replacements as per the field replace text function. +1

    – JSDBroughton
    yesterday











  • Renaming columns using Find and Replace and Regular Expressions

    – JSDBroughton
    yesterday







  • 1





    Nice one, thanks JSDBroughton!

    – Turribeach
    yesterday















1














JSDBroughton answer did the trick for me although it's not so clear how to do it. Change your view to Columns (second icon from the left on the toolbar). Select the first column, then hold Shift and select the last column. You should now have all columns selected. Then right clock and select Rename. A new Recipe step will be added with all your columns already added. Then set the Option to "Find and replace".



In terms removing all the spaces I couldn't find any Cloud Dataprep pattern or Regular Expression which let me replace all my spaces in my columns. Having said that my columns had a maximum of 4 spaces so I simply added the same step multiple times. I used the Regular Expression s to match spaces and I replaced them underscores.



enter image description here






share|improve this answer

























  • This information about the regex replace in column names is correct. I have submitted a feature request to allow for multiple replacements as per the field replace text function. +1

    – JSDBroughton
    yesterday











  • Renaming columns using Find and Replace and Regular Expressions

    – JSDBroughton
    yesterday







  • 1





    Nice one, thanks JSDBroughton!

    – Turribeach
    yesterday













1












1








1







JSDBroughton answer did the trick for me although it's not so clear how to do it. Change your view to Columns (second icon from the left on the toolbar). Select the first column, then hold Shift and select the last column. You should now have all columns selected. Then right clock and select Rename. A new Recipe step will be added with all your columns already added. Then set the Option to "Find and replace".



In terms removing all the spaces I couldn't find any Cloud Dataprep pattern or Regular Expression which let me replace all my spaces in my columns. Having said that my columns had a maximum of 4 spaces so I simply added the same step multiple times. I used the Regular Expression s to match spaces and I replaced them underscores.



enter image description here






share|improve this answer















JSDBroughton answer did the trick for me although it's not so clear how to do it. Change your view to Columns (second icon from the left on the toolbar). Select the first column, then hold Shift and select the last column. You should now have all columns selected. Then right clock and select Rename. A new Recipe step will be added with all your columns already added. Then set the Option to "Find and replace".



In terms removing all the spaces I couldn't find any Cloud Dataprep pattern or Regular Expression which let me replace all my spaces in my columns. Having said that my columns had a maximum of 4 spaces so I simply added the same step multiple times. I used the Regular Expression s to match spaces and I replaced them underscores.



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered yesterday









TurribeachTurribeach

513




513












  • This information about the regex replace in column names is correct. I have submitted a feature request to allow for multiple replacements as per the field replace text function. +1

    – JSDBroughton
    yesterday











  • Renaming columns using Find and Replace and Regular Expressions

    – JSDBroughton
    yesterday







  • 1





    Nice one, thanks JSDBroughton!

    – Turribeach
    yesterday

















  • This information about the regex replace in column names is correct. I have submitted a feature request to allow for multiple replacements as per the field replace text function. +1

    – JSDBroughton
    yesterday











  • Renaming columns using Find and Replace and Regular Expressions

    – JSDBroughton
    yesterday







  • 1





    Nice one, thanks JSDBroughton!

    – Turribeach
    yesterday
















This information about the regex replace in column names is correct. I have submitted a feature request to allow for multiple replacements as per the field replace text function. +1

– JSDBroughton
yesterday





This information about the regex replace in column names is correct. I have submitted a feature request to allow for multiple replacements as per the field replace text function. +1

– JSDBroughton
yesterday













Renaming columns using Find and Replace and Regular Expressions

– JSDBroughton
yesterday






Renaming columns using Find and Replace and Regular Expressions

– JSDBroughton
yesterday





1




1





Nice one, thanks JSDBroughton!

– Turribeach
yesterday





Nice one, thanks JSDBroughton!

– Turribeach
yesterday

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53278192%2fhow-can-i-rename-several-columns-in-dataprep%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo