Overview
...
概要
日付変換機能は、CSVからのインポートプロセス中に使用できます。この機能を使用すると、書式が一般的ではない日付フィールドをYellowfinで認識できる標準の日付書式に変換できます。たとえば、CSVに格納されている日付が2014-8月-12
である場合、これを12/08/2014
.に変換できます。
Wiki Markup |
---|
{html}<iframe width="700" height="394" src="https://www.youtube.com/embed/cOU9rQYfn4I?color=white" frameborder="0" allowfullscreen></iframe>{html} |
In the example used here, we have a CSV file with two different date formats, and neither of them are recognised by Yellowfin as a standard date format. The CSV used can be located here.この例では、1つのCSVファイル内に2つの異なる日付書式がありますが、どちらの書式もYellowfinでは標準の日付書式として認識されません。使用するCSVはここにあります。
Section |
---|
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/thumbnails/2338976/01csv.png?version=1&modificationDate=1410195911739&cacheVersion=1&api=v2)
|
|
Section |
---|
Column |
---|
| The Date fields, 日付フィールド「Start Date and End Date, are shown in the file, but Yellowfin has recognised them as Varchar (text) fields, as they were not formatted in the standard date format.」と「End Date」がファイルに表示されますが、これらのフィールドは標準の日付書式で書式設定されていないため、YellowfinではVarchar(テキスト)フィールドとして認識されます。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/attachments/2338976/02example.png?version=1&modificationDate=1410195911761&cacheVersion=1&api=v2)
|
|
...
例
dd-MMM-yy
Section |
---|
Column |
---|
| 1. Click on the New Function button on the left of the CSV Data page. This will open a menu displaying all the functions that can be built into your file.Note: this screenshot is from the Report Builder CSV Import, if using the View Builder CSV Import not all of these options will be available, as they are available in later stages of the standard View Builder process instead.CSVデータページの左側にある「新規 関数/計算フィールド追加」ボタンをクリックします。メニューが開き、ファイルに組み込むことができるすべての関数が表示されます。 注意:このスクリーンショットは、レポートビルダーによるCSVインポートによるものです。ビュービルダーによるCSVインポートを使用する場合は、これらのオプションの一部を使用できませんが、標準のビュービルダープロセスの後半で使用できます。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/thumbnails/2338976/03function.png?version=1&modificationDate=1410195911771&cacheVersion=1&api=v2)
|
|
Section |
---|
Column |
---|
| 2. Click on the Date Conversion link to start the process. 3. From here you will need to select the field that requires converting. We will start with the Start Date field. 4. Click Create.「日付変換」リンクをクリックして、プロセスを開始します。 3.ここでは、変換が必要なフィールドを選択する必要があります。「Start Date」フィールドから始めます。 4.「作成」をクリックします。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/attachments/2338976/04dateConversion.png?version=1&modificationDate=1410195911782&cacheVersion=1&api=v2)
|
|
Section |
---|
Column |
---|
| 5. From here, the Date Conversion window will be displayed. First, you can provide a name for the converted version of the field. Note: this will be a new field, the original unconverted field will remain. You may wish to rename the original field as well. 6. Next, you will need to select which Converted Data Type you wish the field to be stored as. If the field contains time components and you wish to use them in reporting, select Timestamp, otherwise select Date. Last, you will need to define the Date Format the CSV field is currently stored in. Yellowfin will always convert to the format specified in Administration > Configuration > Regional Settings, which is dd/MM/yyyy by default, what you have to do is tell it how to read the original field. In this example, the Start Date field is displaying as 3-Jan-09 , which means it's formatted as dd-MMM-yy .「日付変換」ウィンドウが表示されます。まず、フィールドの変換後のバージョンに名前を付けることができます。 注意:これは新しいフィールドになります。元の変換されていないフィールドはそのまま残ります。元のフィールドの名前を変更することもできます。 6.次に、フィールドが格納される際の「変換されたデータ」を選択する必要があります。フィールドに時間要素が含まれていてレポート作成で時間要素を使用する場合は、「Timestamp」を選択します。そうでない場合は、「Date」を選択します。 最後に、CSVフィールドに現在格納されている「日付の書式」を定義する必要があります。Yellowfinでは、「管理」>「システム構成」>「地域依存設定」で指定された書式へ常に変換されます。これはデフォルトでdd/MM/yyyy です。元のフィールドを解釈する方法を指定してください。この例で、「Start Date」は3-Jan-09 のように表示されています。つまり、書式はdd-MMM-yy です。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/thumbnails/2338976/05dateWindow.png?version=1&modificationDate=1410195911792&cacheVersion=1&api=v2)
|
|
Section |
---|
Column |
---|
| 7. Enter 「日付の書式」フィールドに「dd-MMM into the Date Format field. You will notice that in the preview panel at the bottom of the window, Yellowfin has highlighted the 」と入力します。ウィンドウ下部のプレビューパネルでは、「サンプルデータ」の3-Jan component of the Sample Data, and as such is returning 要素が強調表示されていて、3/1/1970. What happens here is that Yellowfin converts the parts you specify (in this case day and month) and populates the rest with components from the date: 1が返されています。つまり、指定した部分(この例では日と月)が変換されて、残りの部分は、1/1/1970.1970からの日付要素で埋められています。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/thumbnails/2338976/06partialConversion.png?version=1&modificationDate=1410195911803&cacheVersion=1&api=v2)
|
|
Section |
---|
Column |
---|
| 8. Finish entering the date: enter 日付の入力を完了します。「日付の書式」フィールドに「dd-MMM-yy into the Date Format field. Yellowfin has now converted the entire date in the preview panel.」と入力します。プレビューパネルで日付全体が変換されます。 9. Click Save to complete.「保存」をクリックして完了します。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/thumbnails/2338976/07fullConversion.png?version=1&modificationDate=1410195911815&cacheVersion=1&api=v2)
|
|
Section |
---|
Column |
---|
| You will now have a new field at the end of your CSV table. This will have an orange band at the top to identify it as a converted field.これで、CSVテーブルの末尾に新しいフィールドが設定されました。上部には、変換されたフィールドであることを識別するオレンジ色の帯が付きます。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/attachments/2338976/08complete.png?version=1&modificationDate=1410195911827&cacheVersion=1&api=v2)
|
|
dd/MM/yy
In this example, we are going to convert the End Date field. At the moment this field looks like a date Yellowfin should recognise, as it's in our default format of この例では、「End Date」フィールドを変換します。現在、このフィールドはデフォルト書式であるdd/MM/yyyy
, but Yellowfin actually needs to read in dates from the format を使用しているため、Yellowfinで認識できる日付のように見えます。しかし、Yellowfinでは実際には書式yyyy/MM/dd
. So while it looks OK to us, Yellowfin has recognised it as text rather than a date.で日付を読み取る必要があります。つまり、人には問題ないように見えても、Yellowfinでは日付ではなくテキストとして認識されています。
Section |
---|
Column |
---|
| 1. Click the New Function button, select Date Conversion and choose the End Date field. 2. Click Create to begin. 3. Complete the Name and Converted Date Type as before. 4. If you were not sure how to specify your date format, i.e. what characters to use in the Date Format field, click on the symbol in the field.「新規関数」ボタンをクリックし、「日付変換」を選択し、「End Date」フィールドを選択します。 2.「作成」をクリックして開始します。 3.前と同様に「名前」および「変換後のデータタイプ」を設定します。 4.日付書式を指定する方法(つまり「日付の書式」フィールドで使用する文字)が不明な場合は、フィールドの「 」記号をクリックします。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/attachments/2338976/09info.png?version=1&modificationDate=1410195911838&cacheVersion=1&api=v2)
|
|
Section |
---|
Column |
---|
| 5. From here you will be shown what character combinations make up what date components. Work out which characters you need and click Close to return to the previous screen.どのような文字の組み合わせでどのような日付要素が構成されるのかが表示されます。必要な文字列を確認したら「閉じる」をクリックして前の画面に戻ります。 6. Enter 「dd/MM/yy and click Save to complete.」と入力し、「保存」をクリックして完了します。 |
Column |
---|
| ![](https://yellowfinjp.atlassian.net/wiki/download/thumbnails/2338976/10dateFormat.png?version=1&modificationDate=1410195911850&cacheVersion=1&api=v2)
|
|