Profile MySQL Date Columns using DataBrew programmatically

0

Hi,

I'm trying to programmatically kick off a DataBrew profile job using AWS SDK from my java application. I need to profile MySQL database tables. While I'm able to do that from my application, I see that date columns aren't getting profiled. I couldn't find a way to cast a date column as String when creating the dataset or in the profile configuration. Is there a way I can do this?

Thanks, Meena

Meena
asked 6 months ago180 views
2 Answers
0

Dear Customer,

From your case correspondence, I understand you're attempting to launch a databrew profile job programmatically from a Java application using the AWS SDK. So you need to profile your SQL database tables, and you mentioned that while you can do so from your application, the date columns aren't getting profiled, so you couldn't find a way to cast a date column as a String when creating the dataset or in the profile configuration, so you were wondering if there was a way.

With regards to your question:

I was able to search internal and I was able to see that There is currently no way to cast a date column as a string when creating a dataset or in the profile configuration in DataBrew.

One workaround is to use a SQL query to cast the date column as a string before creating the dataset. For example, if you are using the AWS JDBC driver to connect to your MySQL database, you could use the following SQL query:

============ SELECT CAST(date_column AS VARCHAR(255)) AS string_date_column FROM table_name;

I hope the above answers your question. Please let me know if you have any other questions regarding this case, I will be happy to help you.

answered 6 months ago
profile picture
EXPERT
reviewed 25 days ago
0

Thank you for the response. I have tried that already. Currently SQL query option is available only for Amazon RedShift and Snowflake datasources.

Meena
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions