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
已提问 6 个月前193 查看次数
2 回答
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.

已回答 6 个月前
profile picture
专家
已审核 1 个月前
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
已回答 6 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则